7ff6efadf7971e6f9d1b1044d335acf296c54ad7
[platform/kernel/linux-starfive.git] / Documentation / devicetree / bindings / gpio / gpio-pca95xx.yaml
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
7 title: NXP PCA95xx I2C GPIO multiplexer
8
9 maintainers:
10   - Krzysztof Kozlowski <krzk@kernel.org>
11
12 properties:
13   compatible:
14     enum:
15       - exar,xra1202
16       - maxim,max7310
17       - maxim,max7312
18       - maxim,max7313
19       - maxim,max7315
20       - nxp,pca6416
21       - nxp,pca9505
22       - nxp,pca9534
23       - nxp,pca9535
24       - nxp,pca9536
25       - nxp,pca9537
26       - nxp,pca9538
27       - nxp,pca9539
28       - nxp,pca9554
29       - nxp,pca9555
30       - nxp,pca9556
31       - nxp,pca9557
32       - nxp,pca9574
33       - nxp,pca9575
34       - nxp,pca9698
35       - nxp,pcal6416
36       - nxp,pcal6524
37       - nxp,pcal9535
38       - nxp,pcal9555a
39       - onnn,cat9554
40       - onnn,pca9654
41       - ti,pca6107
42       - ti,pca9536
43       - ti,tca6408
44       - ti,tca6416
45       - ti,tca6424
46       - ti,tca9539
47       - ti,tca9554
48
49   reg:
50     maxItems: 1
51
52   gpio-controller: true
53
54   '#gpio-cells':
55     const: 2
56
57   gpio-line-names:
58     minItems: 1
59     maxItems: 32
60
61   interrupts:
62     maxItems: 1
63
64   interrupt-controller: true
65
66   '#interrupt-cells':
67     const: 2
68
69   reset-gpios:
70     description:
71       GPIO specification for the RESET input. This is an active low signal to
72       the PCA953x.
73
74   vcc-supply:
75     description:
76       Optional power supply
77
78   wakeup-source:
79     $ref: /schemas/types.yaml#/definitions/flag
80
81 patternProperties:
82   "^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
83     type: object
84     properties:
85       gpio-hog: true
86       gpios: true
87       input: true
88       output-high: true
89       output-low: true
90       line-name: true
91
92     required:
93       - gpio-hog
94       - gpios
95
96     additionalProperties: false
97
98 required:
99   - compatible
100   - reg
101   - gpio-controller
102   - "#gpio-cells"
103
104 additionalProperties: false
105
106 examples:
107   - |
108     #include <dt-bindings/gpio/gpio.h>
109     #include <dt-bindings/interrupt-controller/irq.h>
110
111     i2c0 {
112         #address-cells = <1>;
113         #size-cells = <0>;
114
115         gpio@20 {
116             compatible = "nxp,pca9505";
117             reg = <0x20>;
118             pinctrl-names = "default";
119             pinctrl-0 = <&pinctrl_pca9505>;
120             gpio-controller;
121             #gpio-cells = <2>;
122             interrupt-parent = <&gpio3>;
123             interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
124
125             usb3-sata-sel-hog {
126                 gpio-hog;
127                 gpios = <4 GPIO_ACTIVE_HIGH>;
128                 output-low;
129                 line-name = "usb3_sata_sel";
130             };
131         };
132     };
133
134   - |
135     #include <dt-bindings/interrupt-controller/irq.h>
136
137     i2c1 {
138         #address-cells = <1>;
139         #size-cells = <0>;
140
141         gpio99: gpio@22 {
142             compatible = "nxp,pcal6524";
143             reg = <0x22>;
144             interrupt-parent = <&gpio6>;
145             interrupts = <1 IRQ_TYPE_EDGE_FALLING>; /* gpio6_161 */
146             interrupt-controller;
147             #interrupt-cells = <2>;
148             vcc-supply = <&vdds_1v8_main>;
149             gpio-controller;
150             #gpio-cells = <2>;
151             gpio-line-names = "hdmi-ct-hpd", "hdmi.ls-oe", "p02", "p03",
152                               "vibra", "fault2", "p06", "p07", "en-usb",
153                               "en-host1", "en-host2", "chg-int", "p14", "p15",
154                               "mic-int", "en-modem", "shdn-hs-amp",
155                               "chg-status+red", "green", "blue", "en-esata",
156                               "fault1", "p26", "p27";
157         };
158
159         ts3a227@3b {
160             compatible = "ti,ts3a227e";
161             reg = <0x3b>;
162             interrupt-parent = <&gpio99>;
163             interrupts = <14 IRQ_TYPE_EDGE_RISING>;
164             ti,micbias = <0>; /* 2.1V */
165         };
166     };