xref: /linux/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
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    required:
111      - gpio-hog
112
113required:
114  - compatible
115  - reg
116  - gpio-controller
117  - "#gpio-cells"
118
119additionalProperties: false
120
121allOf:
122  - if:
123      properties:
124        compatible:
125          contains:
126            enum:
127              - maxim,max7320
128              - maxim,max7321
129              - maxim,max7322
130              - maxim,max7323
131              - maxim,max7324
132              - maxim,max7325
133              - maxim,max7326
134              - maxim,max7327
135    then:
136      properties:
137        reset-gpios: false
138        vcc-supply: false
139
140examples:
141  - |
142    #include <dt-bindings/gpio/gpio.h>
143    #include <dt-bindings/interrupt-controller/irq.h>
144
145    i2c {
146        #address-cells = <1>;
147        #size-cells = <0>;
148
149        gpio@20 {
150            compatible = "nxp,pca9505";
151            reg = <0x20>;
152            pinctrl-names = "default";
153            pinctrl-0 = <&pinctrl_pca9505>;
154            gpio-controller;
155            #gpio-cells = <2>;
156            interrupt-parent = <&gpio3>;
157            interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
158
159            usb3-sata-sel-hog {
160                gpio-hog;
161                gpios = <4 GPIO_ACTIVE_HIGH>;
162                output-low;
163                line-name = "usb3_sata_sel";
164            };
165        };
166    };
167
168  - |
169    #include <dt-bindings/interrupt-controller/irq.h>
170
171    i2c {
172        #address-cells = <1>;
173        #size-cells = <0>;
174
175        gpio99: gpio@22 {
176            compatible = "nxp,pcal6524";
177            reg = <0x22>;
178            interrupt-parent = <&gpio6>;
179            interrupts = <1 IRQ_TYPE_EDGE_FALLING>; /* gpio6_161 */
180            interrupt-controller;
181            #interrupt-cells = <2>;
182            vcc-supply = <&vdds_1v8_main>;
183            gpio-controller;
184            #gpio-cells = <2>;
185            gpio-line-names = "hdmi-ct-hpd", "hdmi.ls-oe", "p02", "p03",
186                              "vibra", "fault2", "p06", "p07", "en-usb",
187                              "en-host1", "en-host2", "chg-int", "p14", "p15",
188                              "mic-int", "en-modem", "shdn-hs-amp",
189                              "chg-status+red", "green", "blue", "en-esata",
190                              "fault1", "p26", "p27";
191        };
192    };
193
194  - |
195    #include <dt-bindings/interrupt-controller/irq.h>
196
197    i2c {
198        #address-cells = <1>;
199        #size-cells = <0>;
200
201        /* MAX7325 with interrupt support enabled */
202        gpio@6d {
203            compatible = "maxim,max7325";
204            reg = <0x6d>;
205            gpio-controller;
206            #gpio-cells = <2>;
207            interrupt-controller;
208            #interrupt-cells = <2>;
209            interrupt-parent = <&gpio4>;
210            interrupts = <29 IRQ_TYPE_EDGE_FALLING>;
211        };
212    };
213
214  - |
215    i2c {
216        #address-cells = <1>;
217        #size-cells = <0>;
218
219        /* MAX7325 with interrupt support disabled */
220        gpio@6e {
221            compatible = "maxim,max7325";
222            reg = <0x6e>;
223            gpio-controller;
224            #gpio-cells = <2>;
225        };
226    };
227