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