xref: /OK3568_Linux_fs/u-boot/arch/arm/dts/px30-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#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	adc-keys {
17		u-boot,dm-pre-reloc;
18		compatible = "adc-keys";
19		io-channels = <&saradc 2>;
20		io-channel-names = "buttons";
21		keyup-threshold-microvolt = <1800000>;
22
23		vol-up-key {
24			u-boot,dm-pre-reloc;
25			linux,code = <KEY_VOLUMEUP>;
26			label = "volume up";
27			press-threshold-microvolt = <10000>;
28		};
29
30		vol-down-key {
31			linux,code = <KEY_VOLUMEDOWN>;
32			label = "volume down";
33			press-threshold-microvolt = <170000>;
34		};
35
36		home-key {
37			linux,code = <KEY_HOME>;
38			label = "home";
39			press-threshold-microvolt = <254000>;
40		};
41
42		menu-key {
43			linux,code = <KEY_MENU>;
44			label = "menu";
45			press-threshold-microvolt = <414000>;
46		};
47
48		esc-key {
49			linux,code = <KEY_ESC>;
50			label = "esc";
51			press-threshold-microvolt = <614000>;
52		};
53	};
54
55	backlight: backlight {
56		compatible = "pwm-backlight";
57		pwms = <&pwm1 0 25000 0>;
58		brightness-levels = <
59			  0   1   2   3   4   5   6   7
60			  8   9  10  11  12  13  14  15
61			 16  17  18  19  20  21  22  23
62			 24  25  26  27  28  29  30  31
63			 32  33  34  35  36  37  38  39
64			 40  41  42  43  44  45  46  47
65			 48  49  50  51  52  53  54  55
66			 56  57  58  59  60  61  62  63
67			 64  65  66  67  68  69  70  71
68			 72  73  74  75  76  77  78  79
69			 80  81  82  83  84  85  86  87
70			 88  89  90  91  92  93  94  95
71			 96  97  98  99 100 101 102 103
72			104 105 106 107 108 109 110 111
73			112 113 114 115 116 117 118 119
74			120 121 122 123 124 125 126 127
75			128 129 130 131 132 133 134 135
76			136 137 138 139 140 141 142 143
77			144 145 146 147 148 149 150 151
78			152 153 154 155 156 157 158 159
79			160 161 162 163 164 165 166 167
80			168 169 170 171 172 173 174 175
81			176 177 178 179 180 181 182 183
82			184 185 186 187 188 189 190 191
83			192 193 194 195 196 197 198 199
84			200 201 202 203 204 205 206 207
85			208 209 210 211 212 213 214 215
86			216 217 218 219 220 221 222 223
87			224 225 226 227 228 229 230 231
88			232 233 234 235 236 237 238 239
89			240 241 242 243 244 245 246 247
90			248 249 250 251 252 253 254 255>;
91		default-brightness-level = <200>;
92	};
93
94	vcc_phy: vcc-phy-regulator {
95		compatible = "regulator-fixed";
96		regulator-name = "vcc_phy";
97		regulator-always-on;
98		regulator-boot-on;
99	};
100};
101
102&gmac {
103	phy-supply = <&vcc_phy>;
104	clock_in_out = "output";
105	snps,reset-gpio = <&gpio2 13 GPIO_ACTIVE_LOW>;
106	snps,reset-active-low;
107	snps,reset-delays-us = <0 50000 50000>;
108	status = "okay";
109};
110
111&i2c0 {
112	status = "okay";
113
114	rk817: pmic@20 {
115		compatible = "rockchip,rk817";
116		reg = <0x20>;
117		interrupt-parent = <&gpio0>;
118		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
119		pinctrl-names = "default";
120		pinctrl-0 = <&pmic_int>;
121		rockchip,system-power-controller;
122		wakeup-source;
123		#clock-cells = <1>;
124		clock-output-names = "xin32k", "rk808-clkout2";
125
126		vcc1-supply = <&vccsys>;
127		vcc2-supply = <&vccsys>;
128		vcc3-supply = <&vccsys>;
129		vcc4-supply = <&vccsys>;
130		vcc5-supply = <&vccsys>;
131		vcc6-supply = <&vccsys>;
132		vcc7-supply = <&vcc_3v0>;
133		vcc8-supply = <&vccsys>;
134		vcc9-supply = <&dcdc_boost>;
135
136		vccsys: vccsys{
137			compatible = "regulator-fixed";
138			regulator-name = "vcc3v8_sys";
139			regulator-always-on;
140			regulator-boot-on;
141			regulator-min-microvolt = <3800000>;
142			regulator-max-microvolt = <3800000>;
143		};
144
145		rk817_pin0_ts: rk817_pin0_ts {
146			pins = "gpio0";
147			function = "pin_fun0";
148		};
149
150		rk817_pin0_gpio: rk817_pin0_gpio {
151			pins = "gpio0";
152			function = "gpio";
153		};
154
155		rk817_pin1_gt: rk817_pin1_gt {
156			pins = "gpio1";
157			function = "pin_fun0";
158		};
159
160		rk817_pin1_gpio: rk817_pin1_gpio {
161			pins = "gpio1";
162			function = "gpio";
163		};
164
165		pwrkey {
166			status = "okay";
167		};
168
169		regulators {
170			vdd_arm: DCDC_REG1 {
171				regulator-always-on;
172				regulator-boot-on;
173				regulator-min-microvolt = <950000>;
174				regulator-max-microvolt = <1350000>;
175				regulator-ramp-delay = <6001>;
176				regulator-initial-mode = <0x1>;
177				regulator-name = "vdd_arm";
178				regulator-state-mem {
179					regulator-on-in-suspend;
180					regulator-suspend-microvolt = <700000>;
181				};
182			};
183
184			vdd_logic: DCDC_REG2 {
185				regulator-always-on;
186				regulator-boot-on;
187				regulator-min-microvolt = <950000>;
188				regulator-max-microvolt = <1350000>;
189				regulator-ramp-delay = <6001>;
190				regulator-initial-mode = <0x1>;
191				regulator-name = "vdd_logic";
192				regulator-state-mem {
193					regulator-off-in-suspend;
194					regulator-suspend-microvolt = <800000>;
195				};
196			};
197
198			vcc_ddr: DCDC_REG3 {
199				regulator-always-on;
200				regulator-boot-on;
201				regulator-initial-mode = <0x1>;
202				regulator-name = "vcc_ddr";
203					regulator-state-mem {
204					regulator-on-in-suspend;
205				};
206			};
207
208			vcc_3v0: DCDC_REG4 {
209				regulator-always-on;
210				regulator-boot-on;
211				regulator-min-microvolt = <3000000>;
212				regulator-max-microvolt = <3000000>;
213				regulator-initial-mode = <0x1>;
214				regulator-name = "vcc_3v0";
215				regulator-state-mem {
216					regulator-off-in-suspend;
217					regulator-suspend-microvolt = <3000000>;
218				};
219			};
220
221			vcc2v5_ddr: LDO_REG1 {
222				regulator-always-on;
223				regulator-boot-on;
224				regulator-min-microvolt = <2500000>;
225				regulator-max-microvolt = <2500000>;
226				regulator-name = "vcc2v5_ddr";
227				regulator-state-mem {
228					regulator-on-in-suspend;
229					regulator-suspend-microvolt = <2500000>;
230				};
231			};
232
233			vcc1v8_soc: LDO_REG2 {
234				regulator-always-on;
235				regulator-boot-on;
236				regulator-min-microvolt = <1800000>;
237				regulator-max-microvolt = <1800000>;
238
239				regulator-name = "vcc1v8_soc";
240				regulator-state-mem {
241					regulator-on-in-suspend;
242					regulator-suspend-microvolt = <1800000>;
243				};
244			};
245
246			vdd1v0_soc: LDO_REG3 {
247				regulator-always-on;
248				regulator-boot-on;
249				regulator-min-microvolt = <1000000>;
250				regulator-max-microvolt = <1000000>;
251
252				regulator-name = "vcc1v0_soc";
253				regulator-state-mem {
254					regulator-off-in-suspend;
255					regulator-suspend-microvolt = <1000000>;
256				};
257			};
258
259			vcc3v0_pmu: LDO_REG4 {
260				regulator-always-on;
261				regulator-boot-on;
262				regulator-min-microvolt = <3000000>;
263				regulator-max-microvolt = <3000000>;
264
265				regulator-name = "vcc3v0_pmu";
266				regulator-state-mem {
267					regulator-off-in-suspend;
268					regulator-suspend-microvolt = <3000000>;
269				};
270			};
271
272			vccio_sd: LDO_REG5 {
273				regulator-always-on;
274				regulator-boot-on;
275				regulator-min-microvolt = <1800000>;
276				regulator-max-microvolt = <3300000>;
277
278				regulator-name = "vccio_sd";
279				regulator-state-mem {
280					regulator-on-in-suspend;
281					regulator-suspend-microvolt = <3300000>;
282				};
283			};
284
285			vcc_sd: LDO_REG6 {
286				regulator-always-on;
287				regulator-boot-on;
288				regulator-min-microvolt = <3300000>;
289				regulator-max-microvolt = <3300000>;
290
291				regulator-name = "vcc_sd";
292				regulator-state-mem {
293					regulator-on-in-suspend;
294					regulator-suspend-microvolt = <3300000>;
295				};
296			};
297
298			vcc2v8_dvp: LDO_REG7 {
299			regulator-always-on;
300				regulator-boot-on;
301				regulator-min-microvolt = <2800000>;
302				regulator-max-microvolt = <2800000>;
303
304				regulator-name = "vcc2v8_dvp";
305				regulator-state-mem {
306					regulator-off-in-suspend;
307					regulator-suspend-microvolt = <2800000>;
308				};
309			};
310
311			vcc1v8_dvp: LDO_REG8 {
312				regulator-always-on;
313				regulator-boot-on;
314				regulator-min-microvolt = <1800000>;
315				regulator-max-microvolt = <1800000>;
316
317				regulator-name = "vcc1v8_dvp";
318				regulator-state-mem {
319					regulator-on-in-suspend;
320					regulator-suspend-microvolt = <1800000>;
321				};
322			};
323
324			vdd1v5_dvp: LDO_REG9 {
325				regulator-always-on;
326				regulator-boot-on;
327				regulator-min-microvolt = <1500000>;
328				regulator-max-microvolt = <1500000>;
329
330				regulator-name = "vdd1v5_dvp";
331				regulator-state-mem {
332					regulator-off-in-suspend;
333					regulator-suspend-microvolt = <1500000>;
334				};
335			};
336
337			dcdc_boost: BOOST {
338				regulator-always-on;
339				regulator-boot-on;
340				regulator-min-microvolt = <4700000>;
341				regulator-max-microvolt = <5400000>;
342				regulator-name = "boost";
343			};
344
345			otg_switch: OTG_SWITCH {
346				regulator-always-on;
347				regulator-boot-on;
348				regulator-name = "otg_switch";
349			};
350		};
351
352		battery {
353			compatible = "rk817,battery";
354			ocv_table = <3500 3625 3685 3697 3718 3735 3748
355						3760 3774 3788 3802 3816 3834 3853
356						3877 3908 3946 3975 4018 4071 4106>;
357			design_capacity = <2500>;
358			design_qmax = <2750>;
359			bat_res = <100>;
360			sleep_enter_current = <300>;
361			sleep_exit_current = <300>;
362			sleep_filter_current = <100>;
363			power_off_thresd = <3500>;
364			zero_algorithm_vol = <3850>;
365			max_soc_offset = <60>;
366			monitor_sec = <5>;
367			sample_res = <10>;
368			virtual_power = <1>;
369		};
370
371		charger {
372			compatible = "rk817,charger";
373			min_input_voltage = <4500>;
374			max_input_current = <1500>;
375			max_chrg_current = <1300>;
376			max_chrg_voltage = <4200>;
377			chrg_term_mode = <1>;
378			chrg_finish_cur = <300>;
379			virtual_power = <0>;
380			dc_det_adc = <0>;
381		};
382	};
383};
384
385&sdmmc {
386	bus-width = <4>;
387	cap-mmc-highspeed;
388	cap-sd-highspeed;
389	supports-sd;
390	card-detect-delay = <800>;
391	ignore-pm-notify;
392	/*cd-gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>; [> CD GPIO <]*/
393	sd-uhs-sdr12;
394	sd-uhs-sdr25;
395	sd-uhs-sdr50;
396	sd-uhs-sdr104;
397	vqmmc-supply = <&vccio_sd>;
398	vmmc-supply = <&vcc_sd>;
399	status = "okay";
400};
401
402&crypto {
403	status = "okay";
404};
405
406&emmc {
407	bus-width = <8>;
408	cap-mmc-highspeed;
409	mmc-hs200-1_8v;
410	supports-emmc;
411	disable-wp;
412	non-removable;
413	num-slots = <1>;
414	pinctrl-names = "default";
415	pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
416	status = "okay";
417};
418
419&pwm1 {
420	status = "okay";
421};
422
423&uart5 {
424	status = "okay";
425};
426
427&uart2 {
428	status = "okay";
429};
430
431&pinctrl {
432	pmic {
433	pmic_int: pmic_int {
434		rockchip,pins =
435			<0 7 RK_FUNC_GPIO &pcfg_pull_up>;
436		};
437	};
438};
439
440&u2phy {
441	status = "okay";
442};
443
444&u2phy_otg {
445	status = "okay";
446};
447
448&u2phy_host {
449	status = "okay";
450};
451