xref: /OK3568_Linux_fs/u-boot/arch/arm/dts/rk3128-evb.dts (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1/*
2 * (C) Copyright 2017 Rockchip Electronics Co., Ltd
3 *
4 * SPDX-License-Identifier:     GPL-2.0+
5 */
6
7/dts-v1/;
8
9#include "rk3128.dtsi"
10#include "rk3128-u-boot.dtsi"
11
12/ {
13	model = "Rockchip RK3128 Evaluation board";
14	compatible = "rockchip,rk3128-evb", "rockchip,rk3128";
15
16	vcc_sys: vcc-sys {
17		compatible = "regulator-fixed";
18		regulator-name = "vcc_sys";
19		regulator-always-on;
20		regulator-boot-on;
21		regulator-min-microvolt = <5000000>;
22		regulator-max-microvolt = <5000000>;
23	};
24
25	vcc5v0_otg: vcc5v0-otg-drv {
26		compatible = "regulator-fixed";
27		regulator-name = "vcc5v0_otg";
28		gpio = <&gpio0 26 GPIO_ACTIVE_HIGH>;
29		pinctrl-names = "default";
30		pinctrl-0 = <&otg_vbus_drv>;
31		regulator-min-microvolt = <5000000>;
32		regulator-max-microvolt = <5000000>;
33	};
34
35	vcc5v0_host: vcc5v0-host-drv {
36		compatible = "regulator-fixed";
37		regulator-name = "vcc5v0_host";
38		gpio = <&gpio2 23 GPIO_ACTIVE_HIGH>;
39		pinctrl-names = "default";
40		pinctrl-0 = <&host_vbus_drv>;
41		regulator-min-microvolt = <5000000>;
42		regulator-max-microvolt = <5000000>;
43		regulator-always-on;
44	};
45};
46
47&i2c1 {
48	status = "okay";
49
50        hym8563: hym8563@51 {
51		compatible = "haoyu,hym8563";
52		reg = <0x51>;
53		#clock-cells = <0>;
54		clock-frequency = <32768>;
55		clock-output-names = "xin32k";
56	};
57};
58
59&u2phy {
60	status = "okay";
61};
62
63&u2phy_otg {
64	status = "okay";
65};
66
67&u2phy_host {
68	status = "okay";
69};
70
71&uart2 {
72	status = "okay";
73};
74
75&usb_host_ehci {
76	status = "okay";
77};
78
79&usb_host_ohci {
80	status = "okay";
81};
82
83&usb_otg {
84	vbus-supply = <&vcc5v0_otg>;
85	status = "okay";
86};
87
88&emmc {
89	fifo-mode;
90	status = "okay";
91};
92
93&i2c0 {
94	status = "okay";
95	clock-frequency = <400000>;
96
97	rk818: pmic@1c {
98		compatible = "rockchip,rk818";
99		status = "okay";
100		reg = <0x1c>;
101		clock-output-names = "rk818-clkout1", "wifibt_32kin";
102		interrupt-parent = <&gpio3>;
103		interrupts = <22 IRQ_TYPE_LEVEL_LOW>;
104		pinctrl-names = "default";
105		pinctrl-0 = <&pmic_int_l>;
106		rockchip,system-power-controller;
107		wakeup-source;
108		#clock-cells = <1>;
109
110		vcc1-supply = <&vcc_sys>;
111		vcc2-supply = <&vcc_sys>;
112		vcc3-supply = <&vcc_sys>;
113		vcc4-supply = <&vcc_sys>;
114		vcc6-supply = <&vcc_sys>;
115		vcc7-supply = <&vcc_sys>;
116		vcc8-supply = <&vcc_sys>;
117		vcc9-supply = <&vcc_io>;
118
119		regulators {
120			vdd_arm: DCDC_REG1 {
121				regulator-name = "vdd_arm";
122				regulator-always-on;
123				regulator-boot-on;
124				regulator-min-microvolt = <750000>;
125				regulator-max-microvolt = <1450000>;
126				regulator-ramp-delay = <6001>;
127				regulator-state-mem {
128					regulator-on-in-suspend;
129					regulator-suspend-microvolt = <1100000>;
130				};
131			};
132
133			vdd_logic: DCDC_REG2 {
134				regulator-name = "vdd_logic";
135				regulator-always-on;
136				regulator-boot-on;
137				regulator-min-microvolt = <750000>;
138				regulator-max-microvolt = <1450000>;
139				regulator-ramp-delay = <6001>;
140				regulator-state-mem {
141					regulator-on-in-suspend;
142					regulator-suspend-microvolt = <1100000>;
143				};
144			};
145
146			vcc_ddr: DCDC_REG3 {
147				regulator-name = "vcc_ddr";
148				regulator-always-on;
149				regulator-boot-on;
150				regulator-state-mem {
151					regulator-on-in-suspend;
152				};
153			};
154
155			vcc_io: DCDC_REG4 {
156				regulator-name = "vcc_io";
157				regulator-always-on;
158				regulator-boot-on;
159				regulator-min-microvolt = <3300000>;
160				regulator-max-microvolt = <3300000>;
161				regulator-state-mem {
162					regulator-on-in-suspend;
163					regulator-suspend-microvolt = <3300000>;
164				};
165			};
166
167			rk818_ldo1: LDO_REG1 {
168				regulator-name = "rk818_ldo1";
169				regulator-always-on;
170				regulator-boot-on;
171				regulator-min-microvolt = <3300000>;
172				regulator-max-microvolt = <3300000>;
173				regulator-state-mem {
174					regulator-on-in-suspend;
175					regulator-suspend-microvolt = <3300000>;
176				};
177			};
178
179			rk818_ldo2: LDO_REG2 {
180				regulator-name = "rk818_ldo2";
181				regulator-always-on;
182				regulator-boot-on;
183				regulator-min-microvolt = <3000000>;
184				regulator-max-microvolt = <3000000>;
185				regulator-state-mem {
186					regulator-on-in-suspend;
187					regulator-suspend-microvolt = <3000000>;
188				};
189			};
190
191			rk818_ldo3: LDO_REG3 {
192				regulator-name = "rk818_ldo3";
193				regulator-always-on;
194				regulator-boot-on;
195				regulator-min-microvolt = <1100000>;
196				regulator-max-microvolt = <1100000>;
197				regulator-state-mem {
198					regulator-on-in-suspend;
199					regulator-suspend-microvolt = <1100000>;
200				};
201			};
202
203			rk818_ldo4: LDO_REG4 {
204				regulator-name = "rk818_ldo4";
205				regulator-always-on;
206				regulator-boot-on;
207				regulator-min-microvolt = <2800000>;
208				regulator-max-microvolt = <2800000>;
209				regulator-state-mem {
210					regulator-on-in-suspend;
211					regulator-suspend-microvolt = <2800000>;
212				};
213			};
214
215			rk818_ldo5: LDO_REG5 {
216				regulator-name = "rk818_ldo5";
217				regulator-always-on;
218				regulator-boot-on;
219				regulator-min-microvolt = <3000000>;
220				regulator-max-microvolt = <3000000>;
221				regulator-state-mem {
222					regulator-on-in-suspend;
223					regulator-suspend-microvolt = <3000000>;
224				};
225			};
226
227			rk818_ldo6: LDO_REG6 {
228				regulator-name = "rk818_ldo6";
229				regulator-always-on;
230				regulator-boot-on;
231				regulator-min-microvolt = <1200000>;
232				regulator-max-microvolt = <1200000>;
233				regulator-state-mem {
234					regulator-on-in-suspend;
235					regulator-suspend-microvolt = <1200000>;
236				};
237			};
238
239			rk818_ldo7: LDO_REG7 {
240				regulator-name = "rk818_ldo7";
241				regulator-always-on;
242				regulator-boot-on;
243				regulator-min-microvolt = <1800000>;
244				regulator-max-microvolt = <1800000>;
245				regulator-state-mem {
246					regulator-on-in-suspend;
247					regulator-suspend-microvolt = <1800000>;
248				};
249			};
250
251			rk818_ldo8: LDO_REG8 {
252				regulator-name = "rk818_ldo8";
253				regulator-always-on;
254				regulator-boot-on;
255				regulator-min-microvolt = <1800000>;
256				regulator-max-microvolt = <1800000>;
257				regulator-state-mem {
258					regulator-on-in-suspend;
259					regulator-suspend-microvolt = <1800000>;
260				};
261			};
262
263			vcc_sd: LDO_REG9 {
264				regulator-name = "vcc_sd";
265				regulator-always-on;
266				regulator-boot-on;
267				regulator-min-microvolt = <1800000>;
268				regulator-max-microvolt = <3000000>;
269				regulator-state-mem {
270					regulator-on-in-suspend;
271					regulator-suspend-microvolt = <3000000>;
272				};
273			};
274
275			rk818_ldo10: SWITCH_REG {
276				regulator-name = "rk818_ldo10";
277				regulator-always-on;
278				regulator-boot-on;
279				regulator-state-mem {
280					regulator-on-in-suspend;
281				};
282			};
283		};
284
285		battery {
286			compatible = "rk818-battery";
287			ocv_table = <3400 3650 3693 3707 3731 3749 3760
288				     3770 3782 3796 3812 3829 3852 3882
289				     3915 3951 3981 4047 4086 4132 4182>;
290			design_capacity = <4000>;
291			design_qmax = <4000>;
292			bat_res = <100>;
293			max_input_current = <2000>;
294			max_chrg_current = <1400>;
295			max_chrg_voltage = <4200>;
296			sleep_enter_current = <300>;
297			sleep_exit_current = <300>;
298			power_off_thresd = <3400>;
299			zero_algorithm_vol = <3850>;
300			energy_mode = <0>;
301			fb_temperature = <105>;
302			sample_res = <20>;
303			max_soc_offset = <60>;
304			monitor_sec = <5>;
305			virtual_power = <1>;
306			power_dc2otg = <0>;
307		};
308	};
309};
310
311&pinctrl {
312	pmic {
313		pmic_int_l: pmic-int-l {
314			rockchip,pins = <RK_GPIO3 22 RK_FUNC_GPIO &pcfg_pull_default>;
315		};
316	};
317
318	usb_otg {
319		otg_vbus_drv: otg-vbus-drv {
320			rockchip,pins = <0 26 RK_FUNC_GPIO &pcfg_pull_none>;
321		};
322	};
323
324	usb_host {
325		host_vbus_drv: host-vbus-drv {
326			rockchip,pins = <2 23 RK_FUNC_GPIO &pcfg_pull_none>;
327		};
328	};
329};
330