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