xref: /freebsd/sys/contrib/device-tree/Bindings/mfd/rk808.txt (revision 2e3f49888ec8851bafb22011533217487764fdb0)
1RK8XX Power Management Integrated Circuit
2
3The rk8xx family current members:
4rk805
5rk808
6rk809
7rk817
8rk818
9
10Required properties:
11- compatible: "rockchip,rk805"
12- compatible: "rockchip,rk808"
13- compatible: "rockchip,rk809"
14- compatible: "rockchip,rk817"
15- compatible: "rockchip,rk818"
16- reg: I2C slave address
17- interrupts: the interrupt outputs of the controller.
18- #clock-cells: from common clock binding; shall be set to 1 (multiple clock
19  outputs). See <dt-bindings/clock/rockchip,rk808.h> for clock IDs.
20
21Optional properties:
22- clock-output-names: From common clock binding to override the
23  default output clock name
24- rockchip,system-power-controller: Telling whether or not this pmic is controlling
25  the system power.
26- wakeup-source: Device can be used as a wakeup source.
27
28Optional RK805 properties:
29- vcc1-supply:  The input supply for DCDC_REG1
30- vcc2-supply:  The input supply for DCDC_REG2
31- vcc3-supply:  The input supply for DCDC_REG3
32- vcc4-supply:  The input supply for DCDC_REG4
33- vcc5-supply:  The input supply for LDO_REG1 and LDO_REG2
34- vcc6-supply:  The input supply for LDO_REG3
35
36Optional RK808 properties:
37- vcc1-supply:  The input supply for DCDC_REG1
38- vcc2-supply:  The input supply for DCDC_REG2
39- vcc3-supply:  The input supply for DCDC_REG3
40- vcc4-supply:  The input supply for DCDC_REG4
41- vcc6-supply:  The input supply for LDO_REG1 and LDO_REG2
42- vcc7-supply:  The input supply for LDO_REG3 and LDO_REG7
43- vcc8-supply:  The input supply for SWITCH_REG1
44- vcc9-supply:  The input supply for LDO_REG4 and LDO_REG5
45- vcc10-supply: The input supply for LDO_REG6
46- vcc11-supply: The input supply for LDO_REG8
47- vcc12-supply: The input supply for SWITCH_REG2
48- dvs-gpios:  buck1/2 can be controlled by gpio dvs, this is GPIO specifiers
49  for 2 host gpio's used for dvs. The format of the gpio specifier depends in
50  the gpio controller. If DVS GPIOs aren't present, voltage changes will happen
51  very quickly with no slow ramp time.
52
53Optional shared RK809 and RK817 properties:
54- vcc1-supply:  The input supply for DCDC_REG1
55- vcc2-supply:  The input supply for DCDC_REG2
56- vcc3-supply:  The input supply for DCDC_REG3
57- vcc4-supply:  The input supply for DCDC_REG4
58- vcc5-supply:  The input supply for LDO_REG1, LDO_REG2, LDO_REG3
59- vcc6-supply:  The input supply for LDO_REG4, LDO_REG5, LDO_REG6
60- vcc7-supply:  The input supply for LDO_REG7, LDO_REG8, LDO_REG9
61
62Optional RK809 properties:
63- vcc8-supply:  The input supply for SWITCH_REG1
64- vcc9-supply:  The input supply for DCDC_REG5, SWITCH_REG2
65
66Optional RK817 properties:
67- clocks:	The input clock for the audio codec
68- clock-names:	The clock name for the codec clock. Should be "mclk".
69- #sound-dai-cells: Needed for the interpretation of sound dais. Should be 0.
70
71- vcc8-supply:  The input supply for BOOST
72- vcc9-supply:  The input supply for OTG_SWITCH
73- codec:	The child node for the codec to hold additional properties.
74		If no additional properties are required for the codec, this
75		node can be omitted.
76
77- rockchip,mic-in-differential: Telling if the microphone uses differential
78				mode. Should be under the codec child node.
79
80Optional RK818 properties:
81- vcc1-supply:  The input supply for DCDC_REG1
82- vcc2-supply:  The input supply for DCDC_REG2
83- vcc3-supply:  The input supply for DCDC_REG3
84- vcc4-supply:  The input supply for DCDC_REG4
85- boost-supply: The input supply for DCDC_BOOST
86- vcc6-supply:  The input supply for LDO_REG1 and LDO_REG2
87- vcc7-supply:  The input supply for LDO_REG3, LDO_REG5 and LDO_REG7
88- vcc8-supply:  The input supply for LDO_REG4, LDO_REG6 and LDO_REG8
89- vcc9-supply:  The input supply for LDO_REG9 and SWITCH_REG
90- h_5v-supply:  The input supply for HDMI_SWITCH
91- usb-supply:   The input supply for OTG_SWITCH
92
93Regulators: All the regulators of RK8XX to be instantiated shall be
94listed in a child node named 'regulators'. Each regulator is represented
95by a child node of the 'regulators' node.
96
97	regulator-name {
98		/* standard regulator bindings here */
99	};
100
101Following regulators of the RK805 PMIC regulators are supported. Note that
102the 'n' in regulator name, as in DCDC_REGn or LDOn, represents the DCDC or LDO
103number as described in RK805 datasheet.
104
105	- DCDC_REGn
106		- valid values for n are 1 to 4.
107	- LDO_REGn
108		- valid values for n are 1 to 3
109
110Following regulators of the RK808 PMIC block are supported. Note that
111the 'n' in regulator name, as in DCDC_REGn or LDOn, represents the DCDC or LDO
112number as described in RK808 datasheet.
113
114	- DCDC_REGn
115		- valid values for n are 1 to 4.
116	- LDO_REGn
117		- valid values for n are 1 to 8.
118	- SWITCH_REGn
119		- valid values for n are 1 to 2
120
121Following regulators of the RK809 and RK817 PMIC blocks are supported. Note that
122the 'n' in regulator name, as in DCDC_REGn or LDOn, represents the DCDC or LDO
123number as described in RK809 and RK817 datasheets.
124
125	- DCDC_REGn
126		- valid values for n are 1 to 5 for RK809.
127		- valid values for n are 1 to 4 for RK817.
128	- LDO_REGn
129		- valid values for n are 1 to 9 for RK809.
130		- valid values for n are 1 to 9 for RK817.
131	- SWITCH_REGn
132		- valid values for n are 1 to 2 for RK809.
133	- BOOST for RK817
134	- OTG_SWITCH for RK817
135
136Following regulators of the RK818 PMIC block are supported. Note that
137the 'n' in regulator name, as in DCDC_REGn or LDOn, represents the DCDC or LDO
138number as described in RK818 datasheet.
139
140	- DCDC_REGn
141		- valid values for n are 1 to 4.
142	- LDO_REGn
143		- valid values for n are 1 to 9.
144	- SWITCH_REG
145	- HDMI_SWITCH
146	- OTG_SWITCH
147
148It is necessary to configure three pins for both the RK809 and RK817, the three
149pins are "gpio_ts" "gpio_gt" "gpio_slp".
150	The gpio_gt and gpio_ts pins support the gpio function.
151	The gpio_slp pin is for controlling the pmic states, as below:
152		- reset
153		- power down
154		- sleep
155
156Standard regulator bindings are used inside regulator subnodes. Check
157  Documentation/devicetree/bindings/regulator/regulator.txt
158for more details
159
160Example:
161	rk808: pmic@1b {
162		compatible = "rockchip,rk808";
163		clock-output-names = "xin32k", "rk808-clkout2";
164		interrupt-parent = <&gpio0>;
165		interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
166		pinctrl-names = "default";
167		pinctrl-0 = <&pmic_int &dvs_1 &dvs_2>;
168		dvs-gpios = <&gpio7 11 GPIO_ACTIVE_HIGH>,
169			    <&gpio7 15 GPIO_ACTIVE_HIGH>;
170		reg = <0x1b>;
171		rockchip,system-power-controller;
172		wakeup-source;
173		#clock-cells = <1>;
174
175		vcc8-supply = <&vcc_18>;
176		vcc9-supply = <&vcc_io>;
177		vcc10-supply = <&vcc_io>;
178		vcc12-supply = <&vcc_io>;
179		vddio-supply = <&vccio_pmu>;
180
181		regulators {
182			vdd_cpu: DCDC_REG1 {
183				regulator-always-on;
184				regulator-boot-on;
185				regulator-min-microvolt = <750000>;
186				regulator-max-microvolt = <1300000>;
187				regulator-name = "vdd_arm";
188			};
189
190			vdd_gpu: DCDC_REG2 {
191				regulator-always-on;
192				regulator-boot-on;
193				regulator-min-microvolt = <850000>;
194				regulator-max-microvolt = <1250000>;
195				regulator-name = "vdd_gpu";
196			};
197
198			vcc_ddr: DCDC_REG3 {
199				regulator-always-on;
200				regulator-boot-on;
201				regulator-name = "vcc_ddr";
202			};
203
204			vcc_io: DCDC_REG4 {
205				regulator-always-on;
206				regulator-boot-on;
207				regulator-min-microvolt = <3300000>;
208				regulator-max-microvolt = <3300000>;
209				regulator-name = "vcc_io";
210			};
211
212			vccio_pmu: LDO_REG1 {
213				regulator-always-on;
214				regulator-boot-on;
215				regulator-min-microvolt = <3300000>;
216				regulator-max-microvolt = <3300000>;
217				regulator-name = "vccio_pmu";
218			};
219
220			vcc_tp: LDO_REG2 {
221				regulator-always-on;
222				regulator-boot-on;
223				regulator-min-microvolt = <3300000>;
224				regulator-max-microvolt = <3300000>;
225				regulator-name = "vcc_tp";
226			};
227
228			vdd_10: LDO_REG3 {
229				regulator-always-on;
230				regulator-boot-on;
231				regulator-min-microvolt = <1000000>;
232				regulator-max-microvolt = <1000000>;
233				regulator-name = "vdd_10";
234			};
235
236			vcc18_lcd: LDO_REG4 {
237				regulator-always-on;
238				regulator-boot-on;
239				regulator-min-microvolt = <1800000>;
240				regulator-max-microvolt = <1800000>;
241				regulator-name = "vcc18_lcd";
242			};
243
244			vccio_sd: LDO_REG5 {
245				regulator-always-on;
246				regulator-boot-on;
247				regulator-min-microvolt = <1800000>;
248				regulator-max-microvolt = <3300000>;
249				regulator-name = "vccio_sd";
250			};
251
252			vdd10_lcd: LDO_REG6 {
253				regulator-always-on;
254				regulator-boot-on;
255				regulator-min-microvolt = <1000000>;
256				regulator-max-microvolt = <1000000>;
257				regulator-name = "vdd10_lcd";
258			};
259
260			vcc_18: LDO_REG7 {
261				regulator-always-on;
262				regulator-boot-on;
263				regulator-min-microvolt = <1800000>;
264				regulator-max-microvolt = <1800000>;
265				regulator-name = "vcc_18";
266			};
267
268			vcca_codec: LDO_REG8 {
269				regulator-always-on;
270				regulator-boot-on;
271				regulator-min-microvolt = <3300000>;
272				regulator-max-microvolt = <3300000>;
273				regulator-name = "vcca_codec";
274			};
275
276			vcc_wl: SWITCH_REG1 {
277				regulator-always-on;
278				regulator-boot-on;
279				regulator-name = "vcc_wl";
280			};
281
282			vcc_lcd: SWITCH_REG2 {
283				regulator-always-on;
284				regulator-boot-on;
285				regulator-name = "vcc_lcd";
286			};
287		};
288	};
289
290	rk817: pmic@20 {
291		compatible = "rockchip,rk817";
292		reg = <0x20>;
293		interrupt-parent = <&gpio0>;
294		interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
295		clock-output-names = "rk808-clkout1", "xin32k";
296		clock-names = "mclk";
297		clocks = <&cru SCLK_I2S1_OUT>;
298		pinctrl-names = "default";
299		pinctrl-0 = <&pmic_int>, <&i2s1_2ch_mclk>;
300		wakeup-source;
301		#clock-cells = <1>;
302		#sound-dai-cells = <0>;
303
304		vcc1-supply = <&vccsys>;
305		vcc2-supply = <&vccsys>;
306		vcc3-supply = <&vccsys>;
307		vcc4-supply = <&vccsys>;
308		vcc5-supply = <&vccsys>;
309		vcc6-supply = <&vccsys>;
310		vcc7-supply = <&vccsys>;
311
312		regulators {
313			vdd_logic: DCDC_REG1 {
314				regulator-name = "vdd_logic";
315				regulator-min-microvolt = <950000>;
316				regulator-max-microvolt = <1150000>;
317				regulator-ramp-delay = <6001>;
318				regulator-always-on;
319				regulator-boot-on;
320
321				regulator-state-mem {
322					regulator-on-in-suspend;
323					regulator-suspend-microvolt = <950000>;
324				};
325			};
326
327			vdd_arm: DCDC_REG2 {
328				regulator-name = "vdd_arm";
329				regulator-min-microvolt = <950000>;
330				regulator-max-microvolt = <1350000>;
331				regulator-ramp-delay = <6001>;
332				regulator-always-on;
333				regulator-boot-on;
334
335				regulator-state-mem {
336					regulator-off-in-suspend;
337					regulator-suspend-microvolt = <950000>;
338				};
339			};
340
341			vcc_ddr: DCDC_REG3 {
342				regulator-name = "vcc_ddr";
343				regulator-always-on;
344				regulator-boot-on;
345
346				regulator-state-mem {
347					regulator-on-in-suspend;
348				};
349			};
350
351			vcc_3v3: DCDC_REG4 {
352				regulator-name = "vcc_3v3";
353				regulator-min-microvolt = <3300000>;
354				regulator-max-microvolt = <3300000>;
355				regulator-always-on;
356				regulator-boot-on;
357
358				regulator-state-mem {
359					regulator-off-in-suspend;
360					regulator-suspend-microvolt = <3300000>;
361				};
362			};
363
364			vcc_1v8: LDO_REG2 {
365				regulator-name = "vcc_1v8";
366				regulator-min-microvolt = <1800000>;
367				regulator-max-microvolt = <1800000>;
368				regulator-always-on;
369				regulator-boot-on;
370
371				regulator-state-mem {
372					regulator-on-in-suspend;
373					regulator-suspend-microvolt = <1800000>;
374				};
375			};
376
377			vdd_1v0: LDO_REG3 {
378				regulator-name = "vdd_1v0";
379				regulator-min-microvolt = <1000000>;
380				regulator-max-microvolt = <1000000>;
381				regulator-always-on;
382				regulator-boot-on;
383
384				regulator-state-mem {
385					regulator-on-in-suspend;
386					regulator-suspend-microvolt = <1000000>;
387				};
388			};
389
390			vcc3v3_pmu: LDO_REG4 {
391				regulator-name = "vcc3v3_pmu";
392				regulator-min-microvolt = <3300000>;
393				regulator-max-microvolt = <3300000>;
394				regulator-always-on;
395				regulator-boot-on;
396
397				regulator-state-mem {
398					regulator-on-in-suspend;
399					regulator-suspend-microvolt = <3300000>;
400				};
401			};
402
403			vccio_sd: LDO_REG5 {
404				regulator-name = "vccio_sd";
405				regulator-min-microvolt = <1800000>;
406				regulator-max-microvolt = <3300000>;
407				regulator-always-on;
408				regulator-boot-on;
409
410				regulator-state-mem {
411					regulator-on-in-suspend;
412					regulator-suspend-microvolt = <3300000>;
413				};
414			};
415
416			vcc_sd: LDO_REG6 {
417				regulator-name = "vcc_sd";
418				regulator-min-microvolt = <3300000>;
419				regulator-max-microvolt = <3300000>;
420				regulator-boot-on;
421
422				regulator-state-mem {
423					regulator-on-in-suspend;
424					regulator-suspend-microvolt = <3300000>;
425				};
426			};
427
428			vcc_bl: LDO_REG7 {
429				regulator-name = "vcc_bl";
430				regulator-min-microvolt = <3300000>;
431				regulator-max-microvolt = <3300000>;
432
433				regulator-state-mem {
434					regulator-off-in-suspend;
435					regulator-suspend-microvolt = <3300000>;
436				};
437			};
438
439			vcc_lcd: LDO_REG8 {
440				regulator-name = "vcc_lcd";
441				regulator-min-microvolt = <2800000>;
442				regulator-max-microvolt = <2800000>;
443
444				regulator-state-mem {
445					regulator-off-in-suspend;
446					regulator-suspend-microvolt = <2800000>;
447				};
448			};
449
450			vcc_cam: LDO_REG9 {
451				regulator-name = "vcc_cam";
452				regulator-min-microvolt = <3000000>;
453				regulator-max-microvolt = <3000000>;
454
455				regulator-state-mem {
456					regulator-off-in-suspend;
457					regulator-suspend-microvolt = <3000000>;
458				};
459			};
460		};
461
462		rk817_codec: codec {
463			rockchip,mic-in-differential;
464		};
465	};
466