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
7title: Qualcomm Technologies, Inc. RPMh Regulators
8
9maintainers:
10  - Bjorn Andersson <bjorn.andersson@linaro.org>
11  - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
12
13description: |
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 PMR735A, smps1 - smps3, ldo1 - ldo7
54      For PMX55, smps1 - smps7, ldo1 - ldo16
55      For PMX65, smps1 - smps8, ldo1 - ldo21
56
57properties:
58  compatible:
59    enum:
60      - qcom,pm6150-rpmh-regulators
61      - qcom,pm6150l-rpmh-regulators
62      - qcom,pm6350-rpmh-regulators
63      - qcom,pm660-rpmh-regulators
64      - qcom,pm660l-rpmh-regulators
65      - qcom,pm7325-rpmh-regulators
66      - qcom,pm8005-rpmh-regulators
67      - qcom,pm8009-rpmh-regulators
68      - qcom,pm8009-1-rpmh-regulators
69      - qcom,pm8150-rpmh-regulators
70      - qcom,pm8150l-rpmh-regulators
71      - qcom,pm8350-rpmh-regulators
72      - qcom,pm8350c-rpmh-regulators
73      - qcom,pm8450-rpmh-regulators
74      - qcom,pm8550-rpmh-regulators
75      - qcom,pm8550ve-rpmh-regulators
76      - qcom,pm8550vs-rpmh-regulators
77      - qcom,pm8998-rpmh-regulators
78      - qcom,pmc8180-rpmh-regulators
79      - qcom,pmc8180c-rpmh-regulators
80      - qcom,pmg1110-rpmh-regulators
81      - qcom,pmi8998-rpmh-regulators
82      - qcom,pmm8155au-rpmh-regulators
83      - qcom,pmm8654au-rpmh-regulators
84      - qcom,pmr735a-rpmh-regulators
85      - qcom,pmx55-rpmh-regulators
86      - qcom,pmx65-rpmh-regulators
87
88  qcom,pmic-id:
89    description: |
90        RPMh resource name suffix used for the regulators found
91        on this PMIC.
92    $ref: /schemas/types.yaml#/definitions/string
93    enum: [a, b, c, d, e, f, g, h, k]
94
95  qcom,always-wait-for-ack:
96    description: |
97        Boolean flag which indicates that the application processor
98        must wait for an ACK or a NACK from RPMh for every request
99        sent for this regulator including those which are for a
100        strictly lower power state.
101    $ref: /schemas/types.yaml#/definitions/flag
102
103  vdd-flash-supply:
104    description: Input supply phandle of flash.
105
106  vdd-rgb-supply:
107    description: Input supply phandle of rgb.
108
109  bob:
110    type: object
111    $ref: regulator.yaml#
112    description: BOB regulator node.
113    dependencies:
114      regulator-allow-set-load: [ regulator-allowed-modes ]
115
116patternProperties:
117  "^(smps|ldo|lvs|bob)[0-9]+$":
118    type: object
119    $ref: regulator.yaml#
120    description: smps/ldo regulator nodes(s).
121    dependencies:
122      regulator-allow-set-load: [ regulator-allowed-modes ]
123
124required:
125  - compatible
126  - qcom,pmic-id
127
128allOf:
129  - if:
130      properties:
131        compatible:
132          enum:
133            - qcom,pm6150-rpmh-regulators
134    then:
135      properties:
136        vdd-l2-l3-supply: true
137        vdd-l4-l7-l8-supply: true
138        vdd-l5-l16-l17-l18-l19-supply: true
139        vdd-l10-l14-l15-supply: true
140        vdd-l11-l12-l13-supply: true
141      patternProperties:
142        "^vdd-l[169]-supply$": true
143        "^vdd-s[1-5]-supply$": true
144
145  - if:
146      properties:
147        compatible:
148          enum:
149            - qcom,pm6150l-rpmh-regulators
150            - qcom,pm8150l-rpmh-regulators
151            - qcom,pmc8180c-rpmh-regulators
152    then:
153      properties:
154        vdd-bob-supply:
155          description: BOB regulator parent supply phandle.
156        vdd-l1-l8-supply: true
157        vdd-l2-l3-supply: true
158        vdd-l4-l5-l6-supply: true
159        vdd-l7-l11-supply: true
160        vdd-l9-l10-supply: true
161      patternProperties:
162        "^vdd-s[1-8]-supply$": true
163
164  - if:
165      properties:
166        compatible:
167          enum:
168            - qcom,pm660-rpmh-regulators
169    then:
170      properties:
171        vdd-l1-l6-l7-supply: true
172        vdd-l2-l3-supply: true
173        vdd-l5-supply: true
174        vdd-l8-l9-l10-l11-l12-l13-l14-supply: true
175        vdd-l15-l16-l17-l18-l19-supply: true
176      patternProperties:
177        "^vdd-s[1-6]-supply$": true
178
179  - if:
180      properties:
181        compatible:
182          enum:
183            - qcom,pm660l-rpmh-regulators
184    then:
185      properties:
186        vdd-bob-supply:
187          description: BOB regulator parent supply phandle.
188        vdd-l1-l9-l10-supply: true
189        vdd-l2-supply: true
190        vdd-l3-l5-l7-l8-supply: true
191        vdd-l4-l6-supply: true
192        vdd-s3-s4-supply: true
193      patternProperties:
194        "^vdd-s[125]-supply$": true
195
196  - if:
197      properties:
198        compatible:
199          enum:
200            - qcom,pm7325-rpmh-regulators
201    then:
202      properties:
203        vdd-l1-l4-l12-l15-supply: true
204        vdd-l2-l7-supply: true
205        vdd-l6-l9-l10-supply: true
206        vdd-l11-l17-l18-l19-supply: true
207        vdd-l13-supply: true
208        vdd-l14-l16-supply: true
209      patternProperties:
210        "^vdd-l[358]-supply$": true
211        "^vdd-s[1-8]-supply$": true
212
213  - if:
214      properties:
215        compatible:
216          enum:
217            - qcom,pm8005-rpmh-regulators
218    then:
219      patternProperties:
220        "^vdd-s[1-4]-supply$": true
221
222  - if:
223      properties:
224        compatible:
225          enum:
226            - qcom,pm8009-rpmh-regulators
227            - qcom,pm8009-1-rpmh-regulators
228    then:
229      properties:
230        vdd-l5-l6-supply: true
231      patternProperties:
232        "^vdd-l[1-47]-supply$": true
233        "^vdd-s[1-2]-supply$": true
234
235  - if:
236      properties:
237        compatible:
238          enum:
239            - qcom,pm8150-rpmh-regulators
240            - qcom,pmc8180-rpmh-regulators
241            - qcom,pmm8155au-rpmh-regulators
242    then:
243      properties:
244        vdd-l1-l8-l11-supply: true
245        vdd-l2-l10-supply: true
246        vdd-l3-l4-l5-l18-supply: true
247        vdd-l6-l9-supply: true
248        vdd-l7-l12-l14-l15-supply: true
249        vdd-l13-l16-l17-supply: true
250      patternProperties:
251        "^vdd-s([1-9]|10)-supply$": true
252
253  - if:
254      properties:
255        compatible:
256          enum:
257            - qcom,pmm8654au-rpmh-regulators
258    then:
259      properties:
260        vdd-l1-supply: true
261        vdd-l2-l3-supply: true
262        vdd-l4-supply: true
263        vdd-l5-supply: true
264        vdd-l6-l7-supply: true
265        vdd-l8-l9-supply: true
266      patternProperties:
267        "^vdd-s[1-9]-supply$": true
268
269  - if:
270      properties:
271        compatible:
272          enum:
273            - qcom,pm8350-rpmh-regulators
274    then:
275      properties:
276        vdd-l1-l4-supply: true
277        vdd-l2-l7-supply: true
278        vdd-l3-l5-supply: true
279        vdd-l6-l9-l10-supply: true
280        vdd-l8-supply: true
281      patternProperties:
282        "^vdd-s([1-9]|1[0-2])-supply$": true
283
284  - if:
285      properties:
286        compatible:
287          enum:
288            - qcom,pm8350c-rpmh-regulators
289    then:
290      properties:
291        vdd-bob-supply:
292          description: BOB regulator parent supply phandle.
293        vdd-l1-l12-supply: true
294        vdd-l2-l8-supply: true
295        vdd-l3-l4-l5-l7-l13-supply: true
296        vdd-l6-l9-l11-supply: true
297        vdd-l10-supply: true
298      patternProperties:
299        "^vdd-s([1-9]|10)-supply$": true
300
301  - if:
302      properties:
303        compatible:
304          enum:
305            - qcom,pm8450-rpmh-regulators
306    then:
307      patternProperties:
308        "^vdd-l[1-4]-supply$": true
309        "^vdd-s[1-6]-supply$": true
310
311  - if:
312      properties:
313        compatible:
314          enum:
315            - qcom,pm8550-rpmh-regulators
316    then:
317      properties:
318        vdd-l1-l4-l10-supply: true
319        vdd-l2-l13-l14-supply: true
320        vdd-l5-l16-supply: true
321        vdd-l6-l7-supply: true
322        vdd-l8-l9-supply: true
323      patternProperties:
324        "^vdd-l(3|1[1-7])-supply$": true
325        "^vdd-s[1-6]-supply$": true
326        "^vdd-bob[1-2]-supply$": true
327
328  - if:
329      properties:
330        compatible:
331          enum:
332            - qcom,pm8550ve-rpmh-regulators
333            - qcom,pm8550vs-rpmh-regulators
334    then:
335      patternProperties:
336        "^vdd-l[1-3]-supply$": true
337        "^vdd-s[1-6]-supply$": true
338
339  - if:
340      properties:
341        compatible:
342          enum:
343            - qcom,pm8998-rpmh-regulators
344    then:
345      properties:
346        vdd-l1-l27-supply: true
347        vdd-l2-l8-l17-supply: true
348        vdd-l3-l11-supply: true
349        vdd-l4-l5-supply: true
350        vdd-l6-supply: true
351        vdd-l7-l12-l14-l15-supply: true
352        vdd-l9-supply: true
353        vdd-l10-l23-l25-supply: true
354        vdd-l13-l19-l21-supply: true
355        vdd-l16-l28-supply: true
356        vdd-l18-l22-supply: true
357        vdd-l20-l24-supply: true
358        vdd-l26-supply: true
359        vin-lvs-1-2-supply: true
360      patternProperties:
361        "^vdd-s([1-9]|1[0-3])-supply$": true
362
363  - if:
364      properties:
365        compatible:
366          enum:
367            - qcom,pmg1110-rpmh-regulators
368    then:
369      properties:
370        vdd-s1-supply: true
371
372  - if:
373      properties:
374        compatible:
375          enum:
376            - qcom,pmi8998-rpmh-regulators
377    then:
378      properties:
379        vdd-bob-supply:
380          description: BOB regulator parent supply phandle.
381
382  - if:
383      properties:
384        compatible:
385          enum:
386            - qcom,pmr735a-rpmh-regulators
387    then:
388      properties:
389        vdd-l1-l2-supply: true
390        vdd-l3-supply: true
391        vdd-l4-supply: true
392        vdd-l5-l6-supply: true
393        vdd-l7-bob-supply: true
394      patternProperties:
395        "^vdd-s[1-3]-supply$": true
396
397  - if:
398      properties:
399        compatible:
400          enum:
401            - qcom,pmx55-rpmh-regulators
402    then:
403      properties:
404        vdd-l1-l2-supply: true
405        vdd-l3-l9-supply: true
406        vdd-l4-l12-supply: true
407        vdd-l5-l6-supply: true
408        vdd-l7-l8-supply: true
409        vdd-l10-l11-l13-supply: true
410      patternProperties:
411        "^vdd-l1[4-6]-supply$": true
412        "^vdd-s[1-7]-supply$": true
413
414  - if:
415      properties:
416        compatible:
417          enum:
418            - qcom,pmx65-rpmh-regulators
419    then:
420      properties:
421        vdd-l2-l18-supply: true
422        vdd-l5-l6-l16-supply: true
423        vdd-l8-l9-supply: true
424        vdd-l11-l13-supply: true
425      patternProperties:
426        "^vdd-l[1347]-supply$": true
427        "^vdd-l1[0245789]-supply$": true
428        "^vdd-l2[01]-supply$": true
429        "^vdd-s[1-8]-supply$": true
430
431unevaluatedProperties: false
432
433examples:
434  - |
435    #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
436
437    pm8998-rpmh-regulators {
438        compatible = "qcom,pm8998-rpmh-regulators";
439        qcom,pmic-id = "a";
440
441        vdd-l7-l12-l14-l15-supply = <&pm8998_s5>;
442
443        smps2 {
444            regulator-min-microvolt = <1100000>;
445            regulator-max-microvolt = <1100000>;
446        };
447
448        ldo7 {
449            regulator-min-microvolt = <1800000>;
450            regulator-max-microvolt = <1800000>;
451            regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
452            regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
453                                       RPMH_REGULATOR_MODE_HPM>;
454            regulator-allow-set-load;
455        };
456
457        lvs1 {
458            regulator-min-microvolt = <1800000>;
459            regulator-max-microvolt = <1800000>;
460        };
461    };
462
463    pmi8998-rpmh-regulators {
464        compatible = "qcom,pmi8998-rpmh-regulators";
465        qcom,pmic-id = "b";
466
467        bob {
468            regulator-min-microvolt = <3312000>;
469            regulator-max-microvolt = <3600000>;
470            regulator-allowed-modes = <RPMH_REGULATOR_MODE_AUTO
471                                       RPMH_REGULATOR_MODE_HPM>;
472            regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
473        };
474    };
475...
476