Loading...
Note: File does not exist in v6.9.4.
1/*
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 0x0 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&gpu {
160 mali-supply = <&vdd_gpu>;
161 status = "okay";
162};
163
164&hdmi {
165 ddc-i2c-bus = <&i2c5>;
166 status = "okay";
167};
168
169&i2c0 {
170 clock-frequency = <400000>;
171 status = "okay";
172
173 rk808: pmic@1b {
174 compatible = "rockchip,rk808";
175 reg = <0x1b>;
176 interrupt-parent = <&gpio0>;
177 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
178 #clock-cells = <1>;
179 clock-output-names = "xin32k", "rk808-clkout2";
180 dvs-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>,
181 <&gpio0 12 GPIO_ACTIVE_HIGH>;
182 pinctrl-names = "default";
183 pinctrl-0 = <&pmic_int &global_pwroff &dvs_1 &dvs_2>;
184 rockchip,system-power-controller;
185 wakeup-source;
186
187 vcc1-supply = <&vcc_sys>;
188 vcc2-supply = <&vcc_sys>;
189 vcc3-supply = <&vcc_sys>;
190 vcc4-supply = <&vcc_sys>;
191 vcc6-supply = <&vcc_sys>;
192 vcc7-supply = <&vcc_sys>;
193 vcc8-supply = <&vcc_io>;
194 vcc9-supply = <&vcc_io>;
195 vcc10-supply = <&vcc_io>;
196 vcc11-supply = <&vcc_sys>;
197 vcc12-supply = <&vcc_io>;
198 vddio-supply = <&vcc_io>;
199
200 regulators {
201 vdd_cpu: DCDC_REG1 {
202 regulator-always-on;
203 regulator-boot-on;
204 regulator-min-microvolt = <750000>;
205 regulator-max-microvolt = <1350000>;
206 regulator-name = "vdd_arm";
207 regulator-ramp-delay = <6000>;
208 regulator-state-mem {
209 regulator-off-in-suspend;
210 };
211 };
212
213 vdd_gpu: DCDC_REG2 {
214 regulator-always-on;
215 regulator-boot-on;
216 regulator-min-microvolt = <850000>;
217 regulator-max-microvolt = <1250000>;
218 regulator-name = "vdd_gpu";
219 regulator-ramp-delay = <6000>;
220 regulator-state-mem {
221 regulator-on-in-suspend;
222 regulator-suspend-microvolt = <1000000>;
223 };
224 };
225
226 vcc_ddr: DCDC_REG3 {
227 regulator-always-on;
228 regulator-boot-on;
229 regulator-name = "vcc_ddr";
230 regulator-state-mem {
231 regulator-on-in-suspend;
232 };
233 };
234
235 vcc_io: DCDC_REG4 {
236 regulator-always-on;
237 regulator-boot-on;
238 regulator-min-microvolt = <3300000>;
239 regulator-max-microvolt = <3300000>;
240 regulator-name = "vcc_io";
241 regulator-state-mem {
242 regulator-on-in-suspend;
243 regulator-suspend-microvolt = <3300000>;
244 };
245 };
246
247 vcc18_ldo1: LDO_REG1 {
248 regulator-always-on;
249 regulator-boot-on;
250 regulator-min-microvolt = <1800000>;
251 regulator-max-microvolt = <1800000>;
252 regulator-name = "vcc18_ldo1";
253 regulator-state-mem {
254 regulator-on-in-suspend;
255 regulator-suspend-microvolt = <1800000>;
256 };
257 };
258
259 vcc33_mipi: LDO_REG2 {
260 regulator-always-on;
261 regulator-boot-on;
262 regulator-min-microvolt = <3300000>;
263 regulator-max-microvolt = <3300000>;
264 regulator-name = "vcc33_mipi";
265 regulator-state-mem {
266 regulator-off-in-suspend;
267 };
268 };
269
270 vdd_10: LDO_REG3 {
271 regulator-always-on;
272 regulator-boot-on;
273 regulator-min-microvolt = <1000000>;
274 regulator-max-microvolt = <1000000>;
275 regulator-name = "vdd_10";
276 regulator-state-mem {
277 regulator-on-in-suspend;
278 regulator-suspend-microvolt = <1000000>;
279 };
280 };
281
282 vcc18_codec: LDO_REG4 {
283 regulator-always-on;
284 regulator-boot-on;
285 regulator-min-microvolt = <1800000>;
286 regulator-max-microvolt = <1800000>;
287 regulator-name = "vcc18_codec";
288 regulator-state-mem {
289 regulator-on-in-suspend;
290 regulator-suspend-microvolt = <1800000>;
291 };
292 };
293
294 vccio_sd: LDO_REG5 {
295 regulator-min-microvolt = <1800000>;
296 regulator-max-microvolt = <3300000>;
297 regulator-name = "vccio_sd";
298 regulator-state-mem {
299 regulator-on-in-suspend;
300 regulator-suspend-microvolt = <3300000>;
301 };
302 };
303
304 vdd10_lcd: LDO_REG6 {
305 regulator-always-on;
306 regulator-boot-on;
307 regulator-min-microvolt = <1000000>;
308 regulator-max-microvolt = <1000000>;
309 regulator-name = "vdd10_lcd";
310 regulator-state-mem {
311 regulator-on-in-suspend;
312 regulator-suspend-microvolt = <1000000>;
313 };
314 };
315
316 vcc_18: LDO_REG7 {
317 regulator-always-on;
318 regulator-boot-on;
319 regulator-min-microvolt = <1800000>;
320 regulator-max-microvolt = <1800000>;
321 regulator-name = "vcc_18";
322 regulator-state-mem {
323 regulator-on-in-suspend;
324 regulator-suspend-microvolt = <1800000>;
325 };
326 };
327
328 vcc18_lcd: LDO_REG8 {
329 regulator-always-on;
330 regulator-boot-on;
331 regulator-min-microvolt = <1800000>;
332 regulator-max-microvolt = <1800000>;
333 regulator-name = "vcc18_lcd";
334 regulator-state-mem {
335 regulator-on-in-suspend;
336 regulator-suspend-microvolt = <1800000>;
337 };
338 };
339
340 vcc33_sd: SWITCH_REG1 {
341 regulator-always-on;
342 regulator-boot-on;
343 regulator-name = "vcc33_sd";
344 regulator-state-mem {
345 regulator-on-in-suspend;
346 };
347 };
348
349 vcc33_lan: SWITCH_REG2 {
350 regulator-always-on;
351 regulator-boot-on;
352 regulator-name = "vcc33_lan";
353 regulator-state-mem {
354 regulator-on-in-suspend;
355 };
356 };
357 };
358 };
359};
360
361&i2c2 {
362 status = "okay";
363};
364
365&i2c5 {
366 status = "okay";
367};
368
369&i2s {
370 #sound-dai-cells = <0>;
371 status = "okay";
372};
373
374&io_domains {
375 status = "okay";
376
377 sdcard-supply = <&vccio_sd>;
378};
379
380&pinctrl {
381 pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
382 drive-strength = <8>;
383 };
384
385 pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
386 bias-pull-up;
387 drive-strength = <8>;
388 };
389
390 backlight {
391 bl_en: bl-en {
392 rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>;
393 };
394 };
395
396 buttons {
397 pwrbtn: pwrbtn {
398 rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
399 };
400 };
401
402 eth_phy {
403 eth_phy_pwr: eth-phy-pwr {
404 rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_none>;
405 };
406 };
407
408 pmic {
409 pmic_int: pmic-int {
410 rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO \
411 &pcfg_pull_up>;
412 };
413
414 dvs_1: dvs-1 {
415 rockchip,pins = <RK_GPIO0 11 RK_FUNC_GPIO \
416 &pcfg_pull_down>;
417 };
418
419 dvs_2: dvs-2 {
420 rockchip,pins = <RK_GPIO0 12 RK_FUNC_GPIO \
421 &pcfg_pull_down>;
422 };
423 };
424
425 sdmmc {
426 sdmmc_bus4: sdmmc-bus4 {
427 rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
428 <6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
429 <6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
430 <6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
431 };
432
433 sdmmc_clk: sdmmc-clk {
434 rockchip,pins = <6 20 RK_FUNC_1 \
435 &pcfg_pull_none_drv_8ma>;
436 };
437
438 sdmmc_cmd: sdmmc-cmd {
439 rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
440 };
441
442 sdmmc_pwr: sdmmc-pwr {
443 rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
444 };
445 };
446
447 usb {
448 host_vbus_drv: host-vbus-drv {
449 rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
450 };
451
452 pwr_3g: pwr-3g {
453 rockchip,pins = <7 8 RK_FUNC_GPIO &pcfg_pull_none>;
454 };
455 };
456};
457
458&pwm0 {
459 status = "okay";
460};
461
462&saradc {
463 vref-supply = <&vcc18_ldo1>;
464 status ="okay";
465};
466
467&sdmmc {
468 bus-width = <4>;
469 cap-mmc-highspeed;
470 cap-sd-highspeed;
471 card-detect-delay = <200>;
472 disable-wp; /* wp not hooked up */
473 pinctrl-names = "default";
474 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
475 status = "okay";
476 vmmc-supply = <&vcc33_sd>;
477 vqmmc-supply = <&vccio_sd>;
478};
479
480&tsadc {
481 rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
482 rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
483 status = "okay";
484};
485
486&uart0 {
487 status = "okay";
488};
489
490&uart1 {
491 status = "okay";
492};
493
494&uart2 {
495 status = "okay";
496};
497
498&uart3 {
499 status = "okay";
500};
501
502&uart4 {
503 status = "okay";
504};
505
506&usbphy {
507 status = "okay";
508};
509
510&usb_host0_ehci {
511 status = "okay";
512};
513
514&usb_host1 {
515 status = "okay";
516};
517
518&usb_otg {
519 status= "okay";
520};
521
522&vopb {
523 status = "okay";
524};
525
526&vopb_mmu {
527 status = "okay";
528};
529
530&vopl {
531 status = "okay";
532};
533
534&vopl_mmu {
535 status = "okay";
536};
537
538&wdt {
539 status = "okay";
540};