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