xref: /rk3399_rockchip-uboot/arch/arm/dts/rk3288-evb.dtsi (revision 37e5dcc8baea3dc897741e9be973d7d226f5edb4)
1/*
2 * (C) Copyright 2016 Rockchip Electronics Co., Ltd
3 *
4 * SPDX-License-Identifier:     GPL-2.0+ X11
5 */
6
7#include "rk3288.dtsi"
8#include "rk3288-u-boot.dtsi"
9#include <dt-bindings/input/input.h>
10
11/ {
12	memory {
13		reg = <0 0x80000000>;
14	};
15
16	adc-keys {
17		compatible = "adc-keys";
18		io-channels = <&saradc 1>;
19
20		volup-key {
21			linux,code = <KEY_VOLUMEUP>;
22			label = "volume up";
23			press-threshold-microvolt = <18000>;
24		};
25	};
26
27	ext_gmac: external-gmac-clock {
28		compatible = "fixed-clock";
29		#clock-cells = <0>;
30		clock-frequency = <125000000>;
31		clock-output-names = "ext_gmac";
32	};
33
34	keys: gpio-keys {
35		compatible = "gpio-keys";
36		#address-cells = <1>;
37		#size-cells = <0>;
38
39		button@0 {
40			gpio-key,wakeup = <1>;
41			gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
42			label = "GPIO Power";
43			linux,code = <116>;
44			pinctrl-names = "default";
45			pinctrl-0 = <&pwr_key>;
46		};
47	};
48
49	vcc_sys: vsys-regulator {
50		compatible = "regulator-fixed";
51		regulator-name = "vcc_sys";
52		regulator-min-microvolt = <5000000>;
53		regulator-max-microvolt = <5000000>;
54		regulator-always-on;
55		regulator-boot-on;
56	};
57
58	vcc_flash: flash-regulator {
59		compatible = "regulator-fixed";
60		regulator-name = "vcc_flash";
61		regulator-min-microvolt = <1800000>;
62		regulator-max-microvolt = <1800000>;
63		vin-supply = <&vcc_io>;
64	};
65
66	vcc_5v: usb-regulator {
67		compatible = "regulator-fixed";
68		regulator-name = "vcc_5v";
69		regulator-min-microvolt = <5000000>;
70		regulator-max-microvolt = <5000000>;
71		regulator-always-on;
72		regulator-boot-on;
73		vin-supply = <&vcc_sys>;
74	};
75
76	vcc_host_5v: usb-host-regulator {
77		compatible = "regulator-fixed";
78		enable-active-high;
79		gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
80		pinctrl-names = "default";
81		pinctrl-0 = <&host_vbus_drv>;
82		regulator-name = "vcc_host_5v";
83		regulator-min-microvolt = <5000000>;
84		regulator-max-microvolt = <5000000>;
85		regulator-always-on;
86		vin-supply = <&vcc_5v>;
87	};
88
89	vcc_otg_5v: usb-otg-regulator {
90		compatible = "regulator-fixed";
91		enable-active-high;
92		gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
93		pinctrl-names = "default";
94		pinctrl-0 = <&otg_vbus_drv>;
95		regulator-name = "vcc_otg_5v";
96		regulator-min-microvolt = <5000000>;
97		regulator-max-microvolt = <5000000>;
98		regulator-always-on;
99		vin-supply = <&vcc_5v>;
100	};
101
102	backlight: backlight {
103		compatible = "pwm-backlight";
104		power-supply = <&vcc_sys>;
105		enable-gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>;
106		brightness-levels = <
107			  0   1   2   3   4   5   6   7
108			  8   9  10  11  12  13  14  15
109			 16  17  18  19  20  21  22  23
110			 24  25  26  27  28  29  30  31
111			 32  33  34  35  36  37  38  39
112			 40  41  42  43  44  45  46  47
113			 48  49  50  51  52  53  54  55
114			 56  57  58  59  60  61  62  63
115			 64  65  66  67  68  69  70  71
116			 72  73  74  75  76  77  78  79
117			 80  81  82  83  84  85  86  87
118			 88  89  90  91  92  93  94  95
119			 96  97  98  99 100 101 102 103
120			104 105 106 107 108 109 110 111
121			112 113 114 115 116 117 118 119
122			120 121 122 123 124 125 126 127
123			128 129 130 131 132 133 134 135
124			136 137 138 139 140 141 142 143
125			144 145 146 147 148 149 150 151
126			152 153 154 155 156 157 158 159
127			160 161 162 163 164 165 166 167
128			168 169 170 171 172 173 174 175
129			176 177 178 179 180 181 182 183
130			184 185 186 187 188 189 190 191
131			192 193 194 195 196 197 198 199
132			200 201 202 203 204 205 206 207
133			208 209 210 211 212 213 214 215
134			216 217 218 219 220 221 222 223
135			224 225 226 227 228 229 230 231
136			232 233 234 235 236 237 238 239
137			240 241 242 243 244 245 246 247
138			248 249 250 251 252 253 254 255>;
139		default-brightness-level = <50>;
140		pwms = <&pwm0 0 25000 0>;
141		pinctrl-names = "default";
142		pinctrl-0 = <&pwm0_pin>;
143		pwm-delay-us = <10000>;
144		status = "okay";
145	};
146
147	edp_panel: edp-panel {
148		compatible ="lg,lp079qx1-sp0v", "simple-panel";
149		backlight = <&backlight>;
150		power-supply = <&vcc_io>;
151		enable-gpios = <&gpio7 4 GPIO_ACTIVE_HIGH>;
152		prepare-delay-ms = <20>;
153		enable-delay-ms = <20>;
154
155		ports {
156			panel_in: endpoint {
157				remote-endpoint = <&edp_out>;
158			};
159		};
160	};
161
162};
163
164&cpu0 {
165	cpu0-supply = <&vdd_cpu>;
166};
167
168&display_subsystem {
169	status = "okay";
170};
171
172&edp {
173	status = "okay";
174
175	ports {
176		port@1 {
177			reg = <1>;
178			edp_out: endpoint {
179				remote-endpoint = <&panel_in>;
180			};
181		};
182	};
183};
184
185&emmc {
186	broken-cd;
187	bus-width = <8>;
188	cap-mmc-highspeed;
189	disable-wp;
190	non-removable;
191	num-slots = <1>;
192	pinctrl-names = "default";
193	pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>;
194	vmmc-supply = <&vcc_io>;
195	vqmmc-supply = <&vcc_flash>;
196	status = "okay";
197};
198
199&gmac {
200	phy-mode = "rgmii";
201	clock_in_out = "input";
202	snps,reset-gpio = <&gpio4 7 0>;
203	snps,reset-active-low;
204	snps,reset-delays-us = <0 10000 1000000>;
205	assigned-clocks = <&cru SCLK_MAC>;
206	assigned-clock-parents = <&ext_gmac>;
207	pinctrl-names = "default";
208	pinctrl-0 = <&rgmii_pins>;
209	tx_delay = <0x30>;
210	rx_delay = <0x10>;
211	status = "okay";
212};
213
214&hdmi {
215	ddc-i2c-bus = <&i2c5>;
216	status = "okay";
217};
218
219&i2c0 {
220	clock-frequency = <400000>;
221	status = "okay";
222
223	vdd_cpu: syr827@40 {
224		compatible = "silergy,syr827";
225		fcs,suspend-voltage-selector = <1>;
226		reg = <0x40>;
227		regulator-name = "vdd_cpu";
228		regulator-min-microvolt = <850000>;
229		regulator-max-microvolt = <1350000>;
230		regulator-always-on;
231		regulator-boot-on;
232		vin-supply = <&vcc_sys>;
233	};
234
235	vdd_gpu: syr828@41 {
236		compatible = "silergy,syr828";
237		fcs,suspend-voltage-selector = <1>;
238		reg = <0x41>;
239		regulator-name = "vdd_gpu";
240		regulator-min-microvolt = <850000>;
241		regulator-max-microvolt = <1350000>;
242		regulator-always-on;
243		vin-supply = <&vcc_sys>;
244	};
245
246	hym8563: hym8563@51 {
247		compatible = "haoyu,hym8563";
248		reg = <0x51>;
249		#clock-cells = <0>;
250		clock-frequency = <32768>;
251		clock-output-names = "xin32k";
252		interrupt-parent = <&gpio7>;
253		interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
254		pinctrl-names = "default";
255		pinctrl-0 = <&rtc_int>;
256	};
257
258	act8846: act8846@5a {
259		compatible = "active-semi,act8846";
260		reg = <0x5a>;
261		pinctrl-names = "default";
262		pinctrl-0 = <&pwr_hold>;
263		system-power-controller;
264
265		regulators {
266			vcc_ddr: REG1 {
267				regulator-name = "vcc_ddr";
268				regulator-min-microvolt = <1200000>;
269				regulator-max-microvolt = <1200000>;
270				regulator-always-on;
271			};
272
273			vcc_io: REG2 {
274				regulator-name = "vcc_io";
275				regulator-min-microvolt = <3300000>;
276				regulator-max-microvolt = <3300000>;
277				regulator-always-on;
278			};
279
280			vdd_log: REG3 {
281				regulator-name = "vdd_log";
282				regulator-min-microvolt = <1100000>;
283				regulator-max-microvolt = <1100000>;
284				regulator-always-on;
285			};
286
287			vcc_20: REG4 {
288				regulator-name = "vcc_20";
289				regulator-min-microvolt = <2000000>;
290				regulator-max-microvolt = <2000000>;
291				regulator-always-on;
292			};
293
294			vccio_sd: REG5 {
295				regulator-name = "vccio_sd";
296				regulator-min-microvolt = <3300000>;
297				regulator-max-microvolt = <3300000>;
298				regulator-always-on;
299			};
300
301			vdd10_lcd: REG6 {
302				regulator-name = "vdd10_lcd";
303				regulator-min-microvolt = <1000000>;
304				regulator-max-microvolt = <1000000>;
305				regulator-always-on;
306			};
307
308			vcca_codec: REG7 {
309				regulator-name = "vcca_codec";
310				regulator-min-microvolt = <3300000>;
311				regulator-max-microvolt = <3300000>;
312			};
313
314			vcc_tp: REG8 {
315				regulator-name = "vcca_33";
316				regulator-min-microvolt = <3300000>;
317				regulator-max-microvolt = <3300000>;
318			};
319
320			vccio_pmu: REG9 {
321				regulator-name = "vccio_pmu";
322				regulator-min-microvolt = <3300000>;
323				regulator-max-microvolt = <3300000>;
324			};
325
326			vdd_10: REG10 {
327				regulator-name = "vdd_10";
328				regulator-min-microvolt = <1000000>;
329				regulator-max-microvolt = <1000000>;
330				regulator-always-on;
331			};
332
333			vcc_18: REG11 {
334				regulator-name = "vcc_18";
335				regulator-min-microvolt = <1800000>;
336				regulator-max-microvolt = <1800000>;
337				regulator-always-on;
338			};
339
340			vcc18_lcd: REG12 {
341				regulator-name = "vcc18_lcd";
342				regulator-min-microvolt = <1800000>;
343				regulator-max-microvolt = <1800000>;
344				regulator-always-on;
345			};
346		};
347	};
348};
349
350&i2c1 {
351	status = "okay";
352};
353
354&i2c2 {
355	status = "okay";
356};
357
358&i2c4 {
359	status = "okay";
360};
361
362&i2c5 {
363	status = "okay";
364};
365
366&pinctrl {
367	pcfg_output_high: pcfg-output-high {
368		output-high;
369	};
370
371	pcfg_output_low: pcfg-output-low {
372		output-low;
373	};
374
375	act8846 {
376		pwr_hold: pwr-hold {
377			rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_output_high>;
378		};
379	};
380
381	hym8563 {
382		rtc_int: rtc-int {
383			rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_up>;
384		};
385	};
386
387	keys {
388		pwr_key: pwr-key {
389			rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
390		};
391	};
392
393	sdmmc {
394		sdmmc_pwr: sdmmc-pwr {
395			rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
396		};
397	};
398
399	usb_host {
400		host_vbus_drv: host-vbus-drv {
401			rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
402		};
403	};
404
405	usb_otg {
406		otg_vbus_drv: otg-vbus-drv {
407			rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>;
408		};
409	};
410};
411
412&pwm0 {
413	status = "okay";
414};
415
416&route_edp {
417	status = "okay";
418};
419
420&saradc {
421	vref-supply = <&vcc_18>;
422	status = "okay";
423};
424
425&sdio0 {
426	broken-cd;
427	bus-width = <4>;
428	disable-wp;
429	non-removable;
430	num-slots = <1>;
431	pinctrl-names = "default";
432	pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>;
433	vmmc-supply = <&vcc_18>;
434	status = "disabled";
435};
436
437&sdmmc {
438	bus-width = <4>;
439	cap-mmc-highspeed;
440	cap-sd-highspeed;
441	card-detect-delay = <200>;
442	disable-wp;
443	num-slots = <1>;
444	pinctrl-names = "default";
445	pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
446	vmmc-supply = <&vccio_sd>;
447	status = "okay";
448};
449
450&spi0 {
451	pinctrl-names = "default";
452	pinctrl-0 = <&spi0_clk>, <&spi0_cs0>, <&spi0_tx>, <&spi0_rx>, <&spi0_cs1>;
453	status = "okay";
454};
455
456&uart0 {
457	pinctrl-names = "default";
458	pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
459	status = "okay";
460};
461
462&uart1 {
463	status = "okay";
464};
465
466&uart2 {
467	status = "okay";
468};
469
470&uart3 {
471	status = "okay";
472};
473
474&usb_host1 {
475	status = "okay";
476};
477
478&usb_otg {
479	status = "okay";
480};
481
482&vopl {
483	status = "okay";
484};
485
486&wdt {
487	status = "okay";
488};
489