blob: 963365d1220805899e237240f1b20948387cee5c [file] [log] [blame]
Heiko Stuebner6ce05622014-07-15 20:09:44 +02001/*
Heiko Stuebnercdcc8b62015-03-06 19:04:06 +01002 * This file is dual-licensed: you can use it either under the terms
3 * of the GPL or the X11 license, at your option. Note that this dual
4 * licensing only applies to this file, and not this project as a
5 * whole.
Heiko Stuebner6ce05622014-07-15 20:09:44 +02006 *
Heiko Stuebnercdcc8b62015-03-06 19:04:06 +01007 * a) This file is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of the
10 * License, or (at your option) any later version.
11 *
12 * This file is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * Or, alternatively,
18 *
19 * b) Permission is hereby granted, free of charge, to any person
20 * obtaining a copy of this software and associated documentation
21 * files (the "Software"), to deal in the Software without
22 * restriction, including without limitation the rights to use,
23 * copy, modify, merge, publish, distribute, sublicense, and/or
24 * sell copies of the Software, and to permit persons to whom the
25 * Software is furnished to do so, subject to the following
26 * conditions:
27 *
28 * The above copyright notice and this permission notice shall be
29 * included in all copies or substantial portions of the Software.
30 *
31 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
32 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
33 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
34 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
35 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
36 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
37 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
38 * OTHER DEALINGS IN THE SOFTWARE.
Heiko Stuebner6ce05622014-07-15 20:09:44 +020039 */
40
Heiko Stuebner8b30c892016-03-31 20:24:29 +020041#include <dt-bindings/input/input.h>
Doug Anderson0541f942014-08-25 15:59:27 -070042#include <dt-bindings/pwm/pwm.h>
Heiko Stuebner6ce05622014-07-15 20:09:44 +020043#include "rk3288.dtsi"
44
45/ {
46 memory {
Heiko Stuebner6158e6d2015-07-15 20:57:21 +020047 device_type = "memory";
Heiko Stuebner6ce05622014-07-15 20:09:44 +020048 reg = <0x0 0x80000000>;
49 };
50
Doug Anderson0541f942014-08-25 15:59:27 -070051 backlight {
52 compatible = "pwm-backlight";
53 brightness-levels = <
54 0 1 2 3 4 5 6 7
55 8 9 10 11 12 13 14 15
56 16 17 18 19 20 21 22 23
57 24 25 26 27 28 29 30 31
58 32 33 34 35 36 37 38 39
59 40 41 42 43 44 45 46 47
60 48 49 50 51 52 53 54 55
61 56 57 58 59 60 61 62 63
62 64 65 66 67 68 69 70 71
63 72 73 74 75 76 77 78 79
64 80 81 82 83 84 85 86 87
65 88 89 90 91 92 93 94 95
66 96 97 98 99 100 101 102 103
67 104 105 106 107 108 109 110 111
68 112 113 114 115 116 117 118 119
69 120 121 122 123 124 125 126 127
70 128 129 130 131 132 133 134 135
71 136 137 138 139 140 141 142 143
72 144 145 146 147 148 149 150 151
73 152 153 154 155 156 157 158 159
74 160 161 162 163 164 165 166 167
75 168 169 170 171 172 173 174 175
76 176 177 178 179 180 181 182 183
77 184 185 186 187 188 189 190 191
78 192 193 194 195 196 197 198 199
79 200 201 202 203 204 205 206 207
80 208 209 210 211 212 213 214 215
81 216 217 218 219 220 221 222 223
82 224 225 226 227 228 229 230 231
83 232 233 234 235 236 237 238 239
84 240 241 242 243 244 245 246 247
85 248 249 250 251 252 253 254 255>;
86 default-brightness-level = <128>;
87 enable-gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>;
88 pinctrl-names = "default";
89 pinctrl-0 = <&bl_en>;
90 pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>;
91 };
92
Chris Zhongb04061e2015-12-10 13:46:39 +080093 ext_gmac: external-gmac-clock {
94 compatible = "fixed-clock";
95 clock-frequency = <125000000>;
96 clock-output-names = "ext_gmac";
97 #clock-cells = <0>;
98 };
99
Heiko Stuebner6ce05622014-07-15 20:09:44 +0200100 gpio-keys {
101 compatible = "gpio-keys";
Heiko Stuebner6ce05622014-07-15 20:09:44 +0200102 autorepeat;
103
104 pinctrl-names = "default";
105 pinctrl-0 = <&pwrbtn>;
106
Heiko Stuebner8b30c892016-03-31 20:24:29 +0200107 power {
Heiko Stuebner6ce05622014-07-15 20:09:44 +0200108 gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
Heiko Stuebner8b30c892016-03-31 20:24:29 +0200109 linux,code = <KEY_POWER>;
Heiko Stuebner6ce05622014-07-15 20:09:44 +0200110 label = "GPIO Key Power";
111 linux,input-type = <1>;
Sudeep Holla4f66f242016-02-08 21:55:12 +0000112 wakeup-source;
Heiko Stuebner6ce05622014-07-15 20:09:44 +0200113 debounce-interval = <100>;
114 };
115 };
Doug Anderson83a742b2014-07-30 13:00:10 -0700116
117 /* This turns on USB vbus for both host0 (ehci) and host1 (dwc2) */
118 vcc_host: vcc-host-regulator {
119 compatible = "regulator-fixed";
120 enable-active-high;
121 gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
122 pinctrl-names = "default";
123 pinctrl-0 = <&host_vbus_drv>;
124 regulator-name = "vcc_host";
125 regulator-always-on;
126 regulator-boot-on;
127 };
Roger Chene35e47a2014-12-29 17:44:25 +0800128
129 vcc_phy: vcc-phy-regulator {
130 compatible = "regulator-fixed";
131 enable-active-high;
132 gpio = <&gpio0 6 GPIO_ACTIVE_HIGH>;
133 pinctrl-names = "default";
134 pinctrl-0 = <&eth_phy_pwr>;
135 regulator-name = "vcc_phy";
Romain Perier68c3a882015-01-20 07:09:38 +0000136 regulator-min-microvolt = <3300000>;
137 regulator-max-microvolt = <3300000>;
Roger Chene35e47a2014-12-29 17:44:25 +0800138 regulator-always-on;
139 regulator-boot-on;
140 };
Heiko Stuebner91d5cb72015-03-07 23:18:12 +0100141
142 vcc_sys: vsys-regulator {
143 compatible = "regulator-fixed";
144 regulator-name = "vcc_sys";
145 regulator-min-microvolt = <5000000>;
146 regulator-max-microvolt = <5000000>;
147 regulator-always-on;
148 regulator-boot-on;
149 };
Doug Andersone565abe2015-03-11 15:15:17 -0700150
151 /*
152 * NOTE: vcc_sd isn't hooked up on v1.0 boards where power comes from
153 * vcc_io directly. Those boards won't be able to power cycle SD cards
154 * but it shouldn't hurt to toggle this pin there anyway.
155 */
156 vcc_sd: sdmmc-regulator {
157 compatible = "regulator-fixed";
158 gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
159 pinctrl-names = "default";
160 pinctrl-0 = <&sdmmc_pwr>;
161 regulator-name = "vcc_sd";
162 regulator-min-microvolt = <3300000>;
163 regulator-max-microvolt = <3300000>;
164 startup-delay-us = <100000>;
165 vin-supply = <&vcc_io>;
166 };
Heiko Stuebner6ce05622014-07-15 20:09:44 +0200167};
168
Chris Zhongb04061e2015-12-10 13:46:39 +0800169&cpu0 {
170 cpu0-supply = <&vdd_cpu>;
171};
172
Doug Anderson2c31d942014-08-12 16:21:14 -0700173&emmc {
Doug Anderson2c31d942014-08-12 16:21:14 -0700174 bus-width = <8>;
175 cap-mmc-highspeed;
176 disable-wp;
177 non-removable;
178 num-slots = <1>;
179 pinctrl-names = "default";
180 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
181 status = "okay";
182};
183
184&sdmmc {
185 bus-width = <4>;
186 cap-mmc-highspeed;
187 cap-sd-highspeed;
188 card-detect-delay = <200>;
189 disable-wp; /* wp not hooked up */
190 num-slots = <1>;
191 pinctrl-names = "default";
192 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
193 status = "okay";
Doug Andersone565abe2015-03-11 15:15:17 -0700194 vmmc-supply = <&vcc_sd>;
195 vqmmc-supply = <&vccio_sd>;
Doug Anderson2c31d942014-08-12 16:21:14 -0700196};
197
Chris Zhongb04061e2015-12-10 13:46:39 +0800198&gmac {
199 phy-supply = <&vcc_phy>;
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 = "ok";
212};
213
214&hdmi {
215 ddc-i2c-bus = <&i2c5>;
216 status = "okay";
217};
218
Heiko Stuebner6ce05622014-07-15 20:09:44 +0200219&i2c0 {
220 status = "okay";
221};
222
Heiko Stuebner863b76b2015-01-28 12:27:16 +0100223&i2c5 {
224 status = "okay";
225};
226
Heiko Stuebner6ce05622014-07-15 20:09:44 +0200227&wdt {
228 status = "okay";
229};
230
Doug Anderson0541f942014-08-25 15:59:27 -0700231&pwm0 {
232 status = "okay";
233};
234
Heiko Stuebner6ce05622014-07-15 20:09:44 +0200235&uart0 {
236 status = "okay";
237};
238
239&uart1 {
240 status = "okay";
241};
242
243&uart2 {
244 status = "okay";
245};
246
247&uart3 {
248 status = "okay";
249};
250
251&uart4 {
252 status = "okay";
253};
254
Caesar Wangff9d0ec2014-11-24 12:59:02 +0800255&tsadc {
256 rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
257 rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
258 status = "okay";
259};
260
Heiko Stuebner6ce05622014-07-15 20:09:44 +0200261&pinctrl {
Doug Anderson6618e472014-12-10 12:55:29 -0800262 pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
263 drive-strength = <8>;
264 };
265
266 pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
267 bias-pull-up;
268 drive-strength = <8>;
269 };
270
Doug Anderson0541f942014-08-25 15:59:27 -0700271 backlight {
272 bl_en: bl-en {
273 rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>;
274 };
275 };
276
Heiko Stuebner6ce05622014-07-15 20:09:44 +0200277 buttons {
278 pwrbtn: pwrbtn {
279 rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
280 };
281 };
Doug Anderson83a742b2014-07-30 13:00:10 -0700282
Doug Anderson91ff8cd2014-08-11 11:47:29 -0700283 pmic {
284 pmic_int: pmic-int {
285 rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
286 };
287 };
288
Doug Anderson6618e472014-12-10 12:55:29 -0800289 sdmmc {
290 /*
291 * Default drive strength isn't enough to achieve even
292 * high-speed mode on EVB board so bump up to 8ma.
293 */
294 sdmmc_bus4: sdmmc-bus4 {
295 rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
296 <6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
297 <6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
298 <6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
299 };
300
301 sdmmc_clk: sdmmc-clk {
302 rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_drv_8ma>;
303 };
304
305 sdmmc_cmd: sdmmc-cmd {
306 rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
307 };
Doug Andersone565abe2015-03-11 15:15:17 -0700308
309 sdmmc_pwr: sdmmc-pwr {
310 rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
311 };
Doug Anderson6618e472014-12-10 12:55:29 -0800312 };
313
Doug Anderson83a742b2014-07-30 13:00:10 -0700314 usb {
315 host_vbus_drv: host-vbus-drv {
316 rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
317 };
318 };
Roger Chene35e47a2014-12-29 17:44:25 +0800319
320 eth_phy {
321 eth_phy_pwr: eth-phy-pwr {
322 rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_none>;
323 };
324 };
Heiko Stuebner6ce05622014-07-15 20:09:44 +0200325};
Doug Anderson163cb912014-07-30 13:00:12 -0700326
Yunzhi Lie537c9c2014-12-12 23:17:02 +0800327&usbphy {
328 status = "okay";
329};
330
Doug Anderson163cb912014-07-30 13:00:12 -0700331&usb_host0_ehci {
332 status = "okay";
333};
Kever Yangddf83032014-08-08 11:55:59 +0800334
335&usb_host1 {
336 status = "okay";
337};
Heiko Stuebner863b76b2015-01-28 12:27:16 +0100338
339&vopb {
340 status = "okay";
341};
342
343&vopb_mmu {
344 status = "okay";
345};
346
347&vopl {
348 status = "okay";
349};
350
351&vopl_mmu {
352 status = "okay";
353};