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