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