xref: /freebsd/sys/contrib/device-tree/Bindings/regulator/qcom,spmi-regulator.txt (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1Qualcomm SPMI Regulators
2
3- compatible:
4	Usage: required
5	Value type: <string>
6	Definition: must be one of:
7			"qcom,pm8004-regulators"
8			"qcom,pm8005-regulators"
9			"qcom,pm8226-regulators"
10			"qcom,pm8841-regulators"
11			"qcom,pm8916-regulators"
12			"qcom,pm8941-regulators"
13			"qcom,pm8950-regulators"
14			"qcom,pm8994-regulators"
15			"qcom,pmi8994-regulators"
16			"qcom,pm660-regulators"
17			"qcom,pm660l-regulators"
18			"qcom,pms405-regulators"
19
20- interrupts:
21	Usage: optional
22	Value type: <prop-encoded-array>
23	Definition: List of OCP interrupts.
24
25- interrupt-names:
26	Usage: required if 'interrupts' property present
27	Value type: <string-array>
28	Definition: List of strings defining the names of the
29		    interrupts in the 'interrupts' property 1-to-1.
30		    Supported values are "ocp-<regulator_name>", where
31		    <regulator_name> corresponds to a voltage switch
32		    type regulator.
33
34- vdd_s1-supply:
35- vdd_s2-supply:
36- vdd_s3-supply:
37- vdd_s4-supply:
38- vdd_s5-supply:
39- vdd_s6-supply:
40- vdd_s7-supply:
41- vdd_s8-supply:
42	Usage: optional (pm8841 only)
43	Value type: <phandle>
44	Definition: Reference to regulator supplying the input pin, as
45		    described in the data sheet.
46
47- vdd_s1-supply:
48- vdd_s2-supply:
49- vdd_s3-supply:
50- vdd_s4-supply:
51- vdd_l1_l3-supply:
52- vdd_l2-supply:
53- vdd_l4_l5_l6-supply:
54- vdd_l7-supply:
55- vdd_l8_l11_l14_l15_l16-supply:
56- vdd_l9_l10_l12_l13_l17_l18-supply:
57	Usage: optional (pm8916 only)
58	Value type: <phandle>
59	Definition: Reference to regulator supplying the input pin, as
60		    described in the data sheet.
61
62- vdd_s1-supply:
63- vdd_s2-supply:
64- vdd_s3-supply:
65- vdd_l1_l3-supply:
66- vdd_l2_lvs_1_2_3-supply:
67- vdd_l4_l11-supply:
68- vdd_l5_l7-supply:
69- vdd_l6_l12_l14_l15-supply:
70- vdd_l8_l16_l18_19-supply:
71- vdd_l9_l10_l17_l22-supply:
72- vdd_l13_l20_l23_l24-supply:
73- vdd_l21-supply:
74- vin_5vs-supply:
75	Usage: optional (pm8941 only)
76	Value type: <phandle>
77	Definition: Reference to regulator supplying the input pin, as
78		    described in the data sheet.
79
80- vdd_s1-supply:
81- vdd_s2-supply:
82- vdd_s3-supply:
83- vdd_s4-supply:
84- vdd_s4-supply:
85- vdd_s5-supply:
86- vdd_s6-supply:
87- vdd_l1_l19-supply:
88- vdd_l2_l23-supply:
89- vdd_l3-supply:
90- vdd_l4_l5_l6_l7_l16-supply:
91- vdd_l8_l11_l12_l17_l22-supply:
92- vdd_l9_l10_l13_l14_l15_l18-supply:
93- vdd_l20-supply:
94- vdd_l21-supply:
95	Usage: optional (pm8950 only)
96	Value type: <phandle>
97	Definition: reference to regulator supplying the input pin, as
98		    described in the data sheet
99
100- vdd_s1-supply:
101- vdd_s2-supply:
102- vdd_s3-supply:
103- vdd_s4-supply:
104- vdd_s5-supply:
105- vdd_s6-supply:
106- vdd_s7-supply:
107- vdd_s8-supply:
108- vdd_s9-supply:
109- vdd_s10-supply:
110- vdd_s11-supply:
111- vdd_s12-supply:
112- vdd_l1-supply:
113- vdd_l2_l26_l28-supply:
114- vdd_l3_l11-supply:
115- vdd_l4_l27_l31-supply:
116- vdd_l5_l7-supply:
117- vdd_l6_l12_l32-supply:
118- vdd_l8_l16_l30-supply:
119- vdd_l9_l10_l18_l22-supply:
120- vdd_l13_l19_l23_l24-supply:
121- vdd_l14_l15-supply:
122- vdd_l17_l29-supply:
123- vdd_l20_l21-supply:
124- vdd_l25-supply:
125- vdd_lvs_1_2-supply:
126	Usage: optional (pm8994 only)
127	Value type: <phandle>
128	Definition: Reference to regulator supplying the input pin, as
129		    described in the data sheet.
130
131- vdd_s1-supply:
132- vdd_s2-supply:
133- vdd_s3-supply:
134- vdd_l1-supply:
135	Usage: optional (pmi8994 only)
136	Value type: <phandle>
137	Definition: Reference to regulator supplying the input pin, as
138		    described in the data sheet.
139
140- vdd_l1_l6_l7-supply:
141- vdd_l2_l3-supply:
142- vdd_l5-supply:
143- vdd_l8_l9_l10_l11_l12_l13_l14-supply:
144- vdd_l15_l16_l17_l18_l19-supply:
145- vdd_s1-supply:
146- vdd_s2-supply:
147- vdd_s3-supply:
148- vdd_s5-supply:
149- vdd_s6-supply:
150	Usage: optional (pm660 only)
151	Value type: <phandle>
152	Definition: Reference to regulator supplying the input pin, as
153		    described in the data sheet.
154
155- vdd_l1_l9_l10-supply:
156- vdd_l2-supply:
157- vdd_l3_l5_l7_l8-supply:
158- vdd_l4_l6-supply:
159- vdd_s1-supply:
160- vdd_s2-supply:
161- vdd_s3-supply:
162- vdd_s4-supply:
163- vdd_s5-supply:
164	Usage: optional (pm660l only)
165	Value type: <phandle>
166	Definition: Reference to regulator supplying the input pin, as
167		    described in the data sheet.
168
169- vdd_l1_l2-supply:
170- vdd_l3_l8-supply:
171- vdd_l4-supply:
172- vdd_l5_l6-supply:
173- vdd_l10_l11_l12_l13-supply:
174- vdd_l7-supply:
175- vdd_l9-supply:
176- vdd_s1-supply:
177- vdd_s2-supply:
178- vdd_s3-supply:
179- vdd_s4-supply:
180- vdd_s5-supply
181	Usage: optional (pms405 only)
182	Value type: <phandle>
183	Definition: Reference to regulator supplying the input pin, as
184		    described in the data sheet.
185
186- qcom,saw-reg:
187	Usage: optional
188	Value type: <phandle>
189	Description: Reference to syscon node defining the SAW registers.
190
191
192The regulator node houses sub-nodes for each regulator within the device. Each
193sub-node is identified using the node's name, with valid values listed for each
194of the PMICs below.
195
196pm8004:
197	s2, s5
198
199pm8005:
200	s1, s2, s3, s4
201
202pm8841:
203	s1, s2, s3, s4, s5, s6, s7, s8
204
205pm8916:
206	s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13,
207	l14, l15, l16, l17, l18
208
209pm8941:
210	s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13,
211	l14, l15, l16, l17, l18, l19, l20, l21, l22, l23, l24, lvs1, lvs2, lvs3,
212	5vs1, 5vs2
213
214pm8994:
215	s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, l1, l2, l3, l4, l5,
216	l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19, l20,
217	l21, l22, l23, l24, l25, l26, l27, l28, l29, l30, l31, l32, lvs1, lvs2
218
219pmi8994:
220	s1, s2, s3, l1
221
222The content of each sub-node is defined by the standard binding for regulators -
223see regulator.txt - with additional custom properties described below:
224
225- regulator-initial-mode:
226	Usage: optional
227	Value type: <u32>
228	Description: 2 = Set initial mode to auto mode (automatically select
229		    between HPM and LPM); not available on boost type
230		    regulators.
231
232		    1 = Set initial mode to high power mode (HPM), also referred
233		    to as NPM. HPM consumes more ground current than LPM, but
234		    it can source significantly higher load current. HPM is not
235		    available on boost type regulators. For voltage switch type
236		    regulators, HPM implies that over current protection and
237		    soft start are active all the time.
238
239		    0 = Set initial mode to low power mode (LPM).
240
241- qcom,ocp-max-retries:
242	Usage: optional
243	Value type: <u32>
244	Description: Maximum number of times to try toggling a voltage switch
245		     off and back on as a result of consecutive over current
246		     events.
247
248- qcom,ocp-retry-delay:
249	Usage: optional
250	Value type: <u32>
251	Description: Time to delay in milliseconds between each voltage switch
252		     toggle after an over current event takes place.
253
254- qcom,pin-ctrl-enable:
255	Usage: optional
256	Value type: <u32>
257	Description: Bit mask specifying which hardware pins should be used to
258		     enable the regulator, if any; supported bits are:
259			0 = ignore all hardware enable signals
260			BIT(0) = follow HW0_EN signal
261			BIT(1) = follow HW1_EN signal
262			BIT(2) = follow HW2_EN signal
263			BIT(3) = follow HW3_EN signal
264
265- qcom,pin-ctrl-hpm:
266	Usage: optional
267	Value type: <u32>
268	Description: Bit mask specifying which hardware pins should be used to
269		     force the regulator into high power mode, if any;
270		     supported bits are:
271			0 = ignore all hardware enable signals
272			BIT(0) = follow HW0_EN signal
273			BIT(1) = follow HW1_EN signal
274			BIT(2) = follow HW2_EN signal
275			BIT(3) = follow HW3_EN signal
276			BIT(4) = follow PMIC awake state
277
278- qcom,vs-soft-start-strength:
279	Usage: optional
280	Value type: <u32>
281	Description: This property sets the soft start strength for voltage
282		     switch type regulators; supported values are:
283			0 = 0.05 uA
284			1 = 0.25 uA
285			2 = 0.55 uA
286			3 = 0.75 uA
287
288- qcom,saw-slave:
289	Usage: optional
290	Value type: <boo>
291	Description: SAW controlled gang slave. Will not be configured.
292
293- qcom,saw-leader:
294	Usage: optional
295	Value type: <boo>
296	Description: SAW controlled gang leader. Will be configured as
297		     SAW regulator.
298
299Example:
300
301	regulators {
302		compatible = "qcom,pm8941-regulators";
303		vdd_l1_l3-supply = <&s1>;
304
305		s1: s1 {
306			regulator-min-microvolt = <1300000>;
307			regulator-max-microvolt = <1400000>;
308		};
309
310		...
311
312		l1: l1 {
313			regulator-min-microvolt = <1225000>;
314			regulator-max-microvolt = <1300000>;
315		};
316
317		....
318	};
319
320Example 2:
321
322	saw3: syscon@9A10000 {
323		compatible = "syscon";
324		reg = <0x9A10000 0x1000>;
325	};
326
327	...
328
329	spm-regulators {
330		compatible = "qcom,pm8994-regulators";
331		qcom,saw-reg = <&saw3>;
332		s8 {
333			qcom,saw-slave;
334		};
335		s9 {
336			qcom,saw-slave;
337		};
338		s10 {
339			qcom,saw-slave;
340		};
341		pm8994_s11_saw: s11 {
342			qcom,saw-leader;
343			regulator-always-on;
344			regulator-min-microvolt = <900000>;
345			regulator-max-microvolt = <1140000>;
346		};
347	};
348