xref: /linux/Documentation/devicetree/bindings/mfd/ti,twl.yaml (revision 7f71507851fc7764b36a3221839607d3a45c2025)
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        charger:
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        charger:
109          type: object
110          properties:
111            compatible:
112              const: ti,twl6030-charger
113        gpadc:
114          type: object
115          properties:
116            compatible:
117              const: ti,twl6030-gpadc
118  - if:
119      properties:
120        compatible:
121          contains:
122            const: ti,twl6032
123    then:
124      patternProperties:
125        "^regulator-":
126          properties:
127            compatible:
128              enum:
129                - ti,twl6032-ldo1
130                - ti,twl6032-ldo2
131                - ti,twl6032-ldo3
132                - ti,twl6032-ldo4
133                - ti,twl6032-ldo5
134                - ti,twl6032-ldo6
135                - ti,twl6032-ldo7
136                - ti,twl6032-ldoln
137                - ti,twl6032-ldousb
138                - ti,twl6032-smps3
139                - ti,twl6032-smps4
140                - ti,twl6032-vio
141            regulator-initial-mode: false
142
143      properties:
144        charger:
145          type: object
146          properties:
147            compatible:
148              items:
149                - const: ti,twl6032-charger
150                - const: ti,twl6030-charger
151        gpadc:
152          type: object
153          properties:
154            compatible:
155              const: ti,twl6032-gpadc
156
157properties:
158  compatible:
159    description:
160      TWL4030 for integrated power-management/audio CODEC device used in OMAP3
161      based boards
162      TWL6030/32 for integrated power-management used in OMAP4 based boards
163    enum:
164      - ti,twl4030
165      - ti,twl6030
166      - ti,twl6032
167
168  reg:
169    maxItems: 1
170
171  interrupts:
172    maxItems: 1
173
174  interrupt-controller: true
175
176  system-power-controller: true
177
178  "#interrupt-cells":
179    const: 1
180
181  "#clock-cells":
182    const: 1
183
184  charger:
185    type: object
186    additionalProperties: true
187    properties:
188      compatible: true
189    required:
190      - compatible
191
192  rtc:
193    type: object
194    additionalProperties: false
195    properties:
196      compatible:
197        const: ti,twl4030-rtc
198      interrupts:
199        maxItems: 1
200
201patternProperties:
202  "^regulator-":
203    type: object
204    unevaluatedProperties: false
205    $ref: /schemas/regulator/regulator.yaml
206    properties:
207      compatible: true
208      regulator-initial-mode:
209        enum:
210          - 0x08 # Sleep mode, the nominal output voltage is maintained
211                 # with low power consumption with low load current capability
212          - 0x0e # Active mode, the regulator can deliver its nominal output
213                 # voltage with full-load current capability
214      ti,retain-on-reset:
215        description:
216          Does not turn off the supplies during warm
217          reset. Could be needed for VMMC, as TWL6030
218          reset sequence for this signal does not comply
219          with the SD specification.
220        type: boolean
221
222unevaluatedProperties: false
223
224required:
225  - compatible
226  - reg
227  - interrupts
228  - interrupt-controller
229  - "#interrupt-cells"
230
231examples:
232  - |
233    i2c {
234      #address-cells = <1>;
235      #size-cells = <0>;
236
237      pmic@48 {
238        compatible = "ti,twl6030";
239        reg = <0x48>;
240        interrupts = <39>; /* IRQ_SYS_1N cascaded to gic */
241        interrupt-parent = <&gic>;
242        interrupt-controller;
243        #interrupt-cells = <1>;
244
245        charger {
246          compatible = "ti,twl6030-charger";
247          interrupts = <2>, <5>;
248          io-channels = <&gpadc 10>;
249          io-channel-names = "vusb";
250          monitored-battery = <&bat>;
251        };
252
253        gpadc {
254          compatible = "ti,twl6030-gpadc";
255          interrupts = <6>;
256          #io-channel-cells = <1>;
257        };
258
259        rtc {
260          compatible = "ti,twl4030-rtc";
261          interrupts = <8>;
262        };
263
264        regulator-vaux1 {
265          compatible = "ti,twl6030-vaux1";
266          regulator-min-microvolt = <1000000>;
267          regulator-max-microvolt = <3000000>;
268        };
269
270        regulator-vmmc1 {
271          compatible = "ti,twl6030-vmmc";
272          ti,retain-on-reset;
273        };
274      };
275    };
276
277  - |
278    i2c {
279      #address-cells = <1>;
280      #size-cells = <0>;
281
282      pmic@48 {
283        compatible = "ti,twl4030";
284        reg = <0x48>;
285        interrupts = <7>; /* SYS_NIRQ cascaded to intc */
286        interrupt-parent = <&intc>;
287        interrupt-controller;
288        #interrupt-cells = <1>;
289
290        charger {
291          compatible = "ti,twl4030-bci";
292          interrupts = <9>, <2>;
293          bci3v1-supply = <&vusb3v1>;
294          io-channels = <&twl_madc 11>;
295          io-channel-names = "vac";
296        };
297
298        twl_madc: madc {
299          compatible = "ti,twl4030-madc";
300          interrupts = <3>;
301          #io-channel-cells = <1>;
302        };
303
304        pwrbutton {
305          compatible = "ti,twl4030-pwrbutton";
306          interrupts = <8>;
307        };
308
309        rtc {
310          compatible = "ti,twl4030-rtc";
311          interrupts = <11>;
312        };
313
314        regulator-vaux1 {
315          compatible = "ti,twl4030-vaux1";
316          regulator-min-microvolt = <1000000>;
317          regulator-max-microvolt = <3000000>;
318          regulator-initial-mode = <0xe>;
319        };
320
321        vusb3v1: regulator-vusb3v1 {
322          compatible = "ti,twl4030-vusb3v1";
323        };
324
325        watchdog {
326          compatible = "ti,twl4030-wdt";
327        };
328      };
329    };
330...
331