xref: /linux/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml (revision ab93e0dd72c37d378dd936f031ffb83ff2bd87ce)
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,tca6418
72              - ti,tca6424
73              - ti,tca9535
74              - ti,tca9538
75              - ti,tca9539
76              - ti,tca9554
77
78  reg:
79    maxItems: 1
80
81  gpio-controller: true
82
83  '#gpio-cells':
84    const: 2
85
86  gpio-line-names:
87    minItems: 1
88    maxItems: 40
89
90  interrupts:
91    maxItems: 1
92
93  interrupt-controller: true
94
95  '#interrupt-cells':
96    const: 2
97
98  reset-gpios:
99    maxItems: 1
100    description:
101      GPIO specification for the RESET input. This is an active low signal to
102      the PCA953x.  Not valid for Maxim MAX732x devices.
103
104  vcc-supply:
105    description:
106      Optional power supply.  Not valid for Maxim MAX732x devices.
107
108  wakeup-source:
109    $ref: /schemas/types.yaml#/definitions/flag
110
111patternProperties:
112  "^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
113    type: object
114    required:
115      - gpio-hog
116
117required:
118  - compatible
119  - reg
120  - gpio-controller
121  - "#gpio-cells"
122
123additionalProperties: false
124
125allOf:
126  - if:
127      properties:
128        compatible:
129          contains:
130            enum:
131              - maxim,max7320
132              - maxim,max7321
133              - maxim,max7322
134              - maxim,max7323
135              - maxim,max7324
136              - maxim,max7325
137              - maxim,max7326
138              - maxim,max7327
139              - toradex,ecgpiol16
140    then:
141      properties:
142        reset-gpios: false
143        vcc-supply: false
144
145examples:
146  - |
147    #include <dt-bindings/gpio/gpio.h>
148    #include <dt-bindings/interrupt-controller/irq.h>
149
150    i2c {
151        #address-cells = <1>;
152        #size-cells = <0>;
153
154        gpio@20 {
155            compatible = "nxp,pca9505";
156            reg = <0x20>;
157            pinctrl-names = "default";
158            pinctrl-0 = <&pinctrl_pca9505>;
159            gpio-controller;
160            #gpio-cells = <2>;
161            interrupt-parent = <&gpio3>;
162            interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
163
164            usb3-sata-sel-hog {
165                gpio-hog;
166                gpios = <4 GPIO_ACTIVE_HIGH>;
167                output-low;
168                line-name = "usb3_sata_sel";
169            };
170        };
171    };
172
173  - |
174    #include <dt-bindings/interrupt-controller/irq.h>
175
176    i2c {
177        #address-cells = <1>;
178        #size-cells = <0>;
179
180        gpio99: gpio@22 {
181            compatible = "nxp,pcal6524";
182            reg = <0x22>;
183            interrupt-parent = <&gpio6>;
184            interrupts = <1 IRQ_TYPE_EDGE_FALLING>; /* gpio6_161 */
185            interrupt-controller;
186            #interrupt-cells = <2>;
187            vcc-supply = <&vdds_1v8_main>;
188            gpio-controller;
189            #gpio-cells = <2>;
190            gpio-line-names = "hdmi-ct-hpd", "hdmi.ls-oe", "p02", "p03",
191                              "vibra", "fault2", "p06", "p07", "en-usb",
192                              "en-host1", "en-host2", "chg-int", "p14", "p15",
193                              "mic-int", "en-modem", "shdn-hs-amp",
194                              "chg-status+red", "green", "blue", "en-esata",
195                              "fault1", "p26", "p27";
196        };
197    };
198
199  - |
200    #include <dt-bindings/interrupt-controller/irq.h>
201
202    i2c {
203        #address-cells = <1>;
204        #size-cells = <0>;
205
206        /* MAX7325 with interrupt support enabled */
207        gpio@6d {
208            compatible = "maxim,max7325";
209            reg = <0x6d>;
210            gpio-controller;
211            #gpio-cells = <2>;
212            interrupt-controller;
213            #interrupt-cells = <2>;
214            interrupt-parent = <&gpio4>;
215            interrupts = <29 IRQ_TYPE_EDGE_FALLING>;
216        };
217    };
218
219  - |
220    i2c {
221        #address-cells = <1>;
222        #size-cells = <0>;
223
224        /* MAX7325 with interrupt support disabled */
225        gpio@6e {
226            compatible = "maxim,max7325";
227            reg = <0x6e>;
228            gpio-controller;
229            #gpio-cells = <2>;
230        };
231    };
232