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