]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - Bindings/regulator/qcom,rpmh-regulator.txt
Import devicetree files from Linux 5.4
[FreeBSD/FreeBSD.git] / Bindings / regulator / qcom,rpmh-regulator.txt
1 Qualcomm Technologies, Inc. RPMh Regulators
2
3 rpmh-regulator devices support PMIC regulator management via the Voltage
4 Regulator Manager (VRM) and Oscillator Buffer (XOB) RPMh accelerators.  The APPS
5 processor communicates with these hardware blocks via a Resource State
6 Coordinator (RSC) using command packets.  The VRM allows changing three
7 parameters for a given regulator: enable state, output voltage, and operating
8 mode.  The XOB allows changing only a single parameter for a given regulator:
9 its enable state.  Despite its name, the XOB is capable of controlling the
10 enable state of any PMIC peripheral.  It is used for clock buffers, low-voltage
11 switches, and LDO/SMPS regulators which have a fixed voltage and mode.
12
13 =======================
14 Required Node Structure
15 =======================
16
17 RPMh regulators must be described in two levels of device nodes.  The first
18 level describes the PMIC containing the regulators and must reside within an
19 RPMh device node.  The second level describes each regulator within the PMIC
20 which is to be used on the board.  Each of these regulators maps to a single
21 RPMh resource.
22
23 The names used for regulator nodes must match those supported by a given PMIC.
24 Supported regulator node names:
25         PM8005:         smps1 - smps4
26         PM8009:         smps1 - smps2, ldo1 - ldo7
27         PM8150:         smps1 - smps10, ldo1 - ldo18
28         PM8150L:        smps1 - smps8, ldo1 - ldo11, bob, flash, rgb
29         PM8998:         smps1 - smps13, ldo1 - ldo28, lvs1 - lvs2
30         PMI8998:        bob
31
32 ========================
33 First Level Nodes - PMIC
34 ========================
35
36 - compatible
37         Usage:      required
38         Value type: <string>
39         Definition: Must be one of below:
40                     "qcom,pm8005-rpmh-regulators"
41                     "qcom,pm8009-rpmh-regulators"
42                     "qcom,pm8150-rpmh-regulators"
43                     "qcom,pm8150l-rpmh-regulators"
44                     "qcom,pm8998-rpmh-regulators"
45                     "qcom,pmi8998-rpmh-regulators"
46
47 - qcom,pmic-id
48         Usage:      required
49         Value type: <string>
50         Definition: RPMh resource name suffix used for the regulators found on
51                     this PMIC.  Typical values: "a", "b", "c", "d", "e", "f".
52
53 - vdd-s1-supply
54 - vdd-s2-supply
55 - vdd-s3-supply
56 - vdd-s4-supply
57         Usage:      optional (PM8998 and PM8005 only)
58         Value type: <phandle>
59         Definition: phandle of the parent supply regulator of one or more of the
60                     regulators for this PMIC.
61
62 - vdd-s5-supply
63 - vdd-s6-supply
64 - vdd-s7-supply
65 - vdd-s8-supply
66 - vdd-s9-supply
67 - vdd-s10-supply
68 - vdd-s11-supply
69 - vdd-s12-supply
70 - vdd-s13-supply
71 - vdd-l1-l27-supply
72 - vdd-l2-l8-l17-supply
73 - vdd-l3-l11-supply
74 - vdd-l4-l5-supply
75 - vdd-l6-supply
76 - vdd-l7-l12-l14-l15-supply
77 - vdd-l9-supply
78 - vdd-l10-l23-l25-supply
79 - vdd-l13-l19-l21-supply
80 - vdd-l16-l28-supply
81 - vdd-l18-l22-supply
82 - vdd-l20-l24-supply
83 - vdd-l26-supply
84 - vin-lvs-1-2-supply
85         Usage:      optional (PM8998 only)
86         Value type: <phandle>
87         Definition: phandle of the parent supply regulator of one or more of the
88                     regulators for this PMIC.
89
90 - vdd-bob-supply
91         Usage:      optional (PMI8998 only)
92         Value type: <phandle>
93         Definition: BOB regulator parent supply phandle
94
95 ===============================
96 Second Level Nodes - Regulators
97 ===============================
98
99 - qcom,always-wait-for-ack
100         Usage:      optional
101         Value type: <empty>
102         Definition: Boolean flag which indicates that the application processor
103                     must wait for an ACK or a NACK from RPMh for every request
104                     sent for this regulator including those which are for a
105                     strictly lower power state.
106
107 Other properties defined in Documentation/devicetree/bindings/regulator/regulator.txt
108 may also be used.  regulator-initial-mode and regulator-allowed-modes may be
109 specified for VRM regulators using mode values from
110 include/dt-bindings/regulator/qcom,rpmh-regulator.h.  regulator-allow-bypass
111 may be specified for BOB type regulators managed via VRM.
112 regulator-allow-set-load may be specified for LDO type regulators managed via
113 VRM.
114
115 ========
116 Examples
117 ========
118
119 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
120
121 &apps_rsc {
122         pm8998-rpmh-regulators {
123                 compatible = "qcom,pm8998-rpmh-regulators";
124                 qcom,pmic-id = "a";
125
126                 vdd-l7-l12-l14-l15-supply = <&pm8998_s5>;
127
128                 smps2 {
129                         regulator-min-microvolt = <1100000>;
130                         regulator-max-microvolt = <1100000>;
131                 };
132
133                 pm8998_s5: smps5 {
134                         regulator-min-microvolt = <1904000>;
135                         regulator-max-microvolt = <2040000>;
136                 };
137
138                 ldo7 {
139                         regulator-min-microvolt = <1800000>;
140                         regulator-max-microvolt = <1800000>;
141                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
142                         regulator-allowed-modes =
143                                 <RPMH_REGULATOR_MODE_LPM
144                                  RPMH_REGULATOR_MODE_HPM>;
145                         regulator-allow-set-load;
146                 };
147
148                 lvs1 {
149                         regulator-min-microvolt = <1800000>;
150                         regulator-max-microvolt = <1800000>;
151                 };
152         };
153
154         pmi8998-rpmh-regulators {
155                 compatible = "qcom,pmi8998-rpmh-regulators";
156                 qcom,pmic-id = "b";
157
158                 bob {
159                         regulator-min-microvolt = <3312000>;
160                         regulator-max-microvolt = <3600000>;
161                         regulator-allowed-modes =
162                                 <RPMH_REGULATOR_MODE_AUTO
163                                  RPMH_REGULATOR_MODE_HPM>;
164                         regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
165                 };
166         };
167 };