xref: /linux/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml (revision e78f70bad29c5ae1e1076698b690b15794e9b81e)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/gpio/gpio-pca95xx.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: NXP PCA95xx I2C GPIO multiplexer
8
9maintainers:
10  - Krzysztof Kozlowski <krzk@kernel.org>
11
12description: |+
13  Bindings for the family of I2C GPIO multiplexers/expanders: NXP PCA95xx,
14  Maxim MAX73xx
15
16properties:
17  compatible:
18    oneOf:
19      - items:
20          - const: toradex,ecgpiol16
21          - const: nxp,pcal6416
22      - items:
23          - const: diodes,pi4ioe5v6534q
24          - const: nxp,pcal6534
25      - items:
26          - enum:
27              - exar,xra1202
28              - maxim,max7310
29              - maxim,max7312
30              - maxim,max7313
31              - maxim,max7315
32              - maxim,max7319
33              - maxim,max7320
34              - maxim,max7321
35              - maxim,max7322
36              - maxim,max7323
37              - maxim,max7324
38              - maxim,max7325
39              - maxim,max7326
40              - maxim,max7327
41              - nxp,pca6408
42              - nxp,pca6416
43              - nxp,pca9505
44              - nxp,pca9506
45              - nxp,pca9534
46              - nxp,pca9535
47              - nxp,pca9536
48              - nxp,pca9537
49              - nxp,pca9538
50              - nxp,pca9539
51              - nxp,pca9554
52              - nxp,pca9555
53              - nxp,pca9556
54              - nxp,pca9557
55              - nxp,pca9574
56              - nxp,pca9575
57              - nxp,pca9698
58              - nxp,pcal6408
59              - nxp,pcal6416
60              - nxp,pcal6524
61              - nxp,pcal6534
62              - nxp,pcal9535
63              - nxp,pcal9554b
64              - nxp,pcal9555a
65              - onnn,cat9554
66              - onnn,pca9654
67              - ti,pca6107
68              - ti,pca9536
69              - ti,tca6408
70              - ti,tca6416
71              - ti,tca6424
72              - ti,tca9535
73              - ti,tca9538
74              - ti,tca9539
75              - ti,tca9554
76
77  reg:
78    maxItems: 1
79
80  gpio-controller: true
81
82  '#gpio-cells':
83    const: 2
84
85  gpio-line-names:
86    minItems: 1
87    maxItems: 40
88
89  interrupts:
90    maxItems: 1
91
92  interrupt-controller: true
93
94  '#interrupt-cells':
95    const: 2
96
97  reset-gpios:
98    maxItems: 1
99    description:
100      GPIO specification for the RESET input. This is an active low signal to
101      the PCA953x.  Not valid for Maxim MAX732x devices.
102
103  vcc-supply:
104    description:
105      Optional power supply.  Not valid for Maxim MAX732x devices.
106
107  wakeup-source:
108    $ref: /schemas/types.yaml#/definitions/flag
109
110patternProperties:
111  "^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
112    type: object
113    required:
114      - gpio-hog
115
116required:
117  - compatible
118  - reg
119  - gpio-controller
120  - "#gpio-cells"
121
122additionalProperties: false
123
124allOf:
125  - if:
126      properties:
127        compatible:
128          contains:
129            enum:
130              - maxim,max7320
131              - maxim,max7321
132              - maxim,max7322
133              - maxim,max7323
134              - maxim,max7324
135              - maxim,max7325
136              - maxim,max7326
137              - maxim,max7327
138              - toradex,ecgpiol16
139    then:
140      properties:
141        reset-gpios: false
142        vcc-supply: false
143
144examples:
145  - |
146    #include <dt-bindings/gpio/gpio.h>
147    #include <dt-bindings/interrupt-controller/irq.h>
148
149    i2c {
150        #address-cells = <1>;
151        #size-cells = <0>;
152
153        gpio@20 {
154            compatible = "nxp,pca9505";
155            reg = <0x20>;
156            pinctrl-names = "default";
157            pinctrl-0 = <&pinctrl_pca9505>;
158            gpio-controller;
159            #gpio-cells = <2>;
160            interrupt-parent = <&gpio3>;
161            interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
162
163            usb3-sata-sel-hog {
164                gpio-hog;
165                gpios = <4 GPIO_ACTIVE_HIGH>;
166                output-low;
167                line-name = "usb3_sata_sel";
168            };
169        };
170    };
171
172  - |
173    #include <dt-bindings/interrupt-controller/irq.h>
174
175    i2c {
176        #address-cells = <1>;
177        #size-cells = <0>;
178
179        gpio99: gpio@22 {
180            compatible = "nxp,pcal6524";
181            reg = <0x22>;
182            interrupt-parent = <&gpio6>;
183            interrupts = <1 IRQ_TYPE_EDGE_FALLING>; /* gpio6_161 */
184            interrupt-controller;
185            #interrupt-cells = <2>;
186            vcc-supply = <&vdds_1v8_main>;
187            gpio-controller;
188            #gpio-cells = <2>;
189            gpio-line-names = "hdmi-ct-hpd", "hdmi.ls-oe", "p02", "p03",
190                              "vibra", "fault2", "p06", "p07", "en-usb",
191                              "en-host1", "en-host2", "chg-int", "p14", "p15",
192                              "mic-int", "en-modem", "shdn-hs-amp",
193                              "chg-status+red", "green", "blue", "en-esata",
194                              "fault1", "p26", "p27";
195        };
196    };
197
198  - |
199    #include <dt-bindings/interrupt-controller/irq.h>
200
201    i2c {
202        #address-cells = <1>;
203        #size-cells = <0>;
204
205        /* MAX7325 with interrupt support enabled */
206        gpio@6d {
207            compatible = "maxim,max7325";
208            reg = <0x6d>;
209            gpio-controller;
210            #gpio-cells = <2>;
211            interrupt-controller;
212            #interrupt-cells = <2>;
213            interrupt-parent = <&gpio4>;
214            interrupts = <29 IRQ_TYPE_EDGE_FALLING>;
215        };
216    };
217
218  - |
219    i2c {
220        #address-cells = <1>;
221        #size-cells = <0>;
222
223        /* MAX7325 with interrupt support disabled */
224        gpio@6e {
225            compatible = "maxim,max7325";
226            reg = <0x6e>;
227            gpio-controller;
228            #gpio-cells = <2>;
229        };
230    };
231