Skip to content

Commit 62e4f33

Browse files
akemnadebroonie
authored andcommitted
dt-bindings: regulator: twl-regulator: convert to yaml
Convert the regulator bindings to yaml. Drop one twl5030 compatible due to no documentation on mfd side and no users of the twl5030. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://msgid.link/r/20240606111611.371463-1-andreas@kemnade.info Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 168ed1e commit 62e4f33

2 files changed

Lines changed: 164 additions & 82 deletions

File tree

Documentation/devicetree/bindings/mfd/ti,twl.yaml

Lines changed: 164 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,32 @@ allOf:
2222
contains:
2323
const: ti,twl4030
2424
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+
2551
properties:
2652
madc:
2753
type: object
@@ -50,13 +76,34 @@ allOf:
5076
properties:
5177
compatible:
5278
const: ti,twl4030-wdt
53-
5479
- if:
5580
properties:
5681
compatible:
5782
contains:
5883
const: ti,twl6030
5984
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+
60107
properties:
61108
gpadc:
62109
type: object
@@ -69,6 +116,25 @@ allOf:
69116
contains:
70117
const: ti,twl6032
71118
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+
72138
properties:
73139
gpadc:
74140
type: object
@@ -112,6 +178,27 @@ properties:
112178
interrupts:
113179
maxItems: 1
114180

181+
patternProperties:
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+
115202
unevaluatedProperties: false
116203

117204
required:
@@ -131,9 +218,84 @@ examples:
131218
compatible = "ti,twl6030";
132219
reg = <0x48>;
133220
interrupts = <39>; /* IRQ_SYS_1N cascaded to gic */
221+
interrupt-parent = <&gic>;
134222
interrupt-controller;
135223
#interrupt-cells = <1>;
136-
interrupt-parent = <&gic>;
224+
225+
gpadc {
226+
compatible = "ti,twl6030-gpadc";
227+
interrupts = <6>;
228+
};
229+
230+
rtc {
231+
compatible = "ti,twl4030-rtc";
232+
interrupts = <8>;
233+
};
234+
235+
regulator-vaux1 {
236+
compatible = "ti,twl6030-vaux1";
237+
regulator-min-microvolt = <1000000>;
238+
regulator-max-microvolt = <3000000>;
239+
};
240+
241+
regulator-vmmc1 {
242+
compatible = "ti,twl6030-vmmc";
243+
ti,retain-on-reset;
244+
};
137245
};
138246
};
139247
248+
- |
249+
i2c {
250+
#address-cells = <1>;
251+
#size-cells = <0>;
252+
253+
pmic@48 {
254+
compatible = "ti,twl4030";
255+
reg = <0x48>;
256+
interrupts = <7>; /* SYS_NIRQ cascaded to intc */
257+
interrupt-parent = <&intc>;
258+
interrupt-controller;
259+
#interrupt-cells = <1>;
260+
261+
bci {
262+
compatible = "ti,twl4030-bci";
263+
interrupts = <9>, <2>;
264+
bci3v1-supply = <&vusb3v1>;
265+
io-channels = <&twl_madc 11>;
266+
io-channel-names = "vac";
267+
};
268+
269+
twl_madc: madc {
270+
compatible = "ti,twl4030-madc";
271+
interrupts = <3>;
272+
#io-channel-cells = <1>;
273+
};
274+
275+
pwrbutton {
276+
compatible = "ti,twl4030-pwrbutton";
277+
interrupts = <8>;
278+
};
279+
280+
rtc {
281+
compatible = "ti,twl4030-rtc";
282+
interrupts = <11>;
283+
};
284+
285+
regulator-vaux1 {
286+
compatible = "ti,twl4030-vaux1";
287+
regulator-min-microvolt = <1000000>;
288+
regulator-max-microvolt = <3000000>;
289+
regulator-initial-mode = <0xe>;
290+
};
291+
292+
vusb3v1: regulator-vusb3v1 {
293+
compatible = "ti,twl4030-vusb3v1";
294+
};
295+
296+
watchdog {
297+
compatible = "ti,twl4030-wdt";
298+
};
299+
};
300+
};
301+
...

Documentation/devicetree/bindings/regulator/twl-regulator.txt

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)