0001 # SPDX-License-Identifier: GPL-2.0-only
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/gpio/mrvl-gpio.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Marvell PXA GPIO controller
0008
0009 maintainers:
0010 - Linus Walleij <linus.walleij@linaro.org>
0011 - Bartosz Golaszewski <bgolaszewski@baylibre.com>
0012 - Rob Herring <robh+dt@kernel.org>
0013
0014 allOf:
0015 - if:
0016 properties:
0017 compatible:
0018 contains:
0019 enum:
0020 - intel,pxa25x-gpio
0021 - intel,pxa26x-gpio
0022 - intel,pxa27x-gpio
0023 - intel,pxa3xx-gpio
0024 then:
0025 properties:
0026 interrupts:
0027 minItems: 3
0028 maxItems: 3
0029 interrupt-names:
0030 items:
0031 - const: gpio0
0032 - const: gpio1
0033 - const: gpio_mux
0034 - if:
0035 properties:
0036 compatible:
0037 contains:
0038 enum:
0039 - marvell,mmp-gpio
0040 - marvell,mmp2-gpio
0041 then:
0042 properties:
0043 interrupts:
0044 maxItems: 1
0045 interrupt-names:
0046 items:
0047 - const: gpio_mux
0048
0049 properties:
0050 $nodename:
0051 pattern: '^gpio@[0-9a-f]+$'
0052
0053 compatible:
0054 enum:
0055 - intel,pxa25x-gpio
0056 - intel,pxa26x-gpio
0057 - intel,pxa27x-gpio
0058 - intel,pxa3xx-gpio
0059 - marvell,mmp-gpio
0060 - marvell,mmp2-gpio
0061 - marvell,pxa93x-gpio
0062
0063 reg:
0064 maxItems: 1
0065
0066 clocks:
0067 maxItems: 1
0068
0069 resets:
0070 maxItems: 1
0071
0072 ranges: true
0073
0074 '#address-cells':
0075 const: 1
0076
0077 '#size-cells':
0078 const: 1
0079
0080 gpio-controller: true
0081
0082 '#gpio-cells':
0083 const: 2
0084
0085 gpio-ranges: true
0086
0087 interrupts: true
0088
0089 interrupt-names: true
0090
0091 interrupt-controller: true
0092
0093 '#interrupt-cells':
0094 const: 2
0095
0096 patternProperties:
0097 '^gpio@[0-9a-f]*$':
0098 type: object
0099 properties:
0100 reg:
0101 maxItems: 1
0102
0103 required:
0104 - reg
0105
0106 additionalProperties: false
0107
0108 required:
0109 - compatible
0110 - '#address-cells'
0111 - '#size-cells'
0112 - reg
0113 - gpio-controller
0114 - '#gpio-cells'
0115 - interrupts
0116 - interrupt-names
0117 - interrupt-controller
0118 - '#interrupt-cells'
0119
0120 additionalProperties: false
0121
0122 examples:
0123 - |
0124 #include <dt-bindings/clock/pxa-clock.h>
0125 gpio@40e00000 {
0126 compatible = "intel,pxa3xx-gpio";
0127 #address-cells = <1>;
0128 #size-cells = <1>;
0129 reg = <0x40e00000 0x10000>;
0130 gpio-controller;
0131 #gpio-cells = <2>;
0132 interrupts = <8>, <9>, <10>;
0133 interrupt-names = "gpio0", "gpio1", "gpio_mux";
0134 clocks = <&clks CLK_GPIO>;
0135 interrupt-controller;
0136 #interrupt-cells = <2>;
0137 };
0138 - |
0139 #include <dt-bindings/clock/marvell,pxa910.h>
0140 gpio@d4019000 {
0141 compatible = "marvell,mmp-gpio";
0142 #address-cells = <1>;
0143 #size-cells = <1>;
0144 reg = <0xd4019000 0x1000>;
0145 gpio-controller;
0146 #gpio-cells = <2>;
0147 interrupts = <49>;
0148 interrupt-names = "gpio_mux";
0149 clocks = <&soc_clocks PXA910_CLK_GPIO>;
0150 resets = <&soc_clocks PXA910_CLK_GPIO>;
0151 interrupt-controller;
0152 #interrupt-cells = <2>;
0153 ranges;
0154
0155 gpio@d4019000 {
0156 reg = <0xd4019000 0x4>;
0157 };
0158
0159 gpio@d4019004 {
0160 reg = <0xd4019004 0x4>;
0161 };
0162
0163 gpio@d4019008 {
0164 reg = <0xd4019008 0x4>;
0165 };
0166
0167 gpio@d4019100 {
0168 reg = <0xd4019100 0x4>;
0169 };
0170 };
0171
0172 ...