xref: /linux/Documentation/devicetree/bindings/mfd/ti,twl.yaml (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mfd/ti,twl.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Texas Instruments TWL family
8
9maintainers:
10  - Andreas Kemnade <andreas@kemnade.info>
11
12description: |
13  The TWLs are Integrated Power Management Chips.
14  Some version might contain much more analog function like
15  USB transceiver or Audio amplifier.
16  These chips are connected to an i2c bus.
17
18allOf:
19  - if:
20      properties:
21        compatible:
22          contains:
23            const: ti,twl4030
24    then:
25      patternProperties:
26        "^regulator-":
27          properties:
28            compatible:
29              enum:
30                - ti,twl4030-vaux1
31                - ti,twl4030-vaux2
32                - ti,twl4030-vaux3
33                - ti,twl4030-vaux4
34                - ti,twl4030-vmmc1
35                - ti,twl4030-vmmc2
36                - ti,twl4030-vpll1
37                - ti,twl4030-vpll2
38                - ti,twl4030-vsim
39                - ti,twl4030-vdac
40                - ti,twl4030-vintana2
41                - ti,twl4030-vio
42                - ti,twl4030-vdd1
43                - ti,twl4030-vdd2
44                - ti,twl4030-vintana1
45                - ti,twl4030-vintdig
46                - ti,twl4030-vusb1v5
47                - ti,twl4030-vusb1v8
48                - ti,twl4030-vusb3v1
49            ti,retain-on-reset: false
50
51      properties:
52        madc:
53          type: object
54          $ref: /schemas/iio/adc/ti,twl4030-madc.yaml
55          unevaluatedProperties: false
56
57        bci:
58          type: object
59          $ref: /schemas/power/supply/twl4030-charger.yaml
60          unevaluatedProperties: false
61
62        pwrbutton:
63          type: object
64          additionalProperties: false
65          properties:
66            compatible:
67              const: ti,twl4030-pwrbutton
68            interrupts:
69              items:
70                - items:
71                    const: 8
72
73        watchdog:
74          type: object
75          additionalProperties: false
76          properties:
77            compatible:
78              const: ti,twl4030-wdt
79  - if:
80      properties:
81        compatible:
82          contains:
83            const: ti,twl6030
84    then:
85      patternProperties:
86        "^regulator-":
87          properties:
88            compatible:
89              enum:
90                - ti,twl6030-vaux1
91                - ti,twl6030-vaux2
92                - ti,twl6030-vaux3
93                - ti,twl6030-vmmc
94                - ti,twl6030-vpp
95                - ti,twl6030-vusim
96                - ti,twl6030-vana
97                - ti,twl6030-vcxio
98                - ti,twl6030-vdac
99                - ti,twl6030-vusb
100                - ti,twl6030-v1v8
101                - ti,twl6030-v2v1
102                - ti,twl6030-vdd1
103                - ti,twl6030-vdd2
104                - ti,twl6030-vdd3
105            regulator-initial-mode: false
106
107      properties:
108        gpadc:
109          type: object
110          properties:
111            compatible:
112              const: ti,twl6030-gpadc
113  - if:
114      properties:
115        compatible:
116          contains:
117            const: ti,twl6032
118    then:
119      patternProperties:
120        "^regulator-":
121          properties:
122            compatible:
123              enum:
124                - ti,twl6032-ldo1
125                - ti,twl6032-ldo2
126                - ti,twl6032-ldo3
127                - ti,twl6032-ldo4
128                - ti,twl6032-ldo5
129                - ti,twl6032-ldo6
130                - ti,twl6032-ldo7
131                - ti,twl6032-ldoln
132                - ti,twl6032-ldousb
133                - ti,twl6032-smps3
134                - ti,twl6032-smps4
135                - ti,twl6032-vio
136            regulator-initial-mode: false
137
138      properties:
139        gpadc:
140          type: object
141          properties:
142            compatible:
143              const: ti,twl6032-gpadc
144
145properties:
146  compatible:
147    description:
148      TWL4030 for integrated power-management/audio CODEC device used in OMAP3
149      based boards
150      TWL6030/32 for integrated power-management used in OMAP4 based boards
151    enum:
152      - ti,twl4030
153      - ti,twl6030
154      - ti,twl6032
155
156  reg:
157    maxItems: 1
158
159  interrupts:
160    maxItems: 1
161
162  interrupt-controller: true
163
164  system-power-controller: true
165
166  "#interrupt-cells":
167    const: 1
168
169  "#clock-cells":
170    const: 1
171
172  rtc:
173    type: object
174    additionalProperties: false
175    properties:
176      compatible:
177        const: ti,twl4030-rtc
178      interrupts:
179        maxItems: 1
180
181patternProperties:
182  "^regulator-":
183    type: object
184    unevaluatedProperties: false
185    $ref: /schemas/regulator/regulator.yaml
186    properties:
187      compatible: true
188      regulator-initial-mode:
189        enum:
190          - 0x08 # Sleep mode, the nominal output voltage is maintained
191                 # with low power consumption with low load current capability
192          - 0x0e # Active mode, the regulator can deliver its nominal output
193                 # voltage with full-load current capability
194      ti,retain-on-reset:
195        description:
196          Does not turn off the supplies during warm
197          reset. Could be needed for VMMC, as TWL6030
198          reset sequence for this signal does not comply
199          with the SD specification.
200        type: boolean
201
202unevaluatedProperties: false
203
204required:
205  - compatible
206  - reg
207  - interrupts
208  - interrupt-controller
209  - "#interrupt-cells"
210
211examples:
212  - |
213    i2c {
214      #address-cells = <1>;
215      #size-cells = <0>;
216
217      pmic@48 {
218        compatible = "ti,twl6030";
219        reg = <0x48>;
220        interrupts = <39>; /* IRQ_SYS_1N cascaded to gic */
221        interrupt-parent = <&gic>;
222        interrupt-controller;
223        #interrupt-cells = <1>;
224
225        gpadc {
226          compatible = "ti,twl6030-gpadc";
227          interrupts = <6>;
228          #io-channel-cells = <1>;
229        };
230
231        rtc {
232          compatible = "ti,twl4030-rtc";
233          interrupts = <8>;
234        };
235
236        regulator-vaux1 {
237          compatible = "ti,twl6030-vaux1";
238          regulator-min-microvolt = <1000000>;
239          regulator-max-microvolt = <3000000>;
240        };
241
242        regulator-vmmc1 {
243          compatible = "ti,twl6030-vmmc";
244          ti,retain-on-reset;
245        };
246      };
247    };
248
249  - |
250    i2c {
251      #address-cells = <1>;
252      #size-cells = <0>;
253
254      pmic@48 {
255        compatible = "ti,twl4030";
256        reg = <0x48>;
257        interrupts = <7>; /* SYS_NIRQ cascaded to intc */
258        interrupt-parent = <&intc>;
259        interrupt-controller;
260        #interrupt-cells = <1>;
261
262        bci {
263          compatible = "ti,twl4030-bci";
264          interrupts = <9>, <2>;
265          bci3v1-supply = <&vusb3v1>;
266          io-channels = <&twl_madc 11>;
267          io-channel-names = "vac";
268        };
269
270        twl_madc: madc {
271          compatible = "ti,twl4030-madc";
272          interrupts = <3>;
273          #io-channel-cells = <1>;
274        };
275
276        pwrbutton {
277          compatible = "ti,twl4030-pwrbutton";
278          interrupts = <8>;
279        };
280
281        rtc {
282          compatible = "ti,twl4030-rtc";
283          interrupts = <11>;
284        };
285
286        regulator-vaux1 {
287          compatible = "ti,twl4030-vaux1";
288          regulator-min-microvolt = <1000000>;
289          regulator-max-microvolt = <3000000>;
290          regulator-initial-mode = <0xe>;
291        };
292
293        vusb3v1: regulator-vusb3v1 {
294          compatible = "ti,twl4030-vusb3v1";
295        };
296
297        watchdog {
298          compatible = "ti,twl4030-wdt";
299        };
300      };
301    };
302...
303