xref: /rk3399_rockchip-uboot/arch/arm/dts/rk3126-evb.dts (revision aee63dc84c1f5be59ea35ceb209a4ea937bdeb41)
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 <dt-bindings/input/input.h>
11
12/ {
13	model = "Rockchip RK3126 Evaluation board";
14	compatible = "rockchip,rk3128-evb", "rockchip,rk3128";
15
16	chosen {
17		stdout-path = &uart2;
18	};
19
20	vcc5v0_otg: vcc5v0-otg-drv {
21		compatible = "regulator-fixed";
22		regulator-name = "vcc5v0_otg";
23		gpio = <&gpio0 26 GPIO_ACTIVE_HIGH>;
24		pinctrl-names = "default";
25		pinctrl-0 = <&otg_vbus_drv>;
26		regulator-min-microvolt = <5000000>;
27		regulator-max-microvolt = <5000000>;
28	};
29
30	vcc5v0_host: vcc5v0-host-drv {
31		compatible = "regulator-fixed";
32		regulator-name = "vcc5v0_host";
33		gpio = <&gpio2 23 GPIO_ACTIVE_HIGH>;
34		pinctrl-names = "default";
35		pinctrl-0 = <&host_vbus_drv>;
36		regulator-min-microvolt = <5000000>;
37		regulator-max-microvolt = <5000000>;
38		regulator-always-on;
39	};
40
41	vcc_backlight: vcc-backlight {
42		compatible = "regulator-fixed";
43		regulator-name = "vcc_backlight";
44		regulator-min-microvolt = <5000000>;
45		regulator-max-microvolt = <5000000>;
46		regulator-always-on;
47	};
48
49	backlight: backlight {
50		compatible = "pwm-backlight";
51		brightness-levels = <
52			0   1   2   3   4   5   6   7
53			8   9  10  11  12  13  14  15
54			16  17  18  19  20  21  22  23
55			24  25  26  27  28  29  30  31
56			32  33  34  35  36  37  38  39
57			40  41  42  43  44  45  46  47
58			48  49  50  51  52  53  54  55
59			56  57  58  59  60  61  62  63
60			64  65  66  67  68  69  70  71
61			72  73  74  75  76  77  78  79
62			80  81  82  83  84  85  86  87
63			88  89  90  91  92  93  94  95
64			96  97  98  99 100 101 102 103
65			104 105 106 107 108 109 110 111
66			112 113 114 115 116 117 118 119
67			120 121 122 123 124 125 126 127
68			128 129 130 131 132 133 134 135
69			136 137 138 139 140 141 142 143
70			144 145 146 147 148 149 150 151
71			152 153 154 155 156 157 158 159
72			160 161 162 163 164 165 166 167
73			168 169 170 171 172 173 174 175
74			176 177 178 179 180 181 182 183
75			184 185 186 187 188 189 190 191
76			192 193 194 195 196 197 198 199
77			200 201 202 203 204 205 206 207
78			208 209 210 211 212 213 214 215
79			216 217 218 219 220 221 222 223
80			224 225 226 227 228 229 230 231
81			232 233 234 235 236 237 238 239
82			240 241 242 243 244 245 246 247
83			248 249 250 251 252 253 254 255>;
84		default-brightness-level = <128>;
85		pwms = <&pwm0 0 1000000 1>;
86		enable-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>;
87		power-supply = <&vcc_backlight>;
88		status = "okay";
89	};
90
91	lvds_panel: lvds-panel {
92		u-boot,dm-pre-reloc;
93		compatible ="simple-panel";
94		backlight = <&backlight>;
95		bus-format = <0x1009>;
96		/* enable-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>;
97		 * delay,disable = <10>;
98		 * power-supply = <&vcc_lcd>;
99		 */
100		power-supply = <&ldo6>;
101		power-invert = <1>;
102		rockchip,data-mapping = "jeida";
103		rockchip,data-width = <18>;
104		rockchip,output = "rgb";
105
106		display-timings {
107			native-mode = <&timing0>;
108			timing0: timing0 {
109				clock-frequency = <60000000>;
110				hactive = <1024>;
111				vactive = <600>;
112				hback-porch = <100>;
113				hfront-porch = <120>;
114				vback-porch = <10>;
115				vfront-porch = <15>;
116				hsync-len = <100>;
117				vsync-len = <10>;
118				hsync-active = <0>;
119				vsync-active = <0>;
120				de-active = <0>;
121				pixelclk-active = <0>;
122			};
123		};
124
125		ports {
126			panel_in_lvds: endpoint {
127				remote-endpoint = <&lvds_out_panel>;
128			};
129		};
130	};
131
132	adc-keys {
133		compatible = "adc-keys";
134		io-channels = <&saradc 2>;
135		io-channel-names = "buttons";
136		poll-interval = <100>;
137		keyup-threshold-microvolt = <3300000>;
138
139		button-up {
140			label = "Volume Up";
141			linux,code = <KEY_VOLUMEUP>;
142			press-threshold-microvolt = <0>;
143		};
144
145		button-down {
146			label = "Volume Down";
147			linux,code = <KEY_VOLUMEDOWN>;
148			press-threshold-microvolt = <1650000>;
149		};
150	};
151
152	charge-animation {
153		compatible = "charge-animation";
154		screen-on-voltage-threshold = <3350>;
155		power-on-voltage-threshold = <3450>;
156		power-on-soc-threshold = <0>;
157		status = "okay";
158	};
159};
160
161&i2c1 {
162	status = "okay";
163
164        hym8563: hym8563@51 {
165		compatible = "haoyu,hym8563";
166		reg = <0x51>;
167		#clock-cells = <0>;
168		clock-frequency = <32768>;
169		clock-output-names = "xin32k";
170	};
171};
172
173&i2c2 {
174	clock-frequency = <100000>;
175	status = "okay";
176
177	rk816: pmic@1a {
178		compatible = "rockchip,rk816";
179		reg = <0x1a>;
180		interrupt-parent = <&gpio0>;
181		interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
182		pinctrl-names = "default";
183		pinctrl-0 = <&pmic_int_l>;
184		rockchip,system-power-controller;
185		wakeup-source;
186		gpio-controller;
187		#gpio-cells = <2>;
188		#clock-cells = <1>;
189		clock-output-names = "xin32k", "rk816-clkout2";
190
191		gpio {
192			status = "okay";
193		};
194
195		pwrkey {
196			status = "okay";
197		};
198
199		rtc {
200			status = "okay";
201		};
202
203		battery {
204			compatible = "rk816-battery";
205			ocv_table = < 3400 3654 3686 3710 3744 3775 3803
206						  3825 3843 3858 3870 3886 3916 3955
207						  3988 4010 4023 4032 4049 4080 4151 >;
208			design_capacity = <2000>;
209			design_qmax = <2200>;
210			bat_res = <120>;
211			max_input_current = <2000>;
212			max_chrg_current = <1000>;
213			max_chrg_voltage = <4200>;
214			sleep_enter_current = <300>;
215			sleep_exit_current = <300>;
216			sleep_filter_current = <100>;
217			power_off_thresd = <3500>;
218			zero_algorithm_vol = <3800>;
219			max_soc_offset = <60>;
220			monitor_sec = <5>;
221			virtual_power = <0>;
222			power_dc2otg = <0>;
223			dc_det_adc = <0>;
224		};
225
226		regulators {
227
228			vdd_arm: DCDC_REG1{
229				regulator-name= "vdd_arm";
230				regulator-min-microvolt = <750000>;
231				regulator-max-microvolt = <1500000>;
232				regulator-ramp-delay = <6001>;
233				regulator-always-on;
234				regulator-boot-on;
235				regulator-state-mem {
236					regulator-on-in-suspend;
237					regulator-suspend-microvolt = <900000>;
238				};
239			};
240
241			vdd_log: DCDC_REG2 {
242				regulator-name= "vdd_logic";
243				regulator-min-microvolt = <750000>;
244				regulator-max-microvolt = <1500000>;
245				regulator-ramp-delay = <6001>;
246				regulator-always-on;
247				regulator-boot-on;
248				regulator-state-mem {
249					regulator-on-in-suspend;
250					regulator-suspend-microvolt = <1000000>;
251				};
252			};
253
254			vcc_ddr: DCDC_REG3 {
255				regulator-name = "vcc_ddr";
256				regulator-always-on;
257				regulator-boot-on;
258			};
259
260			vcc_io: DCDC_REG4 {
261				regulator-name = "vcc_io";
262				regulator-min-microvolt = <3300000>;
263				regulator-max-microvolt = <3300000>;
264				regulator-always-on;
265				regulator-boot-on;
266				regulator-state-mem {
267					regulator-on-in-suspend;
268					regulator-suspend-microvolt = <3000000>;
269				};
270			};
271
272			vcc28_cif: LDO_REG1 {
273				regulator-name = "vcc28_cif";
274				regulator-min-microvolt = <2800000>;
275				regulator-max-microvolt = <2800000>;
276				regulator-always-on;
277				regulator-boot-on;
278				regulator-state-mem {
279					regulator-off-in-suspend;
280				};
281			};
282
283			vcc18_cif: LDO_REG2 {
284				regulator-name = "vcc18_cif";
285				regulator-min-microvolt = <1800000>;
286				regulator-max-microvolt = <1800000>;
287				regulator-always-on;
288				regulator-boot-on;
289				regulator-state-mem {
290					regulator-off-in-suspend;
291				};
292			};
293
294			vdd_11: LDO_REG3 {
295				regulator-name = "vdd_11";
296				regulator-min-microvolt = <1100000>;
297				regulator-max-microvolt = <1100000>;
298				regulator-always-on;
299				regulator-boot-on;
300				regulator-state-mem {
301					regulator-on-in-suspend;
302					regulator-suspend-microvolt = <1100000>;
303				};
304			};
305
306			ldo4: LDO_REG4 {
307				regulator-name= "ldo4";
308				regulator-min-microvolt = <3300000>;
309				regulator-max-microvolt = <3300000>;
310				regulator-always-on;
311				regulator-boot-on;
312				regulator-state-mem {
313					regulator-off-in-suspend;
314				};
315			};
316
317			ldo5: LDO_REG5 {
318				regulator-name= "ldo5";
319				regulator-min-microvolt = <3000000>;
320				regulator-max-microvolt = <3000000>;
321				regulator-always-on;
322				regulator-boot-on;
323				regulator-state-mem {
324					regulator-off-in-suspend;
325				};
326			};
327
328			ldo6: LDO_REG6 {
329				regulator-name= "ldo6";
330				regulator-min-microvolt = <3300000>;
331				regulator-max-microvolt = <3300000>;
332				regulator-state-mem {
333					regulator-on-in-suspend;
334					regulator-suspend-microvolt = <3300000>;
335				};
336			};
337		};
338	};
339};
340
341&u2phy {
342	status = "okay";
343};
344
345&u2phy_otg {
346	status = "okay";
347};
348
349&u2phy_host {
350	status = "okay";
351};
352
353&usb_host_ehci {
354	status = "okay";
355};
356
357&usb_host_ohci {
358	status = "okay";
359};
360
361&usb_otg {
362	vbus-supply = <&vcc5v0_otg>;
363	status = "okay";
364};
365
366&emmc {
367	fifo-mode;
368	status = "okay";
369};
370
371&lvds {
372	status = "okay";
373	ports {
374		lvds_out: endpoint@0 {
375			reg = <0>;
376			lvds_out_panel: endpoint {
377				remote-endpoint = <&panel_in_lvds>;
378			};
379		};
380	};
381};
382
383&vop {
384	status = "okay";
385};
386
387&pinctrl {
388	usb_otg {
389		otg_vbus_drv: host-vbus-drv {
390			rockchip,pins = <0 26 RK_FUNC_GPIO &pcfg_pull_none>;
391		};
392	};
393
394	usb_host {
395		host_vbus_drv: host-vbus-drv {
396			rockchip,pins = <2 23 RK_FUNC_GPIO &pcfg_pull_none>;
397		};
398	};
399
400	pmic_int_l: pmic-int-l {
401			rockchip,pins =
402				<0 2 RK_FUNC_GPIO &pcfg_pull_none>;
403	};
404};
405
406&saradc {
407	status = "okay";
408};
409