xref: /rk3399_rockchip-uboot/arch/arm/dts/rk3399-evb.dts (revision 9cc336e89e858e0607f7b7c72166345b0a882be5)
1/*
2 * (C) Copyright 2016 Rockchip Electronics Co., Ltd
3 *
4 * SPDX-License-Identifier:     GPL-2.0+
5 */
6
7/dts-v1/;
8#include <dt-bindings/pwm/pwm.h>
9#include <dt-bindings/pinctrl/rockchip.h>
10#include "rk3399.dtsi"
11#include "rk3399-sdram-lpddr3-4GB-1600.dtsi"
12#include "rk3399-u-boot.dtsi"
13#include <linux/media-bus-format.h>
14
15/ {
16	model = "Rockchip RK3399 Evaluation Board";
17	compatible = "rockchip,rk3399-evb", "rockchip,rk3399",
18		     "google,rk3399evb-rev2";
19
20	chosen {
21		stdout-path = &uart2;
22		u-boot,spl-boot-order = &sdhci, &sdmmc;
23	};
24
25	vdd_center: vdd-center {
26		compatible = "pwm-regulator";
27		pwms = <&pwm3 0 25000 1>;
28		regulator-name = "vdd_center";
29		regulator-min-microvolt = <800000>;
30		regulator-max-microvolt = <1400000>;
31		regulator-init-microvolt = <950000>;
32		regulator-always-on;
33		regulator-boot-on;
34		status = "okay";
35	};
36
37	vccsys: vccsys {
38		compatible = "regulator-fixed";
39		regulator-name = "vccsys";
40		regulator-boot-on;
41		regulator-always-on;
42	};
43
44	vcc3v3_sys: vcc3v3-sys {
45		compatible = "regulator-fixed";
46		regulator-name = "vcc3v3_sys";
47		regulator-always-on;
48		regulator-boot-on;
49		regulator-min-microvolt = <3300000>;
50		regulator-max-microvolt = <3300000>;
51	};
52
53	vcc_phy: vcc-phy-regulator {
54		compatible = "regulator-fixed";
55		regulator-name = "vcc_phy";
56		regulator-always-on;
57		regulator-boot-on;
58	};
59
60	vcc5v0_host: vcc5v0-host-en {
61		compatible = "regulator-fixed";
62		regulator-name = "vcc5v0_host";
63		gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>;
64	};
65
66	vcc5v0_typec0: vcc5v0-typec0-en {
67		compatible = "regulator-fixed";
68		regulator-name = "vcc5v0_typec0";
69		gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>;
70	};
71
72	vcc5v0_typec1: vcc5v0-typec1-en {
73		compatible = "regulator-fixed";
74		regulator-name = "vcc5v0_typec1";
75		gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>;
76	};
77
78	clkin_gmac: external-gmac-clock {
79		compatible = "fixed-clock";
80		clock-frequency = <125000000>;
81		clock-output-names = "clkin_gmac";
82		#clock-cells = <0>;
83	};
84
85	backlight: backlight {
86		compatible = "pwm-backlight";
87		power-supply = <&vccsys>;
88		enable-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
89		brightness-levels = <
90			  0   1   2   3   4   5   6   7
91			  8   9  10  11  12  13  14  15
92			 16  17  18  19  20  21  22  23
93			 24  25  26  27  28  29  30  31
94			 32  33  34  35  36  37  38  39
95			 40  41  42  43  44  45  46  47
96			 48  49  50  51  52  53  54  55
97			 56  57  58  59  60  61  62  63
98			 64  65  66  67  68  69  70  71
99			 72  73  74  75  76  77  78  79
100			 80  81  82  83  84  85  86  87
101			 88  89  90  91  92  93  94  95
102			 96  97  98  99 100 101 102 103
103			104 105 106 107 108 109 110 111
104			112 113 114 115 116 117 118 119
105			120 121 122 123 124 125 126 127
106			128 129 130 131 132 133 134 135
107			136 137 138 139 140 141 142 143
108			144 145 146 147 148 149 150 151
109			152 153 154 155 156 157 158 159
110			160 161 162 163 164 165 166 167
111			168 169 170 171 172 173 174 175
112			176 177 178 179 180 181 182 183
113			184 185 186 187 188 189 190 191
114			192 193 194 195 196 197 198 199
115			200 201 202 203 204 205 206 207
116			208 209 210 211 212 213 214 215
117			216 217 218 219 220 221 222 223
118			224 225 226 227 228 229 230 231
119			232 233 234 235 236 237 238 239
120			240 241 242 243 244 245 246 247
121			248 249 250 251 252 253 254 255>;
122		default-brightness-level = <200>;
123		pwms = <&pwm0 0 25000 0>;
124		pinctrl-names = "default";
125		pinctrl-0 = <&pwm0_pin>;
126		pwm-delay-us = <10000>;
127		status = "disabled";
128	};
129
130	vcc5v0_sys: vcc5v0-sys {
131		compatible = "regulator-fixed";
132		regulator-name = "vcc5v0_sys";
133		regulator-always-on;
134		regulator-boot-on;
135		regulator-min-microvolt = <5000000>;
136		regulator-max-microvolt = <5000000>;
137	};
138
139	vcc_lcd: vcc-lcd {
140		compatible = "regulator-fixed";
141		regulator-name = "vcc_lcd";
142		gpio = <&gpio4 30 GPIO_ACTIVE_HIGH>;
143		startup-delay-us = <20000>;
144		enable-active-high;
145		regulator-min-microvolt = <3300000>;
146		regulator-max-microvolt = <3300000>;
147		regulator-boot-on;
148		vin-supply = <&vcc5v0_sys>;
149	};
150
151	panel: panel {
152		compatible = "simple-panel";
153		backlight = <&backlight>;
154		power-supply = <&vcc_lcd>;
155		enable-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
156		prepare-delay-ms = <20>;
157		enable-delay-ms = <20>;
158
159		display-timings {
160			native-mode = <&timing0>;
161
162			timing0: timing0 {
163				clock-frequency = <200000000>;
164				hactive = <1536>;
165				vactive = <2048>;
166				hfront-porch = <12>;
167				hsync-len = <16>;
168				hback-porch = <48>;
169				vfront-porch = <8>;
170				vsync-len = <4>;
171				vback-porch = <8>;
172				hsync-active = <0>;
173				vsync-active = <0>;
174				de-active = <0>;
175				pixelclk-active = <0>;
176			};
177		};
178
179		ports {
180			panel_in: endpoint {
181				remote-endpoint = <&edp_out>;
182			};
183		};
184	};
185
186};
187
188&emmc_phy {
189	status = "okay";
190};
191
192&pwm0 {
193	status = "okay";
194};
195
196&pwm2 {
197	status = "okay";
198};
199
200&pwm3 {
201	status = "okay";
202};
203
204&saradc {
205	status = "okay";
206};
207
208&sdmmc {
209	bus-width = <4>;
210	status = "okay";
211};
212
213&sdhci {
214	bus-width = <8>;
215	mmc-hs400-1_8v;
216	mmc-hs400-enhanced-strobe;
217	non-removable;
218	status = "okay";
219};
220
221&usb_host0_ehci {
222	status = "okay";
223};
224
225&usb_host0_ohci {
226	status = "okay";
227};
228
229&dwc3_typec0 {
230	vbus-supply = <&vcc5v0_typec0>;
231	status = "okay";
232};
233
234&usb_host1_ehci {
235	status = "okay";
236};
237
238&usb_host1_ohci {
239	status = "okay";
240};
241
242&dwc3_typec1 {
243	vbus-supply = <&vcc5v0_typec1>;
244	status = "okay";
245};
246
247&i2c0 {
248	status = "okay";
249	clock-frequency = <400000>;
250	i2c-scl-falling-time-ns = <50>;
251	i2c-scl-rising-time-ns = <100>;
252
253	rk808: pmic@1b {
254		compatible = "rockchip,rk808";
255		clock-output-names = "xin32k", "wifibt_32kin";
256		interrupt-parent = <&gpio0>;
257		interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
258		pinctrl-names = "default";
259		pinctrl-0 = <&pmic_int_l>;
260		reg = <0x1b>;
261		rockchip,system-power-controller;
262		#clock-cells = <1>;
263		status = "okay";
264
265		vcc12-supply = <&vcc3v3_sys>;
266
267		regulators {
268			vcc33_lcd: SWITCH_REG2 {
269				regulator-always-on;
270				regulator-boot-on;
271				regulator-name = "vcc33_lcd";
272			};
273		};
274	};
275};
276
277&mipi_dsi {
278	status = "disabled";
279	rockchip,panel = <&panel>;
280	display-timings {
281		timing0 {
282		bits-per-pixel = <24>;
283		clock-frequency = <160000000>;
284		hfront-porch = <120>;
285		hsync-len = <20>;
286		hback-porch = <21>;
287		hactive = <1200>;
288		vfront-porch = <21>;
289		vsync-len = <3>;
290		vback-porch = <18>;
291		vactive = <1920>;
292		hsync-active = <0>;
293		vsync-active = <0>;
294		de-active = <1>;
295		pixelclk-active = <0>;
296		};
297	};
298};
299
300&pinctrl {
301	pmic {
302		pmic_int_l: pmic-int-l {
303			rockchip,pins =
304				<1 21 RK_FUNC_GPIO &pcfg_pull_up>;
305		};
306
307		pmic_dvs2: pmic-dvs2 {
308			rockchip,pins =
309				<1 18 RK_FUNC_GPIO &pcfg_pull_down>;
310		};
311	};
312};
313
314&gmac {
315        phy-supply = <&vcc_phy>;
316	phy-mode = "rgmii";
317	clock_in_out = "input";
318	snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
319	snps,reset-active-low;
320	snps,reset-delays-us = <0 10000 50000>;
321	assigned-clocks = <&cru SCLK_RMII_SRC>;
322	assigned-clock-parents = <&clkin_gmac>;
323	pinctrl-names = "default";
324	pinctrl-0 = <&rgmii_pins>;
325	tx_delay = <0x28>;
326	rx_delay = <0x11>;
327	status = "okay";
328};
329
330&backlight {
331	status = "okay";
332	enable-gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>;
333};
334
335&route_edp {
336	status = "okay";
337};
338
339&edp_in_vopl {
340	status = "disabled";
341};
342
343&edp_in_vopb {
344	status = "okay";
345};
346
347&edp {
348	status = "okay";
349	force-hpd;
350
351	ports {
352		port@1 {
353			reg = <1>;
354
355			edp_out: endpoint {
356				remote-endpoint = <&panel_in>;
357			};
358		};
359	};
360};
361
362&vopb {
363	status = "okay";
364};
365