xref: /freebsd/sys/contrib/device-tree/Bindings/mfd/qcom-rpm.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1Qualcomm Resource Power Manager (RPM)
2
3This driver is used to interface with the Resource Power Manager (RPM) found in
4various Qualcomm platforms. The RPM allows each component in the system to vote
5for state of the system resources, such as clocks, regulators and bus
6frequencies.
7
8- compatible:
9	Usage: required
10	Value type: <string>
11	Definition: must be one of:
12		    "qcom,rpm-apq8064"
13		    "qcom,rpm-msm8660"
14		    "qcom,rpm-msm8960"
15		    "qcom,rpm-ipq8064"
16		    "qcom,rpm-mdm9615"
17
18- reg:
19	Usage: required
20	Value type: <prop-encoded-array>
21	Definition: base address and size of the RPM's message ram
22
23- interrupts:
24	Usage: required
25	Value type: <prop-encoded-array>
26	Definition: three entries specifying the RPM's:
27		    1. acknowledgement interrupt
28		    2. error interrupt
29		    3. wakeup interrupt
30
31- interrupt-names:
32	Usage: required
33	Value type: <string-array>
34	Definition: must be the three strings "ack", "err" and "wakeup", in order
35
36- qcom,ipc:
37	Usage: required
38	Value type: <prop-encoded-array>
39
40	Definition: three entries specifying the outgoing ipc bit used for
41		    signaling the RPM:
42		    - phandle to a syscon node representing the apcs registers
43		    - u32 representing offset to the register within the syscon
44		    - u32 representing the ipc bit within the register
45
46
47= SUBNODES
48
49The RPM exposes resources to its subnodes. The below bindings specify the set
50of valid subnodes that can operate on these resources.
51
52== Regulators
53
54Regulator nodes are identified by their compatible:
55
56- compatible:
57	Usage: required
58	Value type: <string>
59	Definition: must be one of:
60		    "qcom,rpm-pm8058-regulators"
61		    "qcom,rpm-pm8901-regulators"
62		    "qcom,rpm-pm8921-regulators"
63		    "qcom,rpm-pm8018-regulators"
64		    "qcom,rpm-smb208-regulators"
65
66- vdd_l0_l1_lvs-supply:
67- vdd_l2_l11_l12-supply:
68- vdd_l3_l4_l5-supply:
69- vdd_l6_l7-supply:
70- vdd_l8-supply:
71- vdd_l9-supply:
72- vdd_l10-supply:
73- vdd_l13_l16-supply:
74- vdd_l14_l15-supply:
75- vdd_l17_l18-supply:
76- vdd_l19_l20-supply:
77- vdd_l21-supply:
78- vdd_l22-supply:
79- vdd_l23_l24_l25-supply:
80- vdd_ncp-supply:
81- vdd_s0-supply:
82- vdd_s1-supply:
83- vdd_s2-supply:
84- vdd_s3-supply:
85- vdd_s4-supply:
86	Usage: optional (pm8058 only)
87	Value type: <phandle>
88	Definition: reference to regulator supplying the input pin, as
89		    described in the data sheet
90
91- lvs0_in-supply:
92- lvs1_in-supply:
93- lvs2_in-supply:
94- lvs3_in-supply:
95- mvs_in-supply:
96- vdd_l0-supply:
97- vdd_l1-supply:
98- vdd_l2-supply:
99- vdd_l3-supply:
100- vdd_l4-supply:
101- vdd_l5-supply:
102- vdd_l6-supply:
103- vdd_s0-supply:
104- vdd_s1-supply:
105- vdd_s2-supply:
106- vdd_s3-supply:
107- vdd_s4-supply:
108	Usage: optional (pm8901 only)
109	Value type: <phandle>
110	Definition: reference to regulator supplying the input pin, as
111		    described in the data sheet
112
113- vdd_l1_l2_l12_l18-supply:
114- vdd_l3_l15_l17-supply:
115- vdd_l4_l14-supply:
116- vdd_l5_l8_l16-supply:
117- vdd_l6_l7-supply:
118- vdd_l9_l11-supply:
119- vdd_l10_l22-supply:
120- vdd_l21_l23_l29-supply:
121- vdd_l24-supply:
122- vdd_l25-supply:
123- vdd_l26-supply:
124- vdd_l27-supply:
125- vdd_l28-supply:
126- vdd_ncp-supply:
127- vdd_s1-supply:
128- vdd_s2-supply:
129- vdd_s4-supply:
130- vdd_s5-supply:
131- vdd_s6-supply:
132- vdd_s7-supply:
133- vdd_s8-supply:
134- vin_5vs-supply:
135- vin_lvs1_3_6-supply:
136- vin_lvs2-supply:
137- vin_lvs4_5_7-supply:
138	Usage: optional (pm8921 only)
139	Value type: <phandle>
140	Definition: reference to regulator supplying the input pin, as
141		    described in the data sheet
142
143- vin_lvs1-supply:
144- vdd_l7-supply:
145- vdd_l8-supply:
146- vdd_l9_l10_l11_l12-supply:
147	Usage: optional (pm8018 only)
148	Value type: <phandle>
149	Definition: reference to regulator supplying the input pin, as
150		    described in the data sheet
151
152The regulator node houses sub-nodes for each regulator within the device. Each
153sub-node is identified using the node's name, with valid values listed for each
154of the pmics below.
155
156pm8058:
157	l0, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15,
158	l16, l17, l18, l19, l20, l21, l22, l23, l24, l25, s0, s1, s2, s3, s4,
159	lvs0, lvs1, ncp
160
161pm8901:
162	l0, l1, l2, l3, l4, l5, l6, s0, s1, s2, s3, s4, lvs0, lvs1, lvs2, lvs3,
163	mvs
164
165pm8921:
166	s1, s2, s3, s4, s7, s8, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
167	l12, l14, l15, l16, l17, l18, l21, l22, l23, l24, l25, l26, l27, l28,
168	l29, lvs1, lvs2, lvs3, lvs4, lvs5, lvs6, lvs7, usb-switch, hdmi-switch,
169	ncp
170
171pm8018:
172	s1, s2, s3, s4, s5, , l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
173	l12, l14, lvs1
174
175smb208:
176	s1a, s1b, s2a, s2b
177
178The content of each sub-node is defined by the standard binding for regulators -
179see regulator.txt - with additional custom properties described below:
180
181=== Switch-mode Power Supply regulator custom properties
182
183- bias-pull-down:
184	Usage: optional
185	Value type: <empty>
186	Definition: enable pull down of the regulator when inactive
187
188- qcom,switch-mode-frequency:
189	Usage: required
190	Value type: <u32>
191	Definition: Frequency (Hz) of the switch-mode power supply;
192		    must be one of:
193		    19200000, 9600000, 6400000, 4800000, 3840000, 3200000,
194		    2740000, 2400000, 2130000, 1920000, 1750000, 1600000,
195		    1480000, 1370000, 1280000, 1200000
196
197- qcom,force-mode:
198	Usage: optional (default if no other qcom,force-mode is specified)
199	Value type: <u32>
200	Definition: indicates that the regulator should be forced to a
201		   particular mode, valid values are:
202		   QCOM_RPM_FORCE_MODE_NONE - do not force any mode
203		   QCOM_RPM_FORCE_MODE_LPM - force into low power mode
204		   QCOM_RPM_FORCE_MODE_HPM - force into high power mode
205		   QCOM_RPM_FORCE_MODE_AUTO - allow regulator to automatically
206					      select its own mode based on
207					      realtime current draw, only for:
208					      pm8921 smps and ftsmps
209
210- qcom,power-mode-hysteretic:
211	Usage: optional
212	Value type: <empty>
213	Definition: select that the power supply should operate in hysteretic
214		    mode, instead of the default pwm mode
215
216=== Low-dropout regulator custom properties
217
218- bias-pull-down:
219	Usage: optional
220	Value type: <empty>
221	Definition: enable pull down of the regulator when inactive
222
223- qcom,force-mode:
224	Usage: optional
225	Value type: <u32>
226	Definition: indicates that the regulator should not be forced to any
227		   particular mode, valid values are:
228		   QCOM_RPM_FORCE_MODE_NONE - do not force any mode
229		   QCOM_RPM_FORCE_MODE_LPM - force into low power mode
230		   QCOM_RPM_FORCE_MODE_HPM - force into high power mode
231		   QCOM_RPM_FORCE_MODE_BYPASS - set regulator to use bypass
232						mode, i.e.  to act as a switch
233						and not regulate, only for:
234						pm8921 pldo, nldo and nldo1200
235
236=== Negative Charge Pump custom properties
237
238- qcom,switch-mode-frequency:
239	Usage: required
240	Value type: <u32>
241	Definition: Frequency (Hz) of the switch mode power supply;
242		    must be one of:
243		    19200000, 9600000, 6400000, 4800000, 3840000, 3200000,
244		    2740000, 2400000, 2130000, 1920000, 1750000, 1600000,
245		    1480000, 1370000, 1280000, 1200000
246
247= EXAMPLE
248
249	#include <dt-bindings/mfd/qcom-rpm.h>
250
251	rpm@108000 {
252		compatible = "qcom,rpm-msm8960";
253		reg = <0x108000 0x1000>;
254		qcom,ipc = <&apcs 0x8 2>;
255
256		interrupts = <0 19 0>, <0 21 0>, <0 22 0>;
257		interrupt-names = "ack", "err", "wakeup";
258
259		regulators {
260			compatible = "qcom,rpm-pm8921-regulators";
261			vdd_l1_l2_l12_l18-supply = <&pm8921_s4>;
262
263			s1 {
264				regulator-min-microvolt = <1225000>;
265				regulator-max-microvolt = <1225000>;
266
267				bias-pull-down;
268
269				qcom,switch-mode-frequency = <3200000>;
270			};
271
272			pm8921_s4: s4 {
273				regulator-min-microvolt = <1800000>;
274				regulator-max-microvolt = <1800000>;
275
276				qcom,switch-mode-frequency = <1600000>;
277				bias-pull-down;
278
279				qcom,force-mode = <QCOM_RPM_FORCE_MODE_AUTO>;
280			};
281		};
282	};
283
284