blob: f601c78386a92f67e780b18a7aaf6c08cf4f25bd [file] [log] [blame]
Eddie Cai22359952017-02-14 18:07:31 +08001/*
2 * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
3 *
4 * This file is dual-licensed: you can use it either under the terms
5 * of the GPL or the X11 license, at your option. Note that this dual
6 * licensing only applies to this file, and not this project as a
7 * whole.
8 *
9 * a) This file is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
13 *
14 * This file is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * Or, alternatively,
20 *
21 * b) Permission is hereby granted, free of charge, to any person
22 * obtaining a copy of this software and associated documentation
23 * files (the "Software"), to deal in the Software without
24 * restriction, including without limitation the rights to use,
25 * copy, modify, merge, publish, distribute, sublicense, and/or
26 * sell copies of the Software, and to permit persons to whom the
27 * Software is furnished to do so, subject to the following
28 * conditions:
29 *
30 * The above copyright notice and this permission notice shall be
31 * included in all copies or substantial portions of the Software.
32 *
33 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40 * OTHER DEALINGS IN THE SOFTWARE.
41 */
42
43/dts-v1/;
44
45#include "rk3288.dtsi"
46#include <dt-bindings/input/input.h>
47
48/ {
49 model = "Rockchip RK3288 Tinker Board";
50 compatible = "asus,rk3288-tinker", "rockchip,rk3288";
51
52 memory {
53 reg = <0x0 0x80000000>;
54 device_type = "memory";
55 };
56
57 ext_gmac: external-gmac-clock {
58 compatible = "fixed-clock";
59 #clock-cells = <0>;
60 clock-frequency = <125000000>;
61 clock-output-names = "ext_gmac";
62 };
63
64 gpio-keys {
65 compatible = "gpio-keys";
66 #address-cells = <1>;
67 #size-cells = <0>;
68 autorepeat;
69
70 pinctrl-names = "default";
71 pinctrl-0 = <&pwrbtn>;
72
73 button@0 {
74 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
75 linux,code = <KEY_POWER>;
76 label = "GPIO Key Power";
77 linux,input-type = <1>;
78 wakeup-source;
79 debounce-interval = <100>;
80 };
81 };
82
83 gpio-leds {
84 compatible = "gpio-leds";
85
86 act-led {
87 gpios=<&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
88 linux,default-trigger="mmc0";
89 };
90
91 heartbeat-led {
92 gpios=<&gpio1 RK_PD1 GPIO_ACTIVE_HIGH>;
93 linux,default-trigger="heartbeat";
94 };
95
96 pwr-led {
97 gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_HIGH>;
98 linux,default-trigger = "default-on";
99 };
100 };
101
102 sound {
103 compatible = "simple-audio-card";
104 simple-audio-card,format = "i2s";
105 simple-audio-card,name = "rockchip,tinker-codec";
106 simple-audio-card,mclk-fs = <512>;
107
108 simple-audio-card,codec {
109 sound-dai = <&hdmi>;
110 };
111
112 simple-audio-card,cpu {
113 sound-dai = <&i2s>;
114 };
115 };
116
117 vcc_sys: vsys-regulator {
118 compatible = "regulator-fixed";
119 regulator-name = "vcc_sys";
120 regulator-min-microvolt = <5000000>;
121 regulator-max-microvolt = <5000000>;
122 regulator-always-on;
123 regulator-boot-on;
124 };
125
126 vcc_sd: sdmmc-regulator {
127 compatible = "regulator-fixed";
128 gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
129 pinctrl-names = "default";
130 pinctrl-0 = <&sdmmc_pwr>;
131 regulator-name = "vcc_sd";
132 regulator-min-microvolt = <3300000>;
133 regulator-max-microvolt = <3300000>;
134 startup-delay-us = <100000>;
135 vin-supply = <&vcc_io>;
136 };
137};
138
139&cpu0 {
140 cpu0-supply = <&vdd_cpu>;
141};
142
143&gmac {
144 assigned-clocks = <&cru SCLK_MAC>;
145 assigned-clock-parents = <&ext_gmac>;
146 clock_in_out = "input";
147 phy-mode = "rgmii";
148 phy-supply = <&vcc33_lan>;
149 pinctrl-names = "default";
150 pinctrl-0 = <&rgmii_pins>;
151 snps,reset-gpio = <&gpio4 7 0>;
152 snps,reset-active-low;
153 snps,reset-delays-us = <0 10000 1000000>;
154 tx_delay = <0x30>;
155 rx_delay = <0x10>;
156 status = "ok";
157};
158
159&hdmi {
160 ddc-i2c-bus = <&i2c5>;
161 status = "okay";
162};
163
164&i2c0 {
165 clock-frequency = <400000>;
166 status = "okay";
167
168 rk808: pmic@1b {
169 compatible = "rockchip,rk808";
170 reg = <0x1b>;
171 interrupt-parent = <&gpio0>;
172 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
173 #clock-cells = <1>;
174 clock-output-names = "xin32k", "rk808-clkout2";
175 dvs-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>,
176 <&gpio0 12 GPIO_ACTIVE_HIGH>;
177 pinctrl-names = "default";
178 pinctrl-0 = <&pmic_int &global_pwroff &dvs_1 &dvs_2>;
179 rockchip,system-power-controller;
180 wakeup-source;
181
182 vcc1-supply = <&vcc_sys>;
183 vcc2-supply = <&vcc_sys>;
184 vcc3-supply = <&vcc_sys>;
185 vcc4-supply = <&vcc_sys>;
186 vcc6-supply = <&vcc_sys>;
187 vcc7-supply = <&vcc_sys>;
188 vcc8-supply = <&vcc_io>;
189 vcc9-supply = <&vcc_io>;
190 vcc10-supply = <&vcc_io>;
191 vcc11-supply = <&vcc_sys>;
192 vcc12-supply = <&vcc_io>;
193 vddio-supply = <&vcc_io>;
194
195 regulators {
196 vdd_cpu: DCDC_REG1 {
197 regulator-always-on;
198 regulator-boot-on;
199 regulator-min-microvolt = <750000>;
200 regulator-max-microvolt = <1350000>;
201 regulator-name = "vdd_arm";
202 regulator-ramp-delay = <6000>;
203 regulator-state-mem {
204 regulator-off-in-suspend;
205 };
206 };
207
208 vdd_gpu: DCDC_REG2 {
209 regulator-always-on;
210 regulator-boot-on;
211 regulator-min-microvolt = <850000>;
212 regulator-max-microvolt = <1250000>;
213 regulator-name = "vdd_gpu";
214 regulator-ramp-delay = <6000>;
215 regulator-state-mem {
216 regulator-on-in-suspend;
217 regulator-suspend-microvolt = <1000000>;
218 };
219 };
220
221 vcc_ddr: DCDC_REG3 {
222 regulator-always-on;
223 regulator-boot-on;
224 regulator-name = "vcc_ddr";
225 regulator-state-mem {
226 regulator-on-in-suspend;
227 };
228 };
229
230 vcc_io: DCDC_REG4 {
231 regulator-always-on;
232 regulator-boot-on;
233 regulator-min-microvolt = <3300000>;
234 regulator-max-microvolt = <3300000>;
235 regulator-name = "vcc_io";
236 regulator-state-mem {
237 regulator-on-in-suspend;
238 regulator-suspend-microvolt = <3300000>;
239 };
240 };
241
242 vcc18_ldo1: LDO_REG1 {
243 regulator-always-on;
244 regulator-boot-on;
245 regulator-min-microvolt = <1800000>;
246 regulator-max-microvolt = <1800000>;
247 regulator-name = "vcc18_ldo1";
248 regulator-state-mem {
249 regulator-on-in-suspend;
250 regulator-suspend-microvolt = <1800000>;
251 };
252 };
253
254 vcc33_mipi: LDO_REG2 {
255 regulator-always-on;
256 regulator-boot-on;
257 regulator-min-microvolt = <3300000>;
258 regulator-max-microvolt = <3300000>;
259 regulator-name = "vcc33_mipi";
260 regulator-state-mem {
261 regulator-off-in-suspend;
262 };
263 };
264
265 vdd_10: LDO_REG3 {
266 regulator-always-on;
267 regulator-boot-on;
268 regulator-min-microvolt = <1000000>;
269 regulator-max-microvolt = <1000000>;
270 regulator-name = "vdd_10";
271 regulator-state-mem {
272 regulator-on-in-suspend;
273 regulator-suspend-microvolt = <1000000>;
274 };
275 };
276
277 vcc18_codec: LDO_REG4 {
278 regulator-always-on;
279 regulator-boot-on;
280 regulator-min-microvolt = <1800000>;
281 regulator-max-microvolt = <1800000>;
282 regulator-name = "vcc18_codec";
283 regulator-state-mem {
284 regulator-on-in-suspend;
285 regulator-suspend-microvolt = <1800000>;
286 };
287 };
288
289 vccio_sd: LDO_REG5 {
290 regulator-min-microvolt = <1800000>;
291 regulator-max-microvolt = <3300000>;
292 regulator-name = "vccio_sd";
293 regulator-state-mem {
294 regulator-on-in-suspend;
295 regulator-suspend-microvolt = <3300000>;
296 };
297 };
298
299 vdd10_lcd: LDO_REG6 {
300 regulator-always-on;
301 regulator-boot-on;
302 regulator-min-microvolt = <1000000>;
303 regulator-max-microvolt = <1000000>;
304 regulator-name = "vdd10_lcd";
305 regulator-state-mem {
306 regulator-on-in-suspend;
307 regulator-suspend-microvolt = <1000000>;
308 };
309 };
310
311 vcc_18: LDO_REG7 {
312 regulator-always-on;
313 regulator-boot-on;
314 regulator-min-microvolt = <1800000>;
315 regulator-max-microvolt = <1800000>;
316 regulator-name = "vcc_18";
317 regulator-state-mem {
318 regulator-on-in-suspend;
319 regulator-suspend-microvolt = <1800000>;
320 };
321 };
322
323 vcc18_lcd: LDO_REG8 {
324 regulator-always-on;
325 regulator-boot-on;
326 regulator-min-microvolt = <1800000>;
327 regulator-max-microvolt = <1800000>;
328 regulator-name = "vcc18_lcd";
329 regulator-state-mem {
330 regulator-on-in-suspend;
331 regulator-suspend-microvolt = <1800000>;
332 };
333 };
334
335 vcc33_sd: SWITCH_REG1 {
336 regulator-always-on;
337 regulator-boot-on;
338 regulator-name = "vcc33_sd";
339 regulator-state-mem {
340 regulator-on-in-suspend;
341 };
342 };
343
344 vcc33_lan: SWITCH_REG2 {
345 regulator-always-on;
346 regulator-boot-on;
347 regulator-name = "vcc33_lan";
348 regulator-state-mem {
349 regulator-on-in-suspend;
350 };
351 };
352 };
353 };
354};
355
356&i2c2 {
357 status = "okay";
358};
359
360&i2c5 {
361 status = "okay";
362};
363
364&i2s {
365 #sound-dai-cells = <0>;
366 status = "okay";
367};
368
369&io_domains {
370 status = "okay";
371
372 sdcard-supply = <&vccio_sd>;
373};
374
375&pinctrl {
376 pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
377 drive-strength = <8>;
378 };
379
380 pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
381 bias-pull-up;
382 drive-strength = <8>;
383 };
384
385 backlight {
386 bl_en: bl-en {
387 rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>;
388 };
389 };
390
391 buttons {
392 pwrbtn: pwrbtn {
393 rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
394 };
395 };
396
397 eth_phy {
398 eth_phy_pwr: eth-phy-pwr {
399 rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_none>;
400 };
401 };
402
403 pmic {
404 pmic_int: pmic-int {
405 rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO \
406 &pcfg_pull_up>;
407 };
408
409 dvs_1: dvs-1 {
410 rockchip,pins = <RK_GPIO0 11 RK_FUNC_GPIO \
411 &pcfg_pull_down>;
412 };
413
414 dvs_2: dvs-2 {
415 rockchip,pins = <RK_GPIO0 12 RK_FUNC_GPIO \
416 &pcfg_pull_down>;
417 };
418 };
419
420 sdmmc {
421 sdmmc_bus4: sdmmc-bus4 {
422 rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
423 <6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
424 <6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
425 <6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
426 };
427
428 sdmmc_clk: sdmmc-clk {
429 rockchip,pins = <6 20 RK_FUNC_1 \
430 &pcfg_pull_none_drv_8ma>;
431 };
432
433 sdmmc_cmd: sdmmc-cmd {
434 rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
435 };
436
437 sdmmc_pwr: sdmmc-pwr {
438 rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
439 };
440 };
441
442 usb {
443 host_vbus_drv: host-vbus-drv {
444 rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
445 };
446
447 pwr_3g: pwr-3g {
448 rockchip,pins = <7 8 RK_FUNC_GPIO &pcfg_pull_none>;
449 };
450 };
451};
452
453&pwm0 {
454 status = "okay";
455};
456
457&saradc {
458 vref-supply = <&vcc18_ldo1>;
459 status ="okay";
460};
461
462&sdmmc {
463 bus-width = <4>;
464 cap-mmc-highspeed;
465 cap-sd-highspeed;
466 card-detect-delay = <200>;
467 disable-wp; /* wp not hooked up */
468 num-slots = <1>;
469 pinctrl-names = "default";
470 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
471 status = "okay";
472 vmmc-supply = <&vcc33_sd>;
473 vqmmc-supply = <&vccio_sd>;
474};
475
476&tsadc {
477 rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
478 rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
479 status = "okay";
480};
481
482&uart0 {
483 status = "okay";
484};
485
486&uart1 {
487 status = "okay";
488};
489
490&uart2 {
491 status = "okay";
492};
493
494&uart3 {
495 status = "okay";
496};
497
498&uart4 {
499 status = "okay";
500};
501
502&usbphy {
503 status = "okay";
504};
505
506&usb_host0_ehci {
507 status = "okay";
508};
509
510&usb_host1 {
511 status = "okay";
512};
513
514&usb_otg {
515 status= "okay";
516};
517
518&vopb {
519 status = "okay";
520};
521
522&vopb_mmu {
523 status = "okay";
524};
525
526&vopl {
527 status = "okay";
528};
529
530&vopl_mmu {
531 status = "okay";
532};
533
534&wdt {
535 status = "okay";
536};