blob: ccefc98e51e5b3c7dceeae56b4027015c964609d [file] [log] [blame]
Kiran Gundaf9d484ef2017-10-16 12:15:30 +05301Qualcomm RPM Regulators
2
3rpm-regulator-smd is a regulator driver which supports regulators inside of
4PMICs which are controlled by the RPM processor. Communication with the RPM
5processor takes place over SMD.
6
7Required structure:
8- RPM regulators must be described in two levels of devices nodes. The first
9 level describes the interface with the RPM. The second level describes
10 properties of one regulator framework interface (of potentially many) to
11 the regulator.
12
13[First Level Nodes]
14
15Required properties:
16- compatible: Must be "qcom,rpm-smd-regulator-resource"
17- qcom,resource-name: Resource name string for this regulator to be used in RPM
18 transactions. Length is 4 characters max.
19- qcom,resource-id: Resource instance ID for this regulator to be used in RPM
20 transactions.
21- qcom,regulator-type: Type of this regulator. Supported values are:
22 0 = LDO
23 1 = SMPS
24 2 = VS
25 3 = NCP
26 4 = Buck or Boost (BoB)
27
28Optional properties:
29- qcom,allow-atomic: Flag specifying if atomic access is allowed for this
30 regulator. Supported values are:
31 0 or not present = mutex locks used
32 1 = spinlocks used
33- qcom,enable-time: Time in us to delay after enabling the regulator
34- qcom,hpm-min-load: Load current in uA which corresponds to the minimum load
35 which requires the regulator to be in high power mode.
36- qcom,apps-only: Flag which indicates that the regulator only has
37 consumers on the application processor. If this flag
38 is specified, then voltage and current updates are
39 only sent to the RPM if the regulator is enabled.
40- qcom,always-wait-for-ack: Flag which indicates that the application
41 processor must wait for an ACK or a NACK from the RPM
42 for every request sent for this regulator including
43 those which are for a strictly lower power state.
44
45[Second Level Nodes]
46
47Required properties:
48- compatible: Must be "qcom,rpm-smd-regulator"
49- regulator-name: A string used as a descriptive name for regulator outputs
50- qcom,set: Specifies which sets that requests made with this
51 regulator interface should be sent to. Regulator
52 requests sent in the active set take effect immediately.
53 Requests sent in the sleep set take effect when the Apps
54 processor transitions into RPM assisted power collapse.
55 Supported values are:
56 1 = Active set only
57 2 = Sleep set only
58 3 = Both active and sleep sets
59
60
61
62Optional properties:
63- parent-supply: phandle to the parent supply/regulator node
64- qcom,system-load: Load in uA present on regulator that is not
65 captured by any consumer request
66- qcom,use-voltage-corner: Flag that signifies if regulator_set_voltage
67 calls should modify the corner parameter instead
68 of the voltage parameter. When used, voltages
69 specified inside of the regulator framework
70 represent corners that have been incremented by
71 1. This value shift is necessary to work around
72 limitations in the regulator framework which
73 treat 0 uV as an error.
74- qcom,use-voltage-floor-corner: Flag that signifies if regulator_set_voltage
75 calls should modify the floor corner parameter
76 instead of the voltage parameter. When used,
77 voltages specified inside of the regulator
78 framework represent corners that have been
79 incremented by 1. The properties
80 qcom,use-voltage-corner and
81 qcom,use-voltage-floor-corner are mutually
82 exclusive. Only one may be specified for a
83 given regulator.
84- qcom,use-voltage-level: Flag that signifies if regulator_set_voltage
85 calls should modify the level parameter instead
86 of the voltage parameter.
87- qcom,use-voltage-floor-level: Flag that signifies if regulator_set_voltage
88 calls should modify the floor level parameter
89 instead of the voltage parameter.
90 The properties qcom,use-voltage-level and
91 qcom,use-voltage-floor-level are mutually
92 exclusive. Only one may be specified for a
93 given regulator.
94- qcom,use-pin-ctrl-voltage1: Flag which indicates that updates to voltage
95 should be sent to the pin control voltage 1
96 parameter. Only one pin may be specified per
97 regulator. This property only applies to BoB
98 type regulators.
99- qcom,use-pin-ctrl-voltage2: Flag which indicates that updates to voltage
100 should be sent to the pin control voltage 2
101 parameter. Only one pin may be specified per
102 regulator. This property only applies to BoB
103 type regulators.
104- qcom,use-pin-ctrl-voltage3: Flag which indicates that updates to voltage
105 should be sent to the pin control voltage 3
106 parameter. Only one pin may be specified per
107 regulator. This property only applies to BoB
108 type regulators.
109- qcom,always-send-voltage: Flag which indicates that updates to the
110 voltage, voltage corner or voltage level set
111 point should always be sent immediately to the
112 RPM. If this flag is not specified, then
113 voltage set point updates are only sent if the
114 given regulator has also been enabled by a
115 Linux consumer.
116- qcom,always-send-current: Flag which indicates that updates to the load
117 current should always be sent immediately to the
118 RPM. If this flag is not specified, then load
119 current updates are only sent if the given
120 regulator has also been enabled by a Linux
121 consumer.
122- qcom,send-defaults: Boolean flag which indicates that the initial
123 parameter values should be sent to the RPM
124 before consumers make their own requests. If
125 this flag is not specified, then initial
126 parameters values will only be sent after some
127 consumer makes a request.
128- qcom,enable-with-pin-ctrl: Double in which the first element corresponds to
129 the pin control enable parameter value to send
130 when all consumers have requested the regulator
131 to be disabled. The second element corresponds
132 to the pin control enable parameter value to
133 send when any consumer has requested the
134 regulator to be enabled. Each element supports
135 the same set of values as the
136 qcom,init-pin-ctrl-enable property listed below.
137
138The following properties specify initial values for parameters to be sent to the
139RPM in regulator requests.
140- qcom,init-enable: 0 = regulator disabled
141 1 = regulator enabled
142- qcom,init-voltage: Voltage in uV
143- qcom,init-current: Current in mA
144- qcom,init-ldo-mode: Operating mode to be used with LDO regulators
145 Supported values are:
146 0 = mode determined by current requests
147 1 = force HPM (NPM)
148- qcom,init-smps-mode: Operating mode to be used with SMPS regulators
149 Supported values are:
150 0 = auto; hardware determines mode
151 1 = mode determined by current requests
152 2 = force HPM (PWM)
153- qcom,init-bob-mode: Operating mode to be used with BoB regulators
154 Supported values are:
155 0 = pass; use priority order
156 1 = force PFM
157 2 = auto; hardware determines mode
158 3 = force PWM
159- qcom,init-pin-ctrl-enable: Bit mask specifying which hardware pins should be
160 used to enable the regulator, if any; supported
161 bits are:
162 0 = ignore all hardware enable signals
163 BIT(0) = follow HW0_EN signal
164 BIT(1) = follow HW1_EN signal
165 BIT(2) = follow HW2_EN signal
166 BIT(3) = follow HW3_EN signal
167- qcom,init-pin-ctrl-mode: Bit mask specifying which hardware pins should be
168 used to force the regulator into high power
169 mode, if any. Supported bits are:
170 0 = ignore all hardware enable signals
171 BIT(0) = follow HW0_EN signal
172 BIT(1) = follow HW1_EN signal
173 BIT(2) = follow HW2_EN signal
174 BIT(3) = follow HW3_EN signal
175 BIT(4) = follow PMIC awake state
176- qcom,init-pin-ctrl-voltage1: Minimum voltage in micro-volts to use while pin
177 control 1 is enabled. This property only
178 applies to BoB type regulators.
179- qcom,init-pin-ctrl-voltage2: Minimum voltage in micro-volts to use while pin
180 control 2 is enabled. This property only
181 applies to BoB type regulators.
182- qcom,init-pin-ctrl-voltage3: Minimum voltage in micro-volts to use while pin
183 control 3 is enabled. This property only
184 applies to BoB type regulators.
185- qcom,init-frequency: Switching frequency divisor for SMPS regulators.
186 Supported values are n = 0 to 31 where
187 freq = 19.2 MHz / (n + 1).
188- qcom,init-head-room: Voltage head room in mV required for the
189 regulator. This head room value should be used
190 in situations where the device connected to the
191 output of the regulator has low noise tolerance.
192 Note that the RPM independently enforces a
193 safety head room value for subregulated LDOs
194 which is sufficient to account for LDO drop-out
195 voltage.
196- qcom,init-quiet-mode: Specify that quiet mode is needed for an SMPS
197 regulator in order to have lower output noise.
198 Supported values are:
199 0 = No quiet mode
200 1 = Quiet mode
201 2 = Super quiet mode
202- qcom,init-freq-reason: Consumer requiring specified frequency for an
203 SMPS regulator. Supported values are:
204 0 = None
205 1 = Bluetooth
206 2 = GPS
207 4 = WLAN
208 8 = WAN
209- qcom,init-voltage-corner: Performance corner to use in order to determine
210 voltage set point. This value corresponds to
211 the actual value that will be sent and is not
212 incremented by 1 like the values used inside of
213 the regulator framework. The meaning of corner
214 values is set by the RPM. It is possible that
215 different regulators on a given platform or
216 similar regulators on different platforms will
217 utilize different corner values. These are
218 corner values supported on MSM8974 for PMIC
219 PM8841 SMPS 2 (VDD_Dig); nominal voltages for
220 these corners are also shown:
221 0 = None (don't care)
222 1 = Retention (0.5000 V)
223 2 = SVS Krait (0.7250 V)
224 3 = SVS SOC (0.8125 V)
225 4 = Normal (0.9000 V)
226 5 = Turbo (0.9875 V)
227 6 = Super Turbo (1.0500 V)
228- qcom,init-disallow-bypass: Specify that bypass mode should not be used for a
229 given LDO regulator. When in bypass mode, an
230 LDO performs no regulation and acts as a simple
231 switch. The RPM can utilize this mode for an
232 LDO that is subregulated from an SMPS when it is
233 possible to reduce the SMPS voltage to the
234 desired LDO output level. Bypass mode may be
235 disallowed if lower LDO output noise is
236 required. Supported values are:
237 0 = Allow RPM to utilize LDO bypass mode
238 if possible
239 1 = Disallow LDO bypass mode
240- qcom,init-voltage-floor-corner: Minimum performance corner to use if any
241 processor in the system is awake. This property
242 supports the same values as
243 qcom,init-voltage-corner.
244- qcom,init-voltage-level: Performance level to use in order to determine
245 voltage set point. The meaning of level
246 values is set by the RPM. It is possible that
247 different regulators on a given platform or
248 similar regulators on different platforms will
249 utilize different level values. These are
250 level values supported on MSM8952 for PMIC
251 PM8952 SMPS 2 (VDD_Dig); nominal voltages for
252 these level are also shown:
253 16 = Retention (0.5000 V)
254 128 = SVS (1.0500 V)
255 192 = SVS+ (1.1550 V)
256 256 = Normal (1.2250 V)
257 320 = Normal+ (1.2875 V)
258 384 = Turbo (1.3500 V)
259- qcom,init-voltage-floor-level: Minimum performance level to use if any
260 processor in the system is awake. This property
261 supports the same values as
262 qcom,init-voltage-level.
263
264All properties specified within the core regulator framework can also be used in
265second level nodes. These bindings can be found in:
266Documentation/devicetree/bindings/regulator/regulator.txt.
267
268Examples:
269
270rpm-regulator-smpb1 {
271 qcom,resource-name = "smpb";
272 qcom,resource-id = <1>;
273 qcom,regulator-type = <1>;
274 qcom,hpm-min-load = <100000>;
275 compatible = "qcom,rpm-smd-regulator-resource";
276 status = "disabled";
277
278 pm8841_s1: regulator-s1 {
279 regulator-name = "8841_s1";
280 qcom,set = <3>;
281 regulator-min-microvolt = <900000>;
282 regulator-max-microvolt = <1150000>;
283 qcom,init-voltage = <1150000>;
284 compatible = "qcom,rpm-smd-regulator";
285 };
286 pm8841_s1_ao: regulator-s1-ao {
287 regulator-name = "8841_s1_ao";
288 qcom,set = <1>;
289 regulator-min-microvolt = <900000>;
290 regulator-max-microvolt = <1150000>;
291 compatible = "qcom,rpm-smd-regulator";
292 };
293 pm8841_s1_corner: regulator-s1-corner {
294 regulator-name = "8841_s1_corner";
295 qcom,set = <3>;
296 regulator-min-microvolt = <1>;
297 regulator-max-microvolt = <6>;
298 qcom,init-voltage-corner = <3>;
299 qcom,use-voltage-corner;
300 compatible = "qcom,rpm-smd-regulator";
301 };
302};
303
304rpm-regulator-ldoa2 {
305 qcom,resource-name = "ldoa";
306 qcom,resource-id = <2>;
307 qcom,regulator-type = <0>;
308 qcom,hpm-min-load = <10000>;
309 compatible = "qcom,rpm-smd-regulator-resource";
310
311 regulator-l2 {
312 compatible = "qcom,rpm-smd-regulator";
313 regulator-name = "8941_l2";
314 qcom,set = <3>;
315 regulator-min-microvolt = <1225000>;
316 regulator-max-microvolt = <1225000>;
317 qcom,init-voltage = <1225000>;
318 };
319 regulator-l2-pin-ctrl {
320 compatible = "qcom,rpm-smd-regulator";
321 regulator-name = "8941_l2_pin_ctrl";
322 qcom,set = <3>;
323 regulator-min-microvolt = <1225000>;
324 regulator-max-microvolt = <1225000>;
325 qcom,init-voltage = <1225000>;
326 qcom,enable-with-pin-ctrl = <0 1>;
327 };
328};