]> git.ipfire.org Git - thirdparty/kernel/stable.git/blob - arch/arm/boot/dts/rk3288-tinker.dtsi
aa107ee41b8b8f3fbc13b92676224561fe0f92c0
[thirdparty/kernel/stable.git] / arch / arm / boot / dts / rk3288-tinker.dtsi
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3 * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
4 */
5
6 #include "rk3288.dtsi"
7 #include <dt-bindings/input/input.h>
8
9 / {
10 chosen {
11 stdout-path = "serial2:115200n8";
12 };
13
14 memory {
15 reg = <0x0 0x0 0x0 0x80000000>;
16 device_type = "memory";
17 };
18
19 ext_gmac: external-gmac-clock {
20 compatible = "fixed-clock";
21 #clock-cells = <0>;
22 clock-frequency = <125000000>;
23 clock-output-names = "ext_gmac";
24 };
25
26 gpio-keys {
27 compatible = "gpio-keys";
28 #address-cells = <1>;
29 #size-cells = <0>;
30 autorepeat;
31
32 pinctrl-names = "default";
33 pinctrl-0 = <&pwrbtn>;
34
35 button@0 {
36 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_POWER>;
38 label = "GPIO Key Power";
39 linux,input-type = <1>;
40 wakeup-source;
41 debounce-interval = <100>;
42 };
43 };
44
45 gpio-leds {
46 compatible = "gpio-leds";
47
48 act-led {
49 gpios=<&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
50 linux,default-trigger="mmc0";
51 };
52
53 heartbeat-led {
54 gpios=<&gpio1 RK_PD1 GPIO_ACTIVE_HIGH>;
55 linux,default-trigger="heartbeat";
56 };
57
58 pwr-led {
59 gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_HIGH>;
60 linux,default-trigger = "default-on";
61 };
62 };
63
64 sound {
65 compatible = "simple-audio-card";
66 simple-audio-card,format = "i2s";
67 simple-audio-card,name = "rockchip,tinker-codec";
68 simple-audio-card,mclk-fs = <512>;
69
70 simple-audio-card,codec {
71 sound-dai = <&hdmi>;
72 };
73
74 simple-audio-card,cpu {
75 sound-dai = <&i2s>;
76 };
77 };
78
79 vcc_sys: vsys-regulator {
80 compatible = "regulator-fixed";
81 regulator-name = "vcc_sys";
82 regulator-min-microvolt = <5000000>;
83 regulator-max-microvolt = <5000000>;
84 regulator-always-on;
85 regulator-boot-on;
86 };
87
88 vcc_sd: sdmmc-regulator {
89 compatible = "regulator-fixed";
90 gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
91 pinctrl-names = "default";
92 pinctrl-0 = <&sdmmc_pwr>;
93 regulator-name = "vcc_sd";
94 regulator-min-microvolt = <3300000>;
95 regulator-max-microvolt = <3300000>;
96 startup-delay-us = <100000>;
97 vin-supply = <&vcc_io>;
98 };
99 };
100
101 &cpu0 {
102 cpu0-supply = <&vdd_cpu>;
103 };
104
105 &gmac {
106 assigned-clocks = <&cru SCLK_MAC>;
107 assigned-clock-parents = <&ext_gmac>;
108 clock_in_out = "input";
109 phy-mode = "rgmii";
110 phy-supply = <&vcc33_lan>;
111 pinctrl-names = "default";
112 pinctrl-0 = <&rgmii_pins>;
113 snps,reset-gpio = <&gpio4 7 0>;
114 snps,reset-active-low;
115 snps,reset-delays-us = <0 10000 1000000>;
116 tx_delay = <0x30>;
117 rx_delay = <0x10>;
118 status = "ok";
119 };
120
121 &gpu {
122 mali-supply = <&vdd_gpu>;
123 status = "okay";
124 };
125
126 &hdmi {
127 ddc-i2c-bus = <&i2c5>;
128 status = "okay";
129 };
130
131 &i2c0 {
132 clock-frequency = <400000>;
133 status = "okay";
134
135 rk808: pmic@1b {
136 compatible = "rockchip,rk808";
137 reg = <0x1b>;
138 interrupt-parent = <&gpio0>;
139 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
140 #clock-cells = <1>;
141 clock-output-names = "xin32k", "rk808-clkout2";
142 dvs-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>,
143 <&gpio0 12 GPIO_ACTIVE_HIGH>;
144 pinctrl-names = "default";
145 pinctrl-0 = <&pmic_int &global_pwroff &dvs_1 &dvs_2>;
146 rockchip,system-power-controller;
147 wakeup-source;
148
149 vcc1-supply = <&vcc_sys>;
150 vcc2-supply = <&vcc_sys>;
151 vcc3-supply = <&vcc_sys>;
152 vcc4-supply = <&vcc_sys>;
153 vcc6-supply = <&vcc_sys>;
154 vcc7-supply = <&vcc_sys>;
155 vcc8-supply = <&vcc_io>;
156 vcc9-supply = <&vcc_io>;
157 vcc10-supply = <&vcc_io>;
158 vcc11-supply = <&vcc_sys>;
159 vcc12-supply = <&vcc_io>;
160 vddio-supply = <&vcc_io>;
161
162 regulators {
163 vdd_cpu: DCDC_REG1 {
164 regulator-always-on;
165 regulator-boot-on;
166 regulator-min-microvolt = <750000>;
167 regulator-max-microvolt = <1350000>;
168 regulator-name = "vdd_arm";
169 regulator-ramp-delay = <6000>;
170 regulator-state-mem {
171 regulator-off-in-suspend;
172 };
173 };
174
175 vdd_gpu: DCDC_REG2 {
176 regulator-always-on;
177 regulator-boot-on;
178 regulator-min-microvolt = <850000>;
179 regulator-max-microvolt = <1250000>;
180 regulator-name = "vdd_gpu";
181 regulator-ramp-delay = <6000>;
182 regulator-state-mem {
183 regulator-on-in-suspend;
184 regulator-suspend-microvolt = <1000000>;
185 };
186 };
187
188 vcc_ddr: DCDC_REG3 {
189 regulator-always-on;
190 regulator-boot-on;
191 regulator-name = "vcc_ddr";
192 regulator-state-mem {
193 regulator-on-in-suspend;
194 };
195 };
196
197 vcc_io: DCDC_REG4 {
198 regulator-always-on;
199 regulator-boot-on;
200 regulator-min-microvolt = <3300000>;
201 regulator-max-microvolt = <3300000>;
202 regulator-name = "vcc_io";
203 regulator-state-mem {
204 regulator-on-in-suspend;
205 regulator-suspend-microvolt = <3300000>;
206 };
207 };
208
209 vcc18_ldo1: LDO_REG1 {
210 regulator-always-on;
211 regulator-boot-on;
212 regulator-min-microvolt = <1800000>;
213 regulator-max-microvolt = <1800000>;
214 regulator-name = "vcc18_ldo1";
215 regulator-state-mem {
216 regulator-on-in-suspend;
217 regulator-suspend-microvolt = <1800000>;
218 };
219 };
220
221 vcc33_mipi: LDO_REG2 {
222 regulator-always-on;
223 regulator-boot-on;
224 regulator-min-microvolt = <3300000>;
225 regulator-max-microvolt = <3300000>;
226 regulator-name = "vcc33_mipi";
227 regulator-state-mem {
228 regulator-off-in-suspend;
229 };
230 };
231
232 vdd_10: LDO_REG3 {
233 regulator-always-on;
234 regulator-boot-on;
235 regulator-min-microvolt = <1000000>;
236 regulator-max-microvolt = <1000000>;
237 regulator-name = "vdd_10";
238 regulator-state-mem {
239 regulator-on-in-suspend;
240 regulator-suspend-microvolt = <1000000>;
241 };
242 };
243
244 vcc18_codec: LDO_REG4 {
245 regulator-always-on;
246 regulator-boot-on;
247 regulator-min-microvolt = <1800000>;
248 regulator-max-microvolt = <1800000>;
249 regulator-name = "vcc18_codec";
250 regulator-state-mem {
251 regulator-on-in-suspend;
252 regulator-suspend-microvolt = <1800000>;
253 };
254 };
255
256 vccio_sd: LDO_REG5 {
257 regulator-min-microvolt = <1800000>;
258 regulator-max-microvolt = <3300000>;
259 regulator-name = "vccio_sd";
260 regulator-state-mem {
261 regulator-on-in-suspend;
262 regulator-suspend-microvolt = <3300000>;
263 };
264 };
265
266 vdd10_lcd: LDO_REG6 {
267 regulator-always-on;
268 regulator-boot-on;
269 regulator-min-microvolt = <1000000>;
270 regulator-max-microvolt = <1000000>;
271 regulator-name = "vdd10_lcd";
272 regulator-state-mem {
273 regulator-on-in-suspend;
274 regulator-suspend-microvolt = <1000000>;
275 };
276 };
277
278 vcc_18: LDO_REG7 {
279 regulator-always-on;
280 regulator-boot-on;
281 regulator-min-microvolt = <1800000>;
282 regulator-max-microvolt = <1800000>;
283 regulator-name = "vcc_18";
284 regulator-state-mem {
285 regulator-on-in-suspend;
286 regulator-suspend-microvolt = <1800000>;
287 };
288 };
289
290 vcc18_lcd: LDO_REG8 {
291 regulator-always-on;
292 regulator-boot-on;
293 regulator-min-microvolt = <1800000>;
294 regulator-max-microvolt = <1800000>;
295 regulator-name = "vcc18_lcd";
296 regulator-state-mem {
297 regulator-on-in-suspend;
298 regulator-suspend-microvolt = <1800000>;
299 };
300 };
301
302 vcc33_sd: SWITCH_REG1 {
303 regulator-always-on;
304 regulator-boot-on;
305 regulator-name = "vcc33_sd";
306 regulator-state-mem {
307 regulator-on-in-suspend;
308 };
309 };
310
311 vcc33_lan: SWITCH_REG2 {
312 regulator-always-on;
313 regulator-boot-on;
314 regulator-name = "vcc33_lan";
315 regulator-state-mem {
316 regulator-on-in-suspend;
317 };
318 };
319 };
320 };
321 };
322
323 &i2c2 {
324 status = "okay";
325 };
326
327 &i2c5 {
328 status = "okay";
329 };
330
331 &i2s {
332 #sound-dai-cells = <0>;
333 status = "okay";
334 };
335
336 &io_domains {
337 status = "okay";
338
339 sdcard-supply = <&vccio_sd>;
340 };
341
342 &pinctrl {
343 pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
344 drive-strength = <8>;
345 };
346
347 pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
348 bias-pull-up;
349 drive-strength = <8>;
350 };
351
352 backlight {
353 bl_en: bl-en {
354 rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>;
355 };
356 };
357
358 buttons {
359 pwrbtn: pwrbtn {
360 rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
361 };
362 };
363
364 eth_phy {
365 eth_phy_pwr: eth-phy-pwr {
366 rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_none>;
367 };
368 };
369
370 pmic {
371 pmic_int: pmic-int {
372 rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO \
373 &pcfg_pull_up>;
374 };
375
376 dvs_1: dvs-1 {
377 rockchip,pins = <RK_GPIO0 11 RK_FUNC_GPIO \
378 &pcfg_pull_down>;
379 };
380
381 dvs_2: dvs-2 {
382 rockchip,pins = <RK_GPIO0 12 RK_FUNC_GPIO \
383 &pcfg_pull_down>;
384 };
385 };
386
387 sdmmc {
388 sdmmc_bus4: sdmmc-bus4 {
389 rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
390 <6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
391 <6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
392 <6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
393 };
394
395 sdmmc_clk: sdmmc-clk {
396 rockchip,pins = <6 20 RK_FUNC_1 \
397 &pcfg_pull_none_drv_8ma>;
398 };
399
400 sdmmc_cmd: sdmmc-cmd {
401 rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
402 };
403
404 sdmmc_pwr: sdmmc-pwr {
405 rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
406 };
407 };
408
409 usb {
410 host_vbus_drv: host-vbus-drv {
411 rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
412 };
413
414 pwr_3g: pwr-3g {
415 rockchip,pins = <7 8 RK_FUNC_GPIO &pcfg_pull_none>;
416 };
417 };
418 };
419
420 &pwm0 {
421 status = "okay";
422 };
423
424 &saradc {
425 vref-supply = <&vcc18_ldo1>;
426 status ="okay";
427 };
428
429 &sdmmc {
430 bus-width = <4>;
431 cap-mmc-highspeed;
432 cap-sd-highspeed;
433 card-detect-delay = <200>;
434 disable-wp; /* wp not hooked up */
435 pinctrl-names = "default";
436 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
437 status = "okay";
438 vmmc-supply = <&vcc33_sd>;
439 vqmmc-supply = <&vccio_sd>;
440 };
441
442 &tsadc {
443 rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
444 rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
445 status = "okay";
446 };
447
448 &uart0 {
449 status = "okay";
450 };
451
452 &uart1 {
453 status = "okay";
454 };
455
456 &uart2 {
457 status = "okay";
458 };
459
460 &uart3 {
461 status = "okay";
462 };
463
464 &uart4 {
465 status = "okay";
466 };
467
468 &usbphy {
469 status = "okay";
470 };
471
472 &usb_host0_ehci {
473 status = "okay";
474 };
475
476 &usb_host1 {
477 status = "okay";
478 };
479
480 &usb_otg {
481 status= "okay";
482 };
483
484 &vopb {
485 status = "okay";
486 };
487
488 &vopb_mmu {
489 status = "okay";
490 };
491
492 &vopl {
493 status = "okay";
494 };
495
496 &vopl_mmu {
497 status = "okay";
498 };
499
500 &wdt {
501 status = "okay";
502 };