smb: client: Fix minor whitespace errors and warnings
[linux-modified.git] / Documentation / devicetree / bindings / regulator / qcom,rpmh-regulator.yaml
1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/regulator/qcom,rpmh-regulator.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Qualcomm Technologies, Inc. RPMh Regulators
8
9 maintainers:
10   - Bjorn Andersson <bjorn.andersson@linaro.org>
11   - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
12
13 description: |
14     rpmh-regulator devices support PMIC regulator management via the Voltage
15     Regulator Manager (VRM) and Oscillator Buffer (XOB) RPMh accelerators.
16     The APPS processor communicates with these hardware blocks via a
17     Resource State Coordinator (RSC) using command packets.  The VRM allows
18     changing three parameters for a given regulator, enable state, output
19     voltage, and operating mode.  The XOB allows changing only a single
20     parameter for a given regulator, its enable state.  Despite its name,
21     the XOB is capable of controlling the enable state of any PMIC peripheral.
22     It is used for clock buffers, low-voltage switches, and LDO/SMPS regulators
23     which have a fixed voltage and mode.
24
25     =======================
26     Required Node Structure
27     =======================
28
29     RPMh regulators must be described in two levels of device nodes.  The first
30     level describes the PMIC containing the regulators and must reside within an
31     RPMh device node.  The second level describes each regulator within the PMIC
32     which is to be used on the board.  Each of these regulators maps to a single
33     RPMh resource.
34
35     The names used for regulator nodes must match those supported by a given
36     PMIC. Supported regulator node names are
37       For PM6150, smps1 - smps5, ldo1 - ldo19
38       For PM6150L, smps1 - smps8, ldo1 - ldo11, bob
39       For PM6350, smps1 - smps5, ldo1 - ldo22
40       For PM660, smps1 - smps6, ldo1 - ldo3, ldo5 - ldo19
41       For PM660L, smps1 - smps3, smps5, ldo1 - ldo8, bob
42       For PM7325, smps1 - smps8, ldo1 - ldo19
43       For PM8005, smps1 - smps4
44       For PM8009, smps1 - smps2, ldo1 - ldo7
45       For PM8150, smps1 - smps10, ldo1 - ldo18
46       For PM8150L, smps1 - smps8, ldo1 - ldo11, bob, flash, rgb
47       For PM8350, smps1 - smps12, ldo1 - ldo10
48       For PM8350C, smps1 - smps10, ldo1 - ldo13, bob
49       For PM8450, smps1 - smps6, ldo1 - ldo4
50       For PM8550, smps1 - smps6, ldo1 - ldo17, bob1 - bob2
51       For PM8998, smps1 - smps13, ldo1 - ldo28, lvs1 - lvs2
52       For PMI8998, bob
53       For PMC8380, smps1 - smps8, ldo1 - lodo3
54       For PMR735A, smps1 - smps3, ldo1 - ldo7
55       For PMX55, smps1 - smps7, ldo1 - ldo16
56       For PMX65, smps1 - smps8, ldo1 - ldo21
57       For PMX75, smps1 - smps10, ldo1 - ldo21
58
59 properties:
60   compatible:
61     enum:
62       - qcom,pm6150-rpmh-regulators
63       - qcom,pm6150l-rpmh-regulators
64       - qcom,pm6350-rpmh-regulators
65       - qcom,pm660-rpmh-regulators
66       - qcom,pm660l-rpmh-regulators
67       - qcom,pm7325-rpmh-regulators
68       - qcom,pm8005-rpmh-regulators
69       - qcom,pm8009-rpmh-regulators
70       - qcom,pm8009-1-rpmh-regulators
71       - qcom,pm8150-rpmh-regulators
72       - qcom,pm8150l-rpmh-regulators
73       - qcom,pm8350-rpmh-regulators
74       - qcom,pm8350c-rpmh-regulators
75       - qcom,pm8450-rpmh-regulators
76       - qcom,pm8550-rpmh-regulators
77       - qcom,pm8550ve-rpmh-regulators
78       - qcom,pm8550vs-rpmh-regulators
79       - qcom,pm8998-rpmh-regulators
80       - qcom,pmc8180-rpmh-regulators
81       - qcom,pmc8180c-rpmh-regulators
82       - qcom,pmc8380-rpmh-regulators
83       - qcom,pmg1110-rpmh-regulators
84       - qcom,pmi8998-rpmh-regulators
85       - qcom,pmm8155au-rpmh-regulators
86       - qcom,pmm8654au-rpmh-regulators
87       - qcom,pmr735a-rpmh-regulators
88       - qcom,pmx55-rpmh-regulators
89       - qcom,pmx65-rpmh-regulators
90       - qcom,pmx75-rpmh-regulators
91
92   qcom,pmic-id:
93     description: |
94         RPMh resource name suffix used for the regulators found
95         on this PMIC.
96     $ref: /schemas/types.yaml#/definitions/string
97     enum: [a, b, c, d, e, f, g, h, i, j, k, l, m, n]
98
99   qcom,always-wait-for-ack:
100     description: |
101         Boolean flag which indicates that the application processor
102         must wait for an ACK or a NACK from RPMh for every request
103         sent for this regulator including those which are for a
104         strictly lower power state.
105     $ref: /schemas/types.yaml#/definitions/flag
106
107   vdd-flash-supply:
108     description: Input supply phandle of flash.
109
110   vdd-rgb-supply:
111     description: Input supply phandle of rgb.
112
113   bob:
114     type: object
115     $ref: regulator.yaml#
116     unevaluatedProperties: false
117     description: BOB regulator node.
118     dependencies:
119       regulator-allow-set-load: [ regulator-allowed-modes ]
120
121 patternProperties:
122   "^(smps|ldo|lvs|bob)[0-9]+$":
123     type: object
124     $ref: regulator.yaml#
125     unevaluatedProperties: false
126     description: smps/ldo regulator nodes(s).
127     dependencies:
128       regulator-allow-set-load: [ regulator-allowed-modes ]
129
130 required:
131   - compatible
132   - qcom,pmic-id
133
134 allOf:
135   - if:
136       properties:
137         compatible:
138           enum:
139             - qcom,pm6150-rpmh-regulators
140     then:
141       properties:
142         vdd-l2-l3-supply: true
143         vdd-l4-l7-l8-supply: true
144         vdd-l5-l16-l17-l18-l19-supply: true
145         vdd-l10-l14-l15-supply: true
146         vdd-l11-l12-l13-supply: true
147       patternProperties:
148         "^vdd-l[169]-supply$": true
149         "^vdd-s[1-5]-supply$": true
150
151   - if:
152       properties:
153         compatible:
154           enum:
155             - qcom,pm6150l-rpmh-regulators
156             - qcom,pm8150l-rpmh-regulators
157             - qcom,pmc8180c-rpmh-regulators
158     then:
159       properties:
160         vdd-bob-supply:
161           description: BOB regulator parent supply phandle.
162         vdd-l1-l8-supply: true
163         vdd-l2-l3-supply: true
164         vdd-l4-l5-l6-supply: true
165         vdd-l7-l11-supply: true
166         vdd-l9-l10-supply: true
167       patternProperties:
168         "^vdd-s[1-8]-supply$": true
169
170   - if:
171       properties:
172         compatible:
173           enum:
174             - qcom,pm660-rpmh-regulators
175     then:
176       properties:
177         vdd-l1-l6-l7-supply: true
178         vdd-l2-l3-supply: true
179         vdd-l5-supply: true
180         vdd-l8-l9-l10-l11-l12-l13-l14-supply: true
181         vdd-l15-l16-l17-l18-l19-supply: true
182       patternProperties:
183         "^vdd-s[1-6]-supply$": true
184
185   - if:
186       properties:
187         compatible:
188           enum:
189             - qcom,pm660l-rpmh-regulators
190     then:
191       properties:
192         vdd-bob-supply:
193           description: BOB regulator parent supply phandle.
194         vdd-l1-l9-l10-supply: true
195         vdd-l2-supply: true
196         vdd-l3-l5-l7-l8-supply: true
197         vdd-l4-l6-supply: true
198         vdd-s3-s4-supply: true
199       patternProperties:
200         "^vdd-s[125]-supply$": true
201
202   - if:
203       properties:
204         compatible:
205           enum:
206             - qcom,pm7325-rpmh-regulators
207     then:
208       properties:
209         vdd-l1-l4-l12-l15-supply: true
210         vdd-l2-l7-supply: true
211         vdd-l6-l9-l10-supply: true
212         vdd-l11-l17-l18-l19-supply: true
213         vdd-l13-supply: true
214         vdd-l14-l16-supply: true
215       patternProperties:
216         "^vdd-l[358]-supply$": true
217         "^vdd-s[1-8]-supply$": true
218
219   - if:
220       properties:
221         compatible:
222           enum:
223             - qcom,pm8005-rpmh-regulators
224     then:
225       patternProperties:
226         "^vdd-s[1-4]-supply$": true
227
228   - if:
229       properties:
230         compatible:
231           enum:
232             - qcom,pm8009-rpmh-regulators
233             - qcom,pm8009-1-rpmh-regulators
234     then:
235       properties:
236         vdd-l5-l6-supply: true
237       patternProperties:
238         "^vdd-l[1-47]-supply$": true
239         "^vdd-s[1-2]-supply$": true
240
241   - if:
242       properties:
243         compatible:
244           enum:
245             - qcom,pm8150-rpmh-regulators
246             - qcom,pmc8180-rpmh-regulators
247             - qcom,pmm8155au-rpmh-regulators
248     then:
249       properties:
250         vdd-l1-l8-l11-supply: true
251         vdd-l2-l10-supply: true
252         vdd-l3-l4-l5-l18-supply: true
253         vdd-l6-l9-supply: true
254         vdd-l7-l12-l14-l15-supply: true
255         vdd-l13-l16-l17-supply: true
256       patternProperties:
257         "^vdd-s([1-9]|10)-supply$": true
258
259   - if:
260       properties:
261         compatible:
262           enum:
263             - qcom,pmm8654au-rpmh-regulators
264     then:
265       properties:
266         vdd-l1-supply: true
267         vdd-l2-l3-supply: true
268         vdd-l4-supply: true
269         vdd-l5-supply: true
270         vdd-l6-l7-supply: true
271         vdd-l8-l9-supply: true
272       patternProperties:
273         "^vdd-s[1-9]-supply$": true
274
275   - if:
276       properties:
277         compatible:
278           enum:
279             - qcom,pm8350-rpmh-regulators
280     then:
281       properties:
282         vdd-l1-l4-supply: true
283         vdd-l2-l7-supply: true
284         vdd-l3-l5-supply: true
285         vdd-l6-l9-l10-supply: true
286         vdd-l8-supply: true
287       patternProperties:
288         "^vdd-s([1-9]|1[0-2])-supply$": true
289
290   - if:
291       properties:
292         compatible:
293           enum:
294             - qcom,pm8350c-rpmh-regulators
295     then:
296       properties:
297         vdd-bob-supply:
298           description: BOB regulator parent supply phandle.
299         vdd-l1-l12-supply: true
300         vdd-l2-l8-supply: true
301         vdd-l3-l4-l5-l7-l13-supply: true
302         vdd-l6-l9-l11-supply: true
303         vdd-l10-supply: true
304       patternProperties:
305         "^vdd-s([1-9]|10)-supply$": true
306
307   - if:
308       properties:
309         compatible:
310           enum:
311             - qcom,pm8450-rpmh-regulators
312     then:
313       patternProperties:
314         "^vdd-l[1-4]-supply$": true
315         "^vdd-s[1-6]-supply$": true
316
317   - if:
318       properties:
319         compatible:
320           enum:
321             - qcom,pm8550-rpmh-regulators
322     then:
323       properties:
324         vdd-l1-l4-l10-supply: true
325         vdd-l2-l13-l14-supply: true
326         vdd-l5-l16-supply: true
327         vdd-l6-l7-supply: true
328         vdd-l8-l9-supply: true
329       patternProperties:
330         "^vdd-l(3|1[1-7])-supply$": true
331         "^vdd-s[1-6]-supply$": true
332         "^vdd-bob[1-2]-supply$": true
333
334   - if:
335       properties:
336         compatible:
337           enum:
338             - qcom,pm8550ve-rpmh-regulators
339             - qcom,pm8550vs-rpmh-regulators
340     then:
341       patternProperties:
342         "^vdd-l[1-3]-supply$": true
343         "^vdd-s[1-6]-supply$": true
344
345   - if:
346       properties:
347         compatible:
348           enum:
349             - qcom,pm8998-rpmh-regulators
350     then:
351       properties:
352         vdd-l1-l27-supply: true
353         vdd-l2-l8-l17-supply: true
354         vdd-l3-l11-supply: true
355         vdd-l4-l5-supply: true
356         vdd-l6-supply: true
357         vdd-l7-l12-l14-l15-supply: true
358         vdd-l9-supply: true
359         vdd-l10-l23-l25-supply: true
360         vdd-l13-l19-l21-supply: true
361         vdd-l16-l28-supply: true
362         vdd-l18-l22-supply: true
363         vdd-l20-l24-supply: true
364         vdd-l26-supply: true
365         vin-lvs-1-2-supply: true
366       patternProperties:
367         "^vdd-s([1-9]|1[0-3])-supply$": true
368
369   - if:
370       properties:
371         compatible:
372           enum:
373             - qcom,pmc8380-rpmh-regulators
374     then:
375       patternProperties:
376         "^vdd-l[1-3]-supply$": true
377         "^vdd-s[1-8]-supply$": true
378
379   - if:
380       properties:
381         compatible:
382           enum:
383             - qcom,pmg1110-rpmh-regulators
384     then:
385       properties:
386         vdd-s1-supply: true
387
388   - if:
389       properties:
390         compatible:
391           enum:
392             - qcom,pmi8998-rpmh-regulators
393     then:
394       properties:
395         vdd-bob-supply:
396           description: BOB regulator parent supply phandle.
397
398   - if:
399       properties:
400         compatible:
401           enum:
402             - qcom,pmr735a-rpmh-regulators
403     then:
404       properties:
405         vdd-l1-l2-supply: true
406         vdd-l3-supply: true
407         vdd-l4-supply: true
408         vdd-l5-l6-supply: true
409         vdd-l7-bob-supply: true
410       patternProperties:
411         "^vdd-s[1-3]-supply$": true
412
413   - if:
414       properties:
415         compatible:
416           enum:
417             - qcom,pmx55-rpmh-regulators
418     then:
419       properties:
420         vdd-l1-l2-supply: true
421         vdd-l3-l9-supply: true
422         vdd-l4-l12-supply: true
423         vdd-l5-l6-supply: true
424         vdd-l7-l8-supply: true
425         vdd-l10-l11-l13-supply: true
426       patternProperties:
427         "^vdd-l1[4-6]-supply$": true
428         "^vdd-s[1-7]-supply$": true
429
430   - if:
431       properties:
432         compatible:
433           enum:
434             - qcom,pmx65-rpmh-regulators
435     then:
436       properties:
437         vdd-l2-l18-supply: true
438         vdd-l5-l6-l16-supply: true
439         vdd-l8-l9-supply: true
440         vdd-l11-l13-supply: true
441       patternProperties:
442         "^vdd-l[1347]-supply$": true
443         "^vdd-l1[024579]-supply$": true
444         "^vdd-l2[01]-supply$": true
445         "^vdd-s[1-8]-supply$": true
446
447   - if:
448       properties:
449         compatible:
450           enum:
451             - qcom,pmx75-rpmh-regulators
452     then:
453       properties:
454         vdd-l2-l18-supply: true
455         vdd-l4-l16-supply: true
456         vdd-l5-l6-supply: true
457         vdd-l8-l9-supply: true
458         vdd-l11-l13-supply: true
459         vdd-l20-l21-supply: true
460       patternProperties:
461         "^vdd-l[137]-supply$": true
462         "^vdd-l1[024579]-supply$": true
463         "^vdd-s([1-9]|10)-supply$": true
464
465 unevaluatedProperties: false
466
467 examples:
468   - |
469     #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
470
471     pm8998-rpmh-regulators {
472         compatible = "qcom,pm8998-rpmh-regulators";
473         qcom,pmic-id = "a";
474
475         vdd-l7-l12-l14-l15-supply = <&pm8998_s5>;
476
477         smps2 {
478             regulator-min-microvolt = <1100000>;
479             regulator-max-microvolt = <1100000>;
480         };
481
482         ldo7 {
483             regulator-min-microvolt = <1800000>;
484             regulator-max-microvolt = <1800000>;
485             regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
486             regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
487                                        RPMH_REGULATOR_MODE_HPM>;
488             regulator-allow-set-load;
489         };
490
491         lvs1 {
492             regulator-min-microvolt = <1800000>;
493             regulator-max-microvolt = <1800000>;
494         };
495     };
496
497     pmi8998-rpmh-regulators {
498         compatible = "qcom,pmi8998-rpmh-regulators";
499         qcom,pmic-id = "b";
500
501         bob {
502             regulator-min-microvolt = <3312000>;
503             regulator-max-microvolt = <3600000>;
504             regulator-allowed-modes = <RPMH_REGULATOR_MODE_AUTO
505                                        RPMH_REGULATOR_MODE_HPM>;
506             regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
507         };
508     };
509 ...