xref: /rk3399_rockchip-uboot/arch/arm/dts/px30-evb.dts (revision f67f522b54c0b5a249daa34aa63d01988a785ccd)
1/*
2 * (C) Copyright 2017 Rockchip Electronics Co., Ltd
3 *
4 * SPDX-License-Identifier:     GPL-2.0+
5 */
6
7/dts-v1/;
8#include "px30.dtsi"
9#include "px30-u-boot.dtsi"
10#include <dt-bindings/input/input.h>
11
12/ {
13	model = "Rockchip PX30 EVB";
14	compatible = "rockchip,px30-evb", "rockchip,px30";
15
16	chosen {
17		stdout-path = &uart2;
18	};
19
20	dmc: dmc@20004000 {
21		u-boot,dm-pre-reloc;
22		compatible = "rockchip,px30-dmc", "syscon";
23		reg = <0x0 0xff2a0000 0x0 0x1000>;
24	};
25
26	adc-keys {
27		compatible = "adc-keys";
28		io-channels = <&saradc 2>;
29		io-channel-names = "buttons";
30		keyup-threshold-microvolt = <1800000>;
31
32		vol-up-key {
33			linux,code = <KEY_VOLUMEUP>;
34			label = "volume up";
35			press-threshold-microvolt = <10000>;
36		};
37
38		vol-down-key {
39			linux,code = <KEY_VOLUMEDOWN>;
40			label = "volume down";
41			press-threshold-microvolt = <170000>;
42		};
43
44		home-key {
45			linux,code = <KEY_HOME>;
46			label = "home";
47			press-threshold-microvolt = <254000>;
48		};
49
50		menu-key {
51			linux,code = <KEY_MENU>;
52			label = "menu";
53			press-threshold-microvolt = <414000>;
54		};
55
56		esc-key {
57			linux,code = <KEY_ESC>;
58			label = "esc";
59			press-threshold-microvolt = <614000>;
60		};
61	};
62};
63
64
65&i2c0 {
66	status = "okay";
67
68	rk817: pmic@20 {
69		compatible = "rockchip,rk817";
70		reg = <0x20>;
71		interrupt-parent = <&gpio0>;
72		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
73		pinctrl-names = "default";
74		pinctrl-0 = <&pmic_int>;
75		rockchip,system-power-controller;
76		wakeup-source;
77		#clock-cells = <1>;
78		clock-output-names = "xin32k", "rk808-clkout2";
79
80		vcc1-supply = <&vccsys>;
81		vcc2-supply = <&vccsys>;
82		vcc3-supply = <&vccsys>;
83		vcc4-supply = <&vccsys>;
84		vcc5-supply = <&vccsys>;
85		vcc6-supply = <&vccsys>;
86		vcc7-supply = <&vcc_3v0>;
87		vcc8-supply = <&vccsys>;
88		vcc9-supply = <&dcdc_boost>;
89
90		vccsys: vccsys{
91			compatible = "regulator-fixed";
92			regulator-name = "vcc3v8_sys";
93			regulator-always-on;
94			regulator-boot-on;
95			regulator-min-microvolt = <3800000>;
96			regulator-max-microvolt = <3800000>;
97		};
98
99		rk817_pin0_ts: rk817_pin0_ts {
100			pins = "gpio0";
101			function = "pin_fun0";
102		};
103
104		rk817_pin0_gpio: rk817_pin0_gpio {
105			pins = "gpio0";
106			function = "gpio";
107		};
108
109		rk817_pin1_gt: rk817_pin1_gt {
110			pins = "gpio1";
111			function = "pin_fun0";
112		};
113
114		rk817_pin1_gpio: rk817_pin1_gpio {
115			pins = "gpio1";
116			function = "gpio";
117		};
118
119		regulators {
120			vdd_arm: DCDC_REG1 {
121				regulator-always-on;
122				regulator-boot-on;
123				regulator-min-microvolt = <950000>;
124				regulator-max-microvolt = <1350000>;
125				regulator-ramp-delay = <6001>;
126				regulator-initial-mode = <0x1>;
127				regulator-name = "vdd_arm";
128				regulator-state-mem {
129					regulator-on-in-suspend;
130					regulator-suspend-microvolt = <700000>;
131				};
132			};
133
134			vdd_logic: DCDC_REG2 {
135				regulator-always-on;
136				regulator-boot-on;
137				regulator-min-microvolt = <950000>;
138				regulator-max-microvolt = <1350000>;
139				regulator-ramp-delay = <6001>;
140				regulator-initial-mode = <0x1>;
141				regulator-name = "vdd_logic";
142				regulator-state-mem {
143					regulator-off-in-suspend;
144					regulator-suspend-microvolt = <800000>;
145				};
146			};
147
148			vcc_ddr: DCDC_REG3 {
149				regulator-always-on;
150				regulator-boot-on;
151				regulator-initial-mode = <0x1>;
152				regulator-name = "vcc_ddr";
153					regulator-state-mem {
154					regulator-on-in-suspend;
155				};
156			};
157
158			vcc_3v0: DCDC_REG4 {
159				regulator-always-on;
160				regulator-boot-on;
161				regulator-min-microvolt = <3000000>;
162				regulator-max-microvolt = <3000000>;
163				regulator-initial-mode = <0x1>;
164				regulator-name = "vcc_3v0";
165				regulator-state-mem {
166					regulator-off-in-suspend;
167					regulator-suspend-microvolt = <3000000>;
168				};
169			};
170
171			vcc2v5_ddr: LDO_REG1 {
172				regulator-always-on;
173				regulator-boot-on;
174				regulator-min-microvolt = <2500000>;
175				regulator-max-microvolt = <2500000>;
176				regulator-name = "vcc2v5_ddr";
177				regulator-state-mem {
178					regulator-on-in-suspend;
179					regulator-suspend-microvolt = <2500000>;
180				};
181			};
182
183			vcc1v8_soc: LDO_REG2 {
184				regulator-always-on;
185				regulator-boot-on;
186				regulator-min-microvolt = <1800000>;
187				regulator-max-microvolt = <1800000>;
188
189				regulator-name = "vcc1v8_soc";
190				regulator-state-mem {
191					regulator-on-in-suspend;
192					regulator-suspend-microvolt = <1800000>;
193				};
194			};
195
196			vdd1v0_soc: LDO_REG3 {
197				regulator-always-on;
198				regulator-boot-on;
199				regulator-min-microvolt = <1000000>;
200				regulator-max-microvolt = <1000000>;
201
202				regulator-name = "vcc1v0_soc";
203				regulator-state-mem {
204					regulator-off-in-suspend;
205					regulator-suspend-microvolt = <1000000>;
206				};
207			};
208
209			vcc3v0_pmu: LDO_REG4 {
210				regulator-always-on;
211				regulator-boot-on;
212				regulator-min-microvolt = <3000000>;
213				regulator-max-microvolt = <3000000>;
214
215				regulator-name = "vcc3v0_pmu";
216				regulator-state-mem {
217					regulator-off-in-suspend;
218					regulator-suspend-microvolt = <3000000>;
219				};
220			};
221
222			vccio_sd: LDO_REG5 {
223				regulator-always-on;
224				regulator-boot-on;
225				regulator-min-microvolt = <3300000>;
226				regulator-max-microvolt = <3300000>;
227
228				regulator-name = "vccio_sd";
229				regulator-state-mem {
230					regulator-on-in-suspend;
231					regulator-suspend-microvolt = <3300000>;
232				};
233			};
234
235			vcc_sd: LDO_REG6 {
236				regulator-always-on;
237				regulator-boot-on;
238				regulator-min-microvolt = <3300000>;
239				regulator-max-microvolt = <3300000>;
240
241				regulator-name = "vcc_sd";
242				regulator-state-mem {
243					regulator-on-in-suspend;
244					regulator-suspend-microvolt = <3300000>;
245				};
246			};
247
248			vcc2v8_dvp: LDO_REG7 {
249			regulator-always-on;
250				regulator-boot-on;
251				regulator-min-microvolt = <2800000>;
252				regulator-max-microvolt = <2800000>;
253
254				regulator-name = "vcc2v8_dvp";
255				regulator-state-mem {
256					regulator-off-in-suspend;
257					regulator-suspend-microvolt = <2800000>;
258				};
259			};
260
261			vcc1v8_dvp: LDO_REG8 {
262				regulator-always-on;
263				regulator-boot-on;
264				regulator-min-microvolt = <1800000>;
265				regulator-max-microvolt = <1800000>;
266
267				regulator-name = "vcc1v8_dvp";
268				regulator-state-mem {
269					regulator-on-in-suspend;
270					regulator-suspend-microvolt = <1800000>;
271				};
272			};
273
274			vdd1v5_dvp: LDO_REG9 {
275				regulator-always-on;
276				regulator-boot-on;
277				regulator-min-microvolt = <1500000>;
278				regulator-max-microvolt = <1500000>;
279
280				regulator-name = "vdd1v5_dvp";
281				regulator-state-mem {
282					regulator-off-in-suspend;
283					regulator-suspend-microvolt = <1500000>;
284				};
285			};
286
287			dcdc_boost: BOOST {
288				regulator-always-on;
289				regulator-boot-on;
290				regulator-min-microvolt = <4700000>;
291				regulator-max-microvolt = <5400000>;
292				regulator-name = "boost";
293			};
294
295			otg_switch: OTG_SWITCH {
296				regulator-always-on;
297				regulator-boot-on;
298				regulator-name = "otg_switch";
299			};
300		};
301
302		battery {
303			compatible = "rk817,battery";
304			ocv_table = <3500 3625 3685 3697 3718 3735 3748
305						3760 3774 3788 3802 3816 3834 3853
306						3877 3908 3946 3975 4018 4071 4106>;
307			design_capacity = <2500>;
308			design_qmax = <2750>;
309			bat_res = <100>;
310			sleep_enter_current = <300>;
311			sleep_exit_current = <300>;
312			sleep_filter_current = <100>;
313			power_off_thresd = <3500>;
314			zero_algorithm_vol = <3850>;
315			max_soc_offset = <60>;
316			monitor_sec = <5>;
317			sample_res = <10>;
318			virtual_power = <1>;
319		};
320
321		charger {
322			compatible = "rk817,charger";
323			min_input_voltage = <4500>;
324			max_input_current = <1500>;
325			max_chrg_current = <1300>;
326			max_chrg_voltage = <4200>;
327			chrg_term_mode = <1>;
328			chrg_finish_cur = <300>;
329			virtual_power = <0>;
330			dc_det_adc = <0>;
331		};
332	};
333};
334
335&emmc {
336	u-boot,dm-pre-reloc;
337	fifo-mode;
338	bus-width = <8>;
339	cap-mmc-highspeed;
340	supports-emmc;
341	disable-wp;
342	non-removable;
343	num-slots = <1>;
344	pinctrl-names = "default";
345	pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
346	status = "okay";
347};
348
349&saradc {
350	status = "okay";
351};
352
353&pinctrl {
354	pmic {
355	pmic_int: pmic_int {
356		rockchip,pins =
357			<0 7 RK_FUNC_GPIO &pcfg_pull_up>;
358		};
359	};
360};