Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[linux-2.6-microblaze.git] / Documentation / devicetree / 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         PM8350:         smps1 - smps12, ldo1 - ldo10,
30         PM8350C:        smps1 - smps10, ldo1 - ldo13, bob
31         PM8998:         smps1 - smps13, ldo1 - ldo28, lvs1 - lvs2
32         PMI8998:        bob
33         PM6150:         smps1 - smps5, ldo1 - ldo19
34         PM6150L:        smps1 - smps8, ldo1 - ldo11, bob
35         PMX55:          smps1 - smps7, ldo1 - ldo16
36
37 ========================
38 First Level Nodes - PMIC
39 ========================
40
41 - compatible
42         Usage:      required
43         Value type: <string>
44         Definition: Must be one of below:
45                     "qcom,pm8005-rpmh-regulators"
46                     "qcom,pm8009-rpmh-regulators"
47                     "qcom,pm8150-rpmh-regulators"
48                     "qcom,pm8150l-rpmh-regulators"
49                     "qcom,pm8350-rpmh-regulators"
50                     "qcom,pm8350c-rpmh-regulators"
51                     "qcom,pm8998-rpmh-regulators"
52                     "qcom,pmi8998-rpmh-regulators"
53                     "qcom,pm6150-rpmh-regulators"
54                     "qcom,pm6150l-rpmh-regulators"
55                     "qcom,pmx55-rpmh-regulators"
56
57 - qcom,pmic-id
58         Usage:      required
59         Value type: <string>
60         Definition: RPMh resource name suffix used for the regulators found on
61                     this PMIC.  Typical values: "a", "b", "c", "d", "e", "f".
62
63 - vdd-s1-supply
64 - vdd-s2-supply
65 - vdd-s3-supply
66 - vdd-s4-supply
67         Usage:      optional (PM8998 and PM8005 only)
68         Value type: <phandle>
69         Definition: phandle of the parent supply regulator of one or more of the
70                     regulators for this PMIC.
71
72 - vdd-s5-supply
73 - vdd-s6-supply
74 - vdd-s7-supply
75 - vdd-s8-supply
76 - vdd-s9-supply
77 - vdd-s10-supply
78 - vdd-s11-supply
79 - vdd-s12-supply
80 - vdd-s13-supply
81 - vdd-l1-l27-supply
82 - vdd-l2-l8-l17-supply
83 - vdd-l3-l11-supply
84 - vdd-l4-l5-supply
85 - vdd-l6-supply
86 - vdd-l7-l12-l14-l15-supply
87 - vdd-l9-supply
88 - vdd-l10-l23-l25-supply
89 - vdd-l13-l19-l21-supply
90 - vdd-l16-l28-supply
91 - vdd-l18-l22-supply
92 - vdd-l20-l24-supply
93 - vdd-l26-supply
94 - vin-lvs-1-2-supply
95         Usage:      optional (PM8998 only)
96         Value type: <phandle>
97         Definition: phandle of the parent supply regulator of one or more of the
98                     regulators for this PMIC.
99
100 - vdd-bob-supply
101         Usage:      optional (PMI8998 only)
102         Value type: <phandle>
103         Definition: BOB regulator parent supply phandle
104
105 ===============================
106 Second Level Nodes - Regulators
107 ===============================
108
109 - qcom,always-wait-for-ack
110         Usage:      optional
111         Value type: <empty>
112         Definition: Boolean flag which indicates that the application processor
113                     must wait for an ACK or a NACK from RPMh for every request
114                     sent for this regulator including those which are for a
115                     strictly lower power state.
116
117 Other properties defined in Documentation/devicetree/bindings/regulator/regulator.txt
118 may also be used.  regulator-initial-mode and regulator-allowed-modes may be
119 specified for VRM regulators using mode values from
120 include/dt-bindings/regulator/qcom,rpmh-regulator.h.  regulator-allow-bypass
121 may be specified for BOB type regulators managed via VRM.
122 regulator-allow-set-load may be specified for LDO type regulators managed via
123 VRM.
124
125 ========
126 Examples
127 ========
128
129 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
130
131 &apps_rsc {
132         pm8998-rpmh-regulators {
133                 compatible = "qcom,pm8998-rpmh-regulators";
134                 qcom,pmic-id = "a";
135
136                 vdd-l7-l12-l14-l15-supply = <&pm8998_s5>;
137
138                 smps2 {
139                         regulator-min-microvolt = <1100000>;
140                         regulator-max-microvolt = <1100000>;
141                 };
142
143                 pm8998_s5: smps5 {
144                         regulator-min-microvolt = <1904000>;
145                         regulator-max-microvolt = <2040000>;
146                 };
147
148                 ldo7 {
149                         regulator-min-microvolt = <1800000>;
150                         regulator-max-microvolt = <1800000>;
151                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
152                         regulator-allowed-modes =
153                                 <RPMH_REGULATOR_MODE_LPM
154                                  RPMH_REGULATOR_MODE_HPM>;
155                         regulator-allow-set-load;
156                 };
157
158                 lvs1 {
159                         regulator-min-microvolt = <1800000>;
160                         regulator-max-microvolt = <1800000>;
161                 };
162         };
163
164         pmi8998-rpmh-regulators {
165                 compatible = "qcom,pmi8998-rpmh-regulators";
166                 qcom,pmic-id = "b";
167
168                 bob {
169                         regulator-min-microvolt = <3312000>;
170                         regulator-max-microvolt = <3600000>;
171                         regulator-allowed-modes =
172                                 <RPMH_REGULATOR_MODE_AUTO
173                                  RPMH_REGULATOR_MODE_HPM>;
174                         regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
175                 };
176         };
177 };