xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/mfd/rk809.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1RK809 Power Management Integrated Circuit
2
3Required properties:
4- compatible: "rockchip,rk809"
5- reg: I2C slave address
6- interrupt-parent: The parent interrupt controller.
7- interrupts: the interrupt outputs of the controller.
8- #clock-cells: from common clock binding; shall be set to 1 (multiple clock
9  outputs). See <dt-bindings/clock/rockchip,rk808.h> for clock IDs.
10
11Optional properties:
12- clock-output-names: From common clock binding to override the
13  default output clock name
14- rockchip,system-power-controller: Telling whether or not this pmic is controlling
15  the system power.
16- vcc1-supply:  The input supply for DCDC_REG1
17- vcc2-supply:  The input supply for DCDC_REG2
18- vcc3-supply:  The input supply for DCDC_REG3
19- vcc4-supply:  The input supply for DCDC_REG4
20- vcc5-supply:  The input supply for LDO_REG1, LDO_REG2, LDO_REG3
21- vcc6-supply:  The input supply for LDO_REG4, LDO_REG5, LDO_REG6
22- vcc7-supply:  The input supply for LDO_REG7, LDO_REG8, LDO_REG9
23- vcc8-supply:  The input supply for SWITCH_REG1
24- vcc9-supply:  The input supply for DCDC_REG5, SWITCH_REG2
25
26Regulators: All the regulators of RK809 to be instantiated shall be
27listed in a child node named 'regulators'. Each regulator is represented
28by a child node of the 'regulators' node.
29
30	regulator-name {
31		/* standard regulator bindings here */
32	};
33
34Following regulators of the RK809 PMIC block are supported. Note that
35the 'n' in regulator name, as in DCDC_REGn or LDOn, represents the DCDC or LDO
36number as described in RK808 datasheet.
37
38	- DCDC_REGn
39		- valid values for n are 1 to 5.
40	- LDO_REGn
41		- valid values for n are 1 to 9.
42	- SWITCH_REGn
43		- valid values for n are 1 to 2.
44
45    The gpio_slp pin is for controlling the pmic states, as below:
46        reset
47        power down
48        sleep
49
50Standard regulator bindings are used inside regulator subnodes. Check
51  Documentation/devicetree/bindings/regulator/regulator.txt
52for more details
53
54Example:
55	rk809: pmic@20 {
56		compatible = "rockchip,rk809";
57		reg = <0x20>;
58		interrupt-parent = <&gpio0>;
59		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
60		pinctrl-names = "default", "pmic-sleep",
61				"pmic-power-off", "pmic-reset";
62		pinctrl-0 = <&pmic_int>;
63		pinctrl-1 = <&soc_slppin_slp>, <&rk817_slppin_slp>;
64		pinctrl-2 = <&soc_slppin_gpio>, <&rk817_slppin_pwrdn>;
65		pinctrl-3 = <&soc_slppin_rst>, <&rk817_slppin_rst>;
66		rockchip,system-power-controller;
67		wakeup-source;
68		#clock-cells = <1>;
69		clock-output-names = "rk808-clkout1", "rk808-clkout2";
70
71		vcc1-supply = <&vcc5v0_sys>;
72		vcc2-supply = <&vcc5v0_sys>;
73		vcc3-supply = <&vcc5v0_sys>;
74		vcc4-supply = <&vcc5v0_sys>;
75		vcc5-supply = <&vcc3v3_sys>;
76		vcc6-supply = <&vcc3v3_sys>;
77		vcc7-supply = <&vcc3v3_sys>;
78		vcc8-supply = <&vcc3v3_sys>;
79		vcc9-supply = <&vcc5v0_sys>;
80
81		pwrkey {
82			status = "okay";
83		};
84
85		pinctrl_rk8xx: pinctrl_rk8xx {
86			gpio-controller;
87			#gpio-cells = <2>;
88
89			rk817_slppin_null: rk817_slppin_null {
90				pins = "gpio_slp";
91				function = "pin_fun0";
92			};
93
94			rk817_slppin_slp: rk817_slppin_slp {
95				pins = "gpio_slp";
96				function = "pin_fun1";
97			};
98
99			rk817_slppin_pwrdn: rk817_slppin_pwrdn {
100				pins = "gpio_slp";
101				function = "pin_fun2";
102			};
103
104			rk817_slppin_rst: rk817_slppin_rst {
105				pins = "gpio_slp";
106				function = "pin_fun3";
107			};
108		};
109
110		regulators {
111			vdd_logic: DCDC_REG1 {
112				regulator-always-on;
113				regulator-boot-on;
114				regulator-min-microvolt = <950000>;
115				regulator-max-microvolt = <1350000>;
116				regulator-ramp-delay = <6001>;
117				regulator-initial-mode = <0x1>;
118				regulator-name = "vdd_logic";
119				regulator-state-mem {
120					regulator-on-in-suspend;
121					regulator-suspend-microvolt = <950000>;
122				};
123			};
124
125			vdd_arm: DCDC_REG2 {
126				regulator-always-on;
127				regulator-boot-on;
128				regulator-min-microvolt = <950000>;
129				regulator-max-microvolt = <1350000>;
130				regulator-ramp-delay = <6001>;
131				regulator-initial-mode = <0x1>;
132				regulator-name = "vdd_arm";
133				regulator-state-mem {
134					regulator-off-in-suspend;
135					regulator-suspend-microvolt = <950000>;
136				};
137			};
138
139			vcc_ddr: DCDC_REG3 {
140				regulator-always-on;
141				regulator-boot-on;
142				regulator-name = "vcc_ddr";
143				regulator-initial-mode = <0x1>;
144				regulator-state-mem {
145					regulator-on-in-suspend;
146				};
147			};
148
149			vcc_3v0: DCDC_REG4 {
150				regulator-always-on;
151				regulator-boot-on;
152				regulator-min-microvolt = <3000000>;
153				regulator-max-microvolt = <3000000>;
154				regulator-initial-mode = <0x1>;
155				regulator-name = "vcc_3v0";
156				regulator-state-mem {
157					regulator-off-in-suspend;
158					regulator-suspend-microvolt = <3000000>;
159				};
160			};
161
162			vcc2v5_ddr: LDO_REG1 {
163				regulator-always-on;
164				regulator-boot-on;
165				regulator-min-microvolt = <2500000>;
166				regulator-max-microvolt = <2500000>;
167				regulator-name = "vcc2v5_ddr";
168				regulator-state-mem {
169					regulator-on-in-suspend;
170					regulator-suspend-microvolt = <2500000>;
171				};
172			};
173
174			vcc1v8_soc: LDO_REG2 {
175				regulator-always-on;
176				regulator-boot-on;
177				regulator-min-microvolt = <1800000>;
178				regulator-max-microvolt = <1800000>;
179
180				regulator-name = "vcc1v8_soc";
181				regulator-state-mem {
182					regulator-on-in-suspend;
183					regulator-suspend-microvolt = <1800000>;
184				};
185			};
186
187			vdd1v0_soc: LDO_REG3 {
188				regulator-always-on;
189				regulator-boot-on;
190				regulator-min-microvolt = <1000000>;
191				regulator-max-microvolt = <1000000>;
192
193				regulator-name = "vcc1v0_soc";
194				regulator-state-mem {
195					regulator-on-in-suspend;
196					regulator-suspend-microvolt = <1000000>;
197				};
198			};
199
200			vcc3v0_pmu: LDO_REG4 {
201				regulator-always-on;
202				regulator-boot-on;
203				regulator-min-microvolt = <3000000>;
204				regulator-max-microvolt = <3000000>;
205
206				regulator-name = "vcc3v0_pmu";
207				regulator-state-mem {
208					regulator-on-in-suspend;
209					regulator-suspend-microvolt = <3000000>;
210
211				};
212			};
213
214			vccio_sd: LDO_REG5 {
215				regulator-always-on;
216				regulator-boot-on;
217				regulator-min-microvolt = <3300000>;
218				regulator-max-microvolt = <3300000>;
219
220				regulator-name = "vccio_sd";
221				regulator-state-mem {
222					regulator-on-in-suspend;
223					regulator-suspend-microvolt = <3300000>;
224				};
225			};
226
227			vcc_sd: LDO_REG6 {
228				regulator-always-on;
229				regulator-boot-on;
230				regulator-min-microvolt = <3300000>;
231				regulator-max-microvolt = <3300000>;
232
233				regulator-name = "vcc_sd";
234				regulator-state-mem {
235					regulator-on-in-suspend;
236					regulator-suspend-microvolt = <3300000>;
237
238				};
239			};
240
241			vcc2v8_dvp: LDO_REG7 {
242				regulator-always-on;
243				regulator-boot-on;
244				regulator-min-microvolt = <2800000>;
245				regulator-max-microvolt = <2800000>;
246
247				regulator-name = "vcc2v8_dvp";
248				regulator-state-mem {
249					regulator-off-in-suspend;
250					regulator-suspend-microvolt = <2800000>;
251				};
252			};
253
254			vcc1v8_dvp: LDO_REG8 {
255				regulator-always-on;
256				regulator-boot-on;
257				regulator-min-microvolt = <1800000>;
258				regulator-max-microvolt = <1800000>;
259
260				regulator-name = "vcc1v8_dvp";
261				regulator-state-mem {
262					regulator-on-in-suspend;
263					regulator-suspend-microvolt = <1800000>;
264				};
265			};
266
267			vdd1v5_dvp: LDO_REG9 {
268				regulator-always-on;
269				regulator-boot-on;
270				regulator-min-microvolt = <1500000>;
271				regulator-max-microvolt = <1500000>;
272
273				regulator-name = "vdd1v5_dvp";
274				regulator-state-mem {
275					regulator-off-in-suspend;
276					regulator-suspend-microvolt = <1500000>;
277				};
278			};
279
280			vcc3v3_sys: DCDC_REG5 {
281				regulator-always-on;
282				regulator-boot-on;
283				regulator-min-microvolt = <3300000>;
284				regulator-max-microvolt = <3300000>;
285				regulator-name = "vcc3v3_sys";
286				regulator-state-mem {
287					regulator-on-in-suspend;
288					regulator-suspend-microvolt = <3300000>;
289				};
290			};
291
292			vcc3v3_lcd: SWITCH_REG1 {
293				regulator-boot-on;
294				regulator-name = "vcc3v3_lcd";
295			};
296
297			vcc5v0_host: SWITCH_REG2 {
298				regulator-always-on;
299				regulator-boot-on;
300				regulator-name = "vcc5v0_host";
301			};
302		};
303
304		rk809_codec: codec {
305			#sound-dai-cells = <0>;
306			compatible = "rockchip,rk809-codec", "rockchip,rk817-codec";
307			clocks = <&cru SCLK_I2S1_OUT>;
308			clock-names = "mclk";
309			pinctrl-names = "default";
310			pinctrl-0 = <&i2s1_2ch_mclk>;
311			hp-volume = <20>;
312			spk-volume = <3>;
313			status = "okay";
314		};
315	}