1cc7364fbSJianqun Xu/*
2cc7364fbSJianqun Xu * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd
3cc7364fbSJianqun Xu *
4cc7364fbSJianqun Xu * This file is dual-licensed: you can use it either under the terms
5cc7364fbSJianqun Xu * of the GPL or the X11 license, at your option. Note that this dual
6cc7364fbSJianqun Xu * licensing only applies to this file, and not this project as a
7cc7364fbSJianqun Xu * whole.
8cc7364fbSJianqun Xu *
9cc7364fbSJianqun Xu *  a) This file is free software; you can redistribute it and/or
10cc7364fbSJianqun Xu *     modify it under the terms of the GNU General Public License as
11cc7364fbSJianqun Xu *     published by the Free Software Foundation; either version 2 of the
12cc7364fbSJianqun Xu *     License, or (at your option) any later version.
13cc7364fbSJianqun Xu *
14cc7364fbSJianqun Xu *     This file is distributed in the hope that it will be useful,
15cc7364fbSJianqun Xu *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16cc7364fbSJianqun Xu *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17cc7364fbSJianqun Xu *     GNU General Public License for more details.
18cc7364fbSJianqun Xu *
19cc7364fbSJianqun Xu * Or, alternatively,
20cc7364fbSJianqun Xu *
21cc7364fbSJianqun Xu *  b) Permission is hereby granted, free of charge, to any person
22cc7364fbSJianqun Xu *     obtaining a copy of this software and associated documentation
23cc7364fbSJianqun Xu *     files (the "Software"), to deal in the Software without
24cc7364fbSJianqun Xu *     restriction, including without limitation the rights to use,
25cc7364fbSJianqun Xu *     copy, modify, merge, publish, distribute, sublicense, and/or
26cc7364fbSJianqun Xu *     sell copies of the Software, and to permit persons to whom the
27cc7364fbSJianqun Xu *     Software is furnished to do so, subject to the following
28cc7364fbSJianqun Xu *     conditions:
29cc7364fbSJianqun Xu *
30cc7364fbSJianqun Xu *     The above copyright notice and this permission notice shall be
31cc7364fbSJianqun Xu *     included in all copies or substantial portions of the Software.
32cc7364fbSJianqun Xu *
33cc7364fbSJianqun Xu *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34cc7364fbSJianqun Xu *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35cc7364fbSJianqun Xu *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36cc7364fbSJianqun Xu *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37cc7364fbSJianqun Xu *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38cc7364fbSJianqun Xu *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39cc7364fbSJianqun Xu *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40cc7364fbSJianqun Xu *     OTHER DEALINGS IN THE SOFTWARE.
41cc7364fbSJianqun Xu */
42cc7364fbSJianqun Xu
43cc7364fbSJianqun Xu/dts-v1/;
44cc7364fbSJianqun Xu#include <dt-bindings/pwm/pwm.h>
45cc7364fbSJianqun Xu#include "rk3399.dtsi"
46cc7364fbSJianqun Xu
47cc7364fbSJianqun Xu/ {
48cc7364fbSJianqun Xu	model = "Rockchip RK3399 Evaluation Board";
49cc7364fbSJianqun Xu	compatible = "rockchip,rk3399-evb", "rockchip,rk3399",
50cc7364fbSJianqun Xu		     "google,rk3399evb-rev2";
51cc7364fbSJianqun Xu
52578c0e7eSYakir Yang	backlight: backlight {
53578c0e7eSYakir Yang		compatible = "pwm-backlight";
54578c0e7eSYakir Yang		brightness-levels = <
55578c0e7eSYakir Yang			  0   1   2   3   4   5   6   7
56578c0e7eSYakir Yang			  8   9  10  11  12  13  14  15
57578c0e7eSYakir Yang			 16  17  18  19  20  21  22  23
58578c0e7eSYakir Yang			 24  25  26  27  28  29  30  31
59578c0e7eSYakir Yang			 32  33  34  35  36  37  38  39
60578c0e7eSYakir Yang			 40  41  42  43  44  45  46  47
61578c0e7eSYakir Yang			 48  49  50  51  52  53  54  55
62578c0e7eSYakir Yang			 56  57  58  59  60  61  62  63
63578c0e7eSYakir Yang			 64  65  66  67  68  69  70  71
64578c0e7eSYakir Yang			 72  73  74  75  76  77  78  79
65578c0e7eSYakir Yang			 80  81  82  83  84  85  86  87
66578c0e7eSYakir Yang			 88  89  90  91  92  93  94  95
67578c0e7eSYakir Yang			 96  97  98  99 100 101 102 103
68578c0e7eSYakir Yang			104 105 106 107 108 109 110 111
69578c0e7eSYakir Yang			112 113 114 115 116 117 118 119
70578c0e7eSYakir Yang			120 121 122 123 124 125 126 127
71578c0e7eSYakir Yang			128 129 130 131 132 133 134 135
72578c0e7eSYakir Yang			136 137 138 139 140 141 142 143
73578c0e7eSYakir Yang			144 145 146 147 148 149 150 151
74578c0e7eSYakir Yang			152 153 154 155 156 157 158 159
75578c0e7eSYakir Yang			160 161 162 163 164 165 166 167
76578c0e7eSYakir Yang			168 169 170 171 172 173 174 175
77578c0e7eSYakir Yang			176 177 178 179 180 181 182 183
78578c0e7eSYakir Yang			184 185 186 187 188 189 190 191
79578c0e7eSYakir Yang			192 193 194 195 196 197 198 199
80578c0e7eSYakir Yang			200 201 202 203 204 205 206 207
81578c0e7eSYakir Yang			208 209 210 211 212 213 214 215
82578c0e7eSYakir Yang			216 217 218 219 220 221 222 223
83578c0e7eSYakir Yang			224 225 226 227 228 229 230 231
84578c0e7eSYakir Yang			232 233 234 235 236 237 238 239
85578c0e7eSYakir Yang			240 241 242 243 244 245 246 247
86578c0e7eSYakir Yang			248 249 250 251 252 253 254 255>;
87578c0e7eSYakir Yang		default-brightness-level = <200>;
884eb45558SAndy Yan		enable-gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
89578c0e7eSYakir Yang		pwms = <&pwm0 0 25000 0>;
90578c0e7eSYakir Yang	};
91578c0e7eSYakir Yang
920714bc77SRoger Chen	clkin_gmac: external-gmac-clock {
930714bc77SRoger Chen		compatible = "fixed-clock";
940714bc77SRoger Chen		clock-frequency = <125000000>;
950714bc77SRoger Chen		clock-output-names = "clkin_gmac";
960714bc77SRoger Chen		#clock-cells = <0>;
970714bc77SRoger Chen	};
980714bc77SRoger Chen
99cc7364fbSJianqun Xu	vdd_center: vdd-center {
100cc7364fbSJianqun Xu		compatible = "pwm-regulator";
101cc7364fbSJianqun Xu		pwms = <&pwm3 0 25000 0>;
102cc7364fbSJianqun Xu		regulator-name = "vdd_center";
103cc7364fbSJianqun Xu		regulator-min-microvolt = <800000>;
104cc7364fbSJianqun Xu		regulator-max-microvolt = <1400000>;
105cc7364fbSJianqun Xu		regulator-always-on;
106cc7364fbSJianqun Xu		regulator-boot-on;
107cc7364fbSJianqun Xu		status = "okay";
108cc7364fbSJianqun Xu	};
109cc7364fbSJianqun Xu
110cc7364fbSJianqun Xu	vcc3v3_sys: vcc3v3-sys {
111cc7364fbSJianqun Xu		compatible = "regulator-fixed";
112cc7364fbSJianqun Xu		regulator-name = "vcc3v3_sys";
113cc7364fbSJianqun Xu		regulator-always-on;
114cc7364fbSJianqun Xu		regulator-boot-on;
115cc7364fbSJianqun Xu		regulator-min-microvolt = <3300000>;
116cc7364fbSJianqun Xu		regulator-max-microvolt = <3300000>;
117cc7364fbSJianqun Xu	};
118cc7364fbSJianqun Xu
1191d3bc1d6SFrank Wang	vcc5v0_sys: vcc5v0-sys {
1201d3bc1d6SFrank Wang		compatible = "regulator-fixed";
1211d3bc1d6SFrank Wang		regulator-name = "vcc5v0_sys";
1221d3bc1d6SFrank Wang		regulator-always-on;
1231d3bc1d6SFrank Wang		regulator-boot-on;
1241d3bc1d6SFrank Wang		regulator-min-microvolt = <5000000>;
1251d3bc1d6SFrank Wang		regulator-max-microvolt = <5000000>;
1261d3bc1d6SFrank Wang	};
1271d3bc1d6SFrank Wang
1281d3bc1d6SFrank Wang	vcc5v0_host: vcc5v0-host-regulator {
1291d3bc1d6SFrank Wang		compatible = "regulator-fixed";
1301d3bc1d6SFrank Wang		enable-active-high;
1314eb45558SAndy Yan		gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
1321d3bc1d6SFrank Wang		pinctrl-names = "default";
1331d3bc1d6SFrank Wang		pinctrl-0 = <&vcc5v0_host_en>;
1341d3bc1d6SFrank Wang		regulator-name = "vcc5v0_host";
1351d3bc1d6SFrank Wang		vin-supply = <&vcc5v0_sys>;
1361d3bc1d6SFrank Wang	};
1371d3bc1d6SFrank Wang
138cc7364fbSJianqun Xu	vcc_phy: vcc-phy-regulator {
139cc7364fbSJianqun Xu		compatible = "regulator-fixed";
140cc7364fbSJianqun Xu		regulator-name = "vcc_phy";
141cc7364fbSJianqun Xu		regulator-always-on;
142cc7364fbSJianqun Xu		regulator-boot-on;
143cc7364fbSJianqun Xu	};
1440714bc77SRoger Chen
1450714bc77SRoger Chen	vcc_phy: vcc-phy-regulator {
1460714bc77SRoger Chen		compatible = "regulator-fixed";
1470714bc77SRoger Chen		regulator-name = "vcc_phy";
1480714bc77SRoger Chen		regulator-always-on;
1490714bc77SRoger Chen		regulator-boot-on;
1500714bc77SRoger Chen	};
1510714bc77SRoger Chen
152cc7364fbSJianqun Xu};
153cc7364fbSJianqun Xu
15413b2b3e2SBrian Norris&emmc_phy {
15513b2b3e2SBrian Norris	status = "okay";
15613b2b3e2SBrian Norris};
15713b2b3e2SBrian Norris
1580714bc77SRoger Chen&gmac {
1590714bc77SRoger Chen	assigned-clocks = <&cru SCLK_RMII_SRC>;
1600714bc77SRoger Chen	assigned-clock-parents = <&clkin_gmac>;
1610714bc77SRoger Chen	clock_in_out = "input";
1620714bc77SRoger Chen	phy-supply = <&vcc_phy>;
1630714bc77SRoger Chen	phy-mode = "rgmii";
1640714bc77SRoger Chen	pinctrl-names = "default";
1650714bc77SRoger Chen	pinctrl-0 = <&rgmii_pins>;
1664eb45558SAndy Yan	snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
1670714bc77SRoger Chen	snps,reset-active-low;
1680714bc77SRoger Chen	snps,reset-delays-us = <0 10000 50000>;
1690714bc77SRoger Chen	tx_delay = <0x28>;
1700714bc77SRoger Chen	rx_delay = <0x11>;
1710714bc77SRoger Chen	status = "okay";
1720714bc77SRoger Chen};
1730714bc77SRoger Chen
174cc7364fbSJianqun Xu&pwm0 {
175cc7364fbSJianqun Xu	status = "okay";
176cc7364fbSJianqun Xu};
177cc7364fbSJianqun Xu
178cc7364fbSJianqun Xu&pwm2 {
179cc7364fbSJianqun Xu	status = "okay";
180cc7364fbSJianqun Xu};
181cc7364fbSJianqun Xu
182cc7364fbSJianqun Xu&pwm3 {
183cc7364fbSJianqun Xu	status = "okay";
184cc7364fbSJianqun Xu};
185cc7364fbSJianqun Xu
18613b2b3e2SBrian Norris&sdhci {
18713b2b3e2SBrian Norris	bus-width = <8>;
18813b2b3e2SBrian Norris	mmc-hs400-1_8v;
18913b2b3e2SBrian Norris	mmc-hs400-enhanced-strobe;
19013b2b3e2SBrian Norris	non-removable;
19113b2b3e2SBrian Norris	status = "okay";
19213b2b3e2SBrian Norris};
19313b2b3e2SBrian Norris
1949eb4f3c4SShawn Lin&pcie_phy {
1959eb4f3c4SShawn Lin	status = "disabled";
1969eb4f3c4SShawn Lin};
1979eb4f3c4SShawn Lin
1989eb4f3c4SShawn Lin&pcie0 {
1994eb45558SAndy Yan	ep-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_HIGH>;
2009eb4f3c4SShawn Lin	num-lanes = <4>;
2019eb4f3c4SShawn Lin	pinctrl-names = "default";
2029eb4f3c4SShawn Lin	pinctrl-0 = <&pcie_clkreqn>;
2039eb4f3c4SShawn Lin	status = "disabled";
2049eb4f3c4SShawn Lin};
2059eb4f3c4SShawn Lin
2061d3bc1d6SFrank Wang&u2phy0 {
2071d3bc1d6SFrank Wang	status = "okay";
2081d3bc1d6SFrank Wang};
2091d3bc1d6SFrank Wang
2101d3bc1d6SFrank Wang&u2phy0_host {
2111d3bc1d6SFrank Wang	phy-supply = <&vcc5v0_host>;
2121d3bc1d6SFrank Wang	status = "okay";
2131d3bc1d6SFrank Wang};
2141d3bc1d6SFrank Wang
2151d3bc1d6SFrank Wang&u2phy1 {
2161d3bc1d6SFrank Wang	status = "okay";
2171d3bc1d6SFrank Wang};
2181d3bc1d6SFrank Wang
2191d3bc1d6SFrank Wang&u2phy1_host {
2201d3bc1d6SFrank Wang	phy-supply = <&vcc5v0_host>;
2211d3bc1d6SFrank Wang	status = "okay";
2221d3bc1d6SFrank Wang};
2231d3bc1d6SFrank Wang
224cc7364fbSJianqun Xu&uart2 {
225cc7364fbSJianqun Xu	status = "okay";
226cc7364fbSJianqun Xu};
227cc7364fbSJianqun Xu
228cc7364fbSJianqun Xu&usb_host0_ehci {
229cc7364fbSJianqun Xu	status = "okay";
230cc7364fbSJianqun Xu};
231cc7364fbSJianqun Xu
232cc7364fbSJianqun Xu&usb_host0_ohci {
233cc7364fbSJianqun Xu	status = "okay";
234cc7364fbSJianqun Xu};
235cc7364fbSJianqun Xu
236cc7364fbSJianqun Xu&usb_host1_ehci {
237cc7364fbSJianqun Xu	status = "okay";
238cc7364fbSJianqun Xu};
239cc7364fbSJianqun Xu
240cc7364fbSJianqun Xu&usb_host1_ohci {
241cc7364fbSJianqun Xu	status = "okay";
242cc7364fbSJianqun Xu};
243cc7364fbSJianqun Xu
244cc7364fbSJianqun Xu&pinctrl {
245cc7364fbSJianqun Xu	pmic {
246cc7364fbSJianqun Xu		pmic_int_l: pmic-int-l {
247cc7364fbSJianqun Xu			rockchip,pins =
248cc7364fbSJianqun Xu				<1 21 RK_FUNC_GPIO &pcfg_pull_up>;
249cc7364fbSJianqun Xu		};
250cc7364fbSJianqun Xu
251cc7364fbSJianqun Xu		pmic_dvs2: pmic-dvs2 {
252cc7364fbSJianqun Xu			rockchip,pins =
253cc7364fbSJianqun Xu				<1 18 RK_FUNC_GPIO &pcfg_pull_down>;
254cc7364fbSJianqun Xu		};
255cc7364fbSJianqun Xu	};
2561d3bc1d6SFrank Wang
2571d3bc1d6SFrank Wang	usb2 {
2581d3bc1d6SFrank Wang		vcc5v0_host_en: vcc5v0-host-en {
2591d3bc1d6SFrank Wang			rockchip,pins =
2601d3bc1d6SFrank Wang				<4 25 RK_FUNC_GPIO &pcfg_pull_none>;
2611d3bc1d6SFrank Wang		};
2621d3bc1d6SFrank Wang	};
263cc7364fbSJianqun Xu};
264