blob: 8e887f3a177faaa770363e9433825cecba82c789 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Kever Yangc61ad662016-07-19 21:16:58 +08002/*
3 * (C) Copyright 2016 Rockchip Electronics Co., Ltd
Kever Yangc61ad662016-07-19 21:16:58 +08004 */
5
6/dts-v1/;
7#include <dt-bindings/pwm/pwm.h>
Kever Yang92830982017-05-01 16:16:01 -06008#include <dt-bindings/pinctrl/rockchip.h>
Kever Yangc61ad662016-07-19 21:16:58 +08009#include "rk3399.dtsi"
10
11/ {
12 model = "Rockchip RK3399 Evaluation Board";
13 compatible = "rockchip,rk3399-evb", "rockchip,rk3399",
14 "google,rk3399evb-rev2";
15
16 chosen {
17 stdout-path = &uart2;
18 };
19
20 vdd_center: vdd-center {
21 compatible = "pwm-regulator";
Kever Yange69c9c72017-04-18 17:06:21 +080022 pwms = <&pwm3 0 25000 1>;
Kever Yangc61ad662016-07-19 21:16:58 +080023 regulator-name = "vdd_center";
24 regulator-min-microvolt = <800000>;
25 regulator-max-microvolt = <1400000>;
Kever Yang845b80e2016-09-23 15:57:22 +080026 regulator-init-microvolt = <950000>;
Kever Yangc61ad662016-07-19 21:16:58 +080027 regulator-always-on;
28 regulator-boot-on;
29 status = "okay";
30 };
31
eric.gao@rock-chips.comd91ea342017-04-10 10:41:46 +080032 vccsys: vccsys {
33 compatible = "regulator-fixed";
34 regulator-name = "vccsys";
35 regulator-boot-on;
36 regulator-always-on;
37 };
38
Kever Yangc61ad662016-07-19 21:16:58 +080039 vcc3v3_sys: vcc3v3-sys {
40 compatible = "regulator-fixed";
41 regulator-name = "vcc3v3_sys";
42 regulator-always-on;
43 regulator-boot-on;
44 regulator-min-microvolt = <3300000>;
45 regulator-max-microvolt = <3300000>;
46 };
47
48 vcc_phy: vcc-phy-regulator {
49 compatible = "regulator-fixed";
50 regulator-name = "vcc_phy";
51 regulator-always-on;
52 regulator-boot-on;
53 };
Kever Yange19fe4c2016-08-24 12:02:21 +080054
55 vcc5v0_host: vcc5v0-host-en {
56 compatible = "regulator-fixed";
57 regulator-name = "vcc5v0_host";
58 gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>;
59 };
eric.gao@rock-chips.comd91ea342017-04-10 10:41:46 +080060
Meng Dongyang9078a592017-06-28 19:26:32 +080061 vcc5v0_typec0: vcc5v0-typec0-en {
62 compatible = "regulator-fixed";
63 regulator-name = "vcc5v0_typec0";
64 gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>;
65 };
66
67 vcc5v0_typec1: vcc5v0-typec1-en {
68 compatible = "regulator-fixed";
69 regulator-name = "vcc5v0_typec1";
70 gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>;
71 };
72
Kever Yang92830982017-05-01 16:16:01 -060073 clkin_gmac: external-gmac-clock {
74 compatible = "fixed-clock";
75 clock-frequency = <125000000>;
76 clock-output-names = "clkin_gmac";
77 #clock-cells = <0>;
78 };
Eric Gao8b51b132017-05-02 18:23:56 +080079
80 backlight: backlight {
81 compatible = "pwm-backlight";
82 power-supply = <&vccsys>;
83 enable-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
84 brightness-levels = <
85 0 1 2 3 4 5 6 7
86 8 9 10 11 12 13 14 15
87 16 17 18 19 20 21 22 23
88 24 25 26 27 28 29 30 31
89 32 33 34 35 36 37 38 39
90 40 41 42 43 44 45 46 47
91 48 49 50 51 52 53 54 55
92 56 57 58 59 60 61 62 63
93 64 65 66 67 68 69 70 71
94 72 73 74 75 76 77 78 79
95 80 81 82 83 84 85 86 87
96 88 89 90 91 92 93 94 95
97 96 97 98 99 100 101 102 103
98 104 105 106 107 108 109 110 111
99 112 113 114 115 116 117 118 119
100 120 121 122 123 124 125 126 127
101 128 129 130 131 132 133 134 135
102 136 137 138 139 140 141 142 143
103 144 145 146 147 148 149 150 151
104 152 153 154 155 156 157 158 159
105 160 161 162 163 164 165 166 167
106 168 169 170 171 172 173 174 175
107 176 177 178 179 180 181 182 183
108 184 185 186 187 188 189 190 191
109 192 193 194 195 196 197 198 199
110 200 201 202 203 204 205 206 207
111 208 209 210 211 212 213 214 215
112 216 217 218 219 220 221 222 223
113 224 225 226 227 228 229 230 231
114 232 233 234 235 236 237 238 239
115 240 241 242 243 244 245 246 247
116 248 249 250 251 252 253 254 255>;
117 default-brightness-level = <200>;
118 pwms = <&pwm0 0 25000 0>;
119 pinctrl-names = "default";
120 pinctrl-0 = <&pwm0_pin>;
121 pwm-delay-us = <10000>;
122 status = "disabled";
123 };
124
125 panel:panel {
126 compatible = "simple-panel";
127 power-supply = <&vcc33_lcd>;
128 backlight = <&backlight>;
129 /*enable-gpios = <&gpio4 18 GPIO_ACTIVE_HIGH>;*/
130 status = "disabled";
131 };
Kever Yangc61ad662016-07-19 21:16:58 +0800132};
133
134&emmc_phy {
135 status = "okay";
136};
137
138&pwm0 {
139 status = "okay";
140};
141
142&pwm2 {
143 status = "okay";
144};
145
146&pwm3 {
147 status = "okay";
148};
149
David Wu31feb5a2017-09-20 14:47:19 +0800150&saradc {
151 status = "okay";
152};
153
Kever Yang70176162016-08-04 11:44:59 +0800154&sdmmc {
Kever Yang1eafe152017-02-22 16:56:36 +0800155 bus-width = <4>;
Kever Yang70176162016-08-04 11:44:59 +0800156 status = "okay";
157};
158
Kever Yangc61ad662016-07-19 21:16:58 +0800159&sdhci {
160 bus-width = <8>;
161 mmc-hs400-1_8v;
162 mmc-hs400-enhanced-strobe;
163 non-removable;
164 status = "okay";
165};
166
167&uart2 {
168 status = "okay";
169};
170
171&usb_host0_ehci {
172 status = "okay";
173};
174
175&usb_host0_ohci {
176 status = "okay";
177};
178
MengDongyangf15293c2016-08-24 12:02:20 +0800179&dwc3_typec0 {
Meng Dongyang9078a592017-06-28 19:26:32 +0800180 vbus-supply = <&vcc5v0_typec0>;
MengDongyangf15293c2016-08-24 12:02:20 +0800181 status = "okay";
182};
183
Kever Yangc61ad662016-07-19 21:16:58 +0800184&usb_host1_ehci {
185 status = "okay";
186};
187
188&usb_host1_ohci {
189 status = "okay";
190};
191
MengDongyangf15293c2016-08-24 12:02:20 +0800192&dwc3_typec1 {
Meng Dongyang9078a592017-06-28 19:26:32 +0800193 vbus-supply = <&vcc5v0_typec1>;
MengDongyangf15293c2016-08-24 12:02:20 +0800194 status = "okay";
195};
196
eric.gao@rock-chips.comd91ea342017-04-10 10:41:46 +0800197&i2c0 {
198 status = "okay";
199 clock-frequency = <400000>;
200 i2c-scl-falling-time-ns = <50>;
201 i2c-scl-rising-time-ns = <100>;
202 u-boot,dm-pre-reloc;
203
204 rk808: pmic@1b {
205 compatible = "rockchip,rk808";
206 clock-output-names = "xin32k", "wifibt_32kin";
207 interrupt-parent = <&gpio0>;
208 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
209 pinctrl-names = "default";
210 pinctrl-0 = <&pmic_int_l>;
211 reg = <0x1b>;
212 rockchip,system-power-controller;
213 #clock-cells = <1>;
214 u-boot,dm-pre-reloc;
215 status = "okay";
216
217 vcc12-supply = <&vcc3v3_sys>;
Eric Gao8b51b132017-05-02 18:23:56 +0800218
eric.gao@rock-chips.comd91ea342017-04-10 10:41:46 +0800219 regulators {
220 vcc33_lcd: SWITCH_REG2 {
221 regulator-always-on;
222 regulator-boot-on;
223 regulator-name = "vcc33_lcd";
224 };
225 };
226 };
227};
228
Eric Gao8b51b132017-05-02 18:23:56 +0800229&mipi_dsi {
230 status = "disabled";
231 rockchip,panel = <&panel>;
232 display-timings {
233 timing0 {
234 bits-per-pixel = <24>;
235 clock-frequency = <160000000>;
236 hfront-porch = <120>;
237 hsync-len = <20>;
238 hback-porch = <21>;
239 hactive = <1200>;
240 vfront-porch = <21>;
241 vsync-len = <3>;
242 vback-porch = <18>;
243 vactive = <1920>;
244 hsync-active = <0>;
245 vsync-active = <0>;
246 de-active = <1>;
247 pixelclk-active = <0>;
248 };
249 };
250};
251
Kever Yangc61ad662016-07-19 21:16:58 +0800252&pinctrl {
253 pmic {
254 pmic_int_l: pmic-int-l {
255 rockchip,pins =
256 <1 21 RK_FUNC_GPIO &pcfg_pull_up>;
257 };
258
259 pmic_dvs2: pmic-dvs2 {
260 rockchip,pins =
261 <1 18 RK_FUNC_GPIO &pcfg_pull_down>;
262 };
263 };
264};
Kever Yang92830982017-05-01 16:16:01 -0600265
266&gmac {
267 phy-supply = <&vcc_phy>;
268 phy-mode = "rgmii";
269 clock_in_out = "input";
270 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
271 snps,reset-active-low;
272 snps,reset-delays-us = <0 10000 50000>;
273 assigned-clocks = <&cru SCLK_RMII_SRC>;
274 assigned-clock-parents = <&clkin_gmac>;
275 pinctrl-names = "default";
276 pinctrl-0 = <&rgmii_pins>;
David Wu64439092018-01-13 13:53:54 +0800277 tx_delay = <0x28>;
278 rx_delay = <0x11>;
Kever Yang92830982017-05-01 16:16:01 -0600279 status = "okay";
280};