1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * RK3399-based FriendlyElec boards device tree source
5 * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd
7 * Copyright (c) 2018 FriendlyElec Computer Tech. Co., Ltd.
8 * (http://www.friendlyarm.com)
10 * Copyright (c) 2018 Collabora Ltd.
11 * Copyright (c) 2019 Arm Ltd.
15 #include <dt-bindings/input/linux-event-codes.h>
16 #include "rk3399.dtsi"
17 #include "rk3399-opp.dtsi"
21 stdout-path = "serial2:1500000n8";
24 clkin_gmac: external-gmac-clock {
25 compatible = "fixed-clock";
26 clock-frequency = <125000000>;
27 clock-output-names = "clkin_gmac";
31 vcc3v3_sys: vcc3v3-sys {
32 compatible = "regulator-fixed";
35 regulator-min-microvolt = <3300000>;
36 regulator-max-microvolt = <3300000>;
37 regulator-name = "vcc3v3_sys";
40 vcc5v0_sys: vcc5v0-sys {
41 compatible = "regulator-fixed";
44 regulator-min-microvolt = <5000000>;
45 regulator-max-microvolt = <5000000>;
46 regulator-name = "vcc5v0_sys";
47 vin-supply = <&vdd_5v>;
50 /* switched by pmic_sleep */
51 vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
52 compatible = "regulator-fixed";
55 regulator-min-microvolt = <1800000>;
56 regulator-max-microvolt = <1800000>;
57 regulator-name = "vcc1v8_s3";
58 vin-supply = <&vcc_1v8>;
61 vcc3v0_sd: vcc3v0-sd {
62 compatible = "regulator-fixed";
64 gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
65 pinctrl-names = "default";
66 pinctrl-0 = <&sdmmc0_pwr_h>;
68 regulator-min-microvolt = <3000000>;
69 regulator-max-microvolt = <3000000>;
70 regulator-name = "vcc3v0_sd";
71 vin-supply = <&vcc3v3_sys>;
74 vbus_typec: vbus-typec {
75 compatible = "regulator-fixed";
76 regulator-min-microvolt = <5000000>;
77 regulator-max-microvolt = <5000000>;
78 regulator-name = "vbus_typec";
82 compatible = "gpio-keys";
84 pinctrl-names = "default";
85 pinctrl-0 = <&power_key>;
88 debounce-interval = <100>;
89 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
90 label = "GPIO Key Power";
91 linux,code = <KEY_POWER>;
97 compatible = "gpio-leds";
98 pinctrl-names = "default";
99 pinctrl-0 = <&leds_gpio>;
102 gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
103 label = "status_led";
104 linux,default-trigger = "heartbeat";
108 sdio_pwrseq: sdio-pwrseq {
109 compatible = "mmc-pwrseq-simple";
111 clock-names = "ext_clock";
112 pinctrl-names = "default";
113 pinctrl-0 = <&wifi_reg_on_h>;
114 reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
119 cpu-supply = <&vdd_cpu_b>;
123 cpu-supply = <&vdd_cpu_b>;
127 cpu-supply = <&vdd_cpu_l>;
131 cpu-supply = <&vdd_cpu_l>;
135 cpu-supply = <&vdd_cpu_l>;
139 cpu-supply = <&vdd_cpu_l>;
147 assigned-clock-parents = <&clkin_gmac>;
148 assigned-clocks = <&cru SCLK_RMII_SRC>;
149 clock_in_out = "input";
150 pinctrl-names = "default";
151 pinctrl-0 = <&rgmii_pins>, <&phy_intb>, <&phy_rstb>;
152 phy-handle = <&rtl8211e>;
154 phy-supply = <&vcc3v3_s3>;
160 compatible = "snps,dwmac-mdio";
161 #address-cells = <1>;
166 interrupt-parent = <&gpio3>;
167 interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
168 reset-assert-us = <10000>;
169 reset-deassert-us = <30000>;
170 reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
176 mali-supply = <&vdd_gpu>;
181 ddc-i2c-bus = <&i2c7>;
182 pinctrl-names = "default";
183 pinctrl-0 = <&hdmi_cec>;
192 clock-frequency = <400000>;
193 i2c-scl-rising-time-ns = <160>;
194 i2c-scl-falling-time-ns = <30>;
197 vdd_cpu_b: regulator@40 {
198 compatible = "silergy,syr827";
200 fcs,suspend-voltage-selector = <1>;
201 pinctrl-names = "default";
202 pinctrl-0 = <&cpu_b_sleep>;
205 regulator-min-microvolt = <712500>;
206 regulator-max-microvolt = <1500000>;
207 regulator-name = "vdd_cpu_b";
208 regulator-ramp-delay = <1000>;
209 vin-supply = <&vcc3v3_sys>;
211 regulator-state-mem {
212 regulator-off-in-suspend;
216 vdd_gpu: regulator@41 {
217 compatible = "silergy,syr828";
219 fcs,suspend-voltage-selector = <1>;
220 pinctrl-names = "default";
221 pinctrl-0 = <&gpu_sleep>;
224 regulator-min-microvolt = <712500>;
225 regulator-max-microvolt = <1500000>;
226 regulator-name = "vdd_gpu";
227 regulator-ramp-delay = <1000>;
228 vin-supply = <&vcc3v3_sys>;
230 regulator-state-mem {
231 regulator-off-in-suspend;
236 compatible = "rockchip,rk808";
238 clock-output-names = "xin32k", "rtc_clko_wifi";
240 interrupt-parent = <&gpio1>;
241 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
242 pinctrl-names = "default";
243 pinctrl-0 = <&pmic_int_l>;
244 rockchip,system-power-controller;
247 vcc1-supply = <&vcc3v3_sys>;
248 vcc2-supply = <&vcc3v3_sys>;
249 vcc3-supply = <&vcc3v3_sys>;
250 vcc4-supply = <&vcc3v3_sys>;
251 vcc6-supply = <&vcc3v3_sys>;
252 vcc7-supply = <&vcc3v3_sys>;
253 vcc8-supply = <&vcc3v3_sys>;
254 vcc9-supply = <&vcc3v3_sys>;
255 vcc10-supply = <&vcc3v3_sys>;
256 vcc11-supply = <&vcc3v3_sys>;
257 vcc12-supply = <&vcc3v3_sys>;
258 vddio-supply = <&vcc_3v0>;
261 vdd_center: DCDC_REG1 {
264 regulator-min-microvolt = <750000>;
265 regulator-max-microvolt = <1350000>;
266 regulator-name = "vdd_center";
267 regulator-ramp-delay = <6001>;
269 regulator-state-mem {
270 regulator-off-in-suspend;
274 vdd_cpu_l: DCDC_REG2 {
277 regulator-min-microvolt = <750000>;
278 regulator-max-microvolt = <1350000>;
279 regulator-name = "vdd_cpu_l";
280 regulator-ramp-delay = <6001>;
282 regulator-state-mem {
283 regulator-off-in-suspend;
290 regulator-name = "vcc_ddr";
292 regulator-state-mem {
293 regulator-on-in-suspend;
300 regulator-min-microvolt = <1800000>;
301 regulator-max-microvolt = <1800000>;
302 regulator-name = "vcc_1v8";
304 regulator-state-mem {
305 regulator-on-in-suspend;
306 regulator-suspend-microvolt = <1800000>;
310 vcc1v8_cam: LDO_REG1 {
313 regulator-min-microvolt = <1800000>;
314 regulator-max-microvolt = <1800000>;
315 regulator-name = "vcc1v8_cam";
317 regulator-state-mem {
318 regulator-off-in-suspend;
322 vcc3v0_touch: LDO_REG2 {
325 regulator-min-microvolt = <3000000>;
326 regulator-max-microvolt = <3000000>;
327 regulator-name = "vcc3v0_touch";
329 regulator-state-mem {
330 regulator-off-in-suspend;
334 vcc1v8_pmupll: LDO_REG3 {
337 regulator-min-microvolt = <1800000>;
338 regulator-max-microvolt = <1800000>;
339 regulator-name = "vcc1v8_pmupll";
341 regulator-state-mem {
342 regulator-on-in-suspend;
343 regulator-suspend-microvolt = <1800000>;
350 regulator-init-microvolt = <3000000>;
351 regulator-min-microvolt = <1800000>;
352 regulator-max-microvolt = <3300000>;
353 regulator-name = "vcc_sdio";
355 regulator-state-mem {
356 regulator-on-in-suspend;
357 regulator-suspend-microvolt = <3000000>;
361 vcca3v0_codec: LDO_REG5 {
364 regulator-min-microvolt = <3000000>;
365 regulator-max-microvolt = <3000000>;
366 regulator-name = "vcca3v0_codec";
368 regulator-state-mem {
369 regulator-off-in-suspend;
376 regulator-min-microvolt = <1500000>;
377 regulator-max-microvolt = <1500000>;
378 regulator-name = "vcc_1v5";
380 regulator-state-mem {
381 regulator-on-in-suspend;
382 regulator-suspend-microvolt = <1500000>;
386 vcca1v8_codec: LDO_REG7 {
389 regulator-min-microvolt = <1800000>;
390 regulator-max-microvolt = <1800000>;
391 regulator-name = "vcca1v8_codec";
393 regulator-state-mem {
394 regulator-off-in-suspend;
401 regulator-min-microvolt = <3000000>;
402 regulator-max-microvolt = <3000000>;
403 regulator-name = "vcc_3v0";
405 regulator-state-mem {
406 regulator-on-in-suspend;
407 regulator-suspend-microvolt = <3000000>;
411 vcc3v3_s3: SWITCH_REG1 {
414 regulator-name = "vcc3v3_s3";
416 regulator-state-mem {
417 regulator-off-in-suspend;
421 vcc3v3_s0: SWITCH_REG2 {
424 regulator-name = "vcc3v3_s0";
426 regulator-state-mem {
427 regulator-off-in-suspend;
435 clock-frequency = <200000>;
436 i2c-scl-rising-time-ns = <150>;
437 i2c-scl-falling-time-ns = <30>;
446 clock-frequency = <400000>;
447 i2c-scl-rising-time-ns = <160>;
448 i2c-scl-falling-time-ns = <30>;
451 fusb0: typec-portc@22 {
452 compatible = "fcs,fusb302";
454 interrupt-parent = <&gpio1>;
455 interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
456 pinctrl-names = "default";
457 pinctrl-0 = <&fusb0_int>;
458 vbus-supply = <&vbus_typec>;
471 bt656-supply = <&vcc_1v8>;
472 audio-supply = <&vcca1v8_codec>;
473 sdmmc-supply = <&vcc_sdio>;
474 gpio1830-supply = <&vcc_3v0>;
479 assigned-clock-parents = <&cru SCLK_PCIEPHY_REF100M>;
480 assigned-clock-rates = <100000000>;
481 assigned-clocks = <&cru SCLK_PCIEPHY_REF>;
486 ep-gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>;
487 max-link-speed = <2>;
494 fusb0_int: fusb0-int {
495 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
500 leds_gpio: leds-gpio {
501 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
507 rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
511 rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
516 cpu_b_sleep: cpu-b-sleep {
517 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
520 gpu_sleep: gpu-sleep {
521 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
524 pmic_int_l: pmic-int-l {
525 rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
530 power_key: power-key {
531 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
536 bt_host_wake_l: bt-host-wake-l {
537 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
540 bt_reg_on_h: bt-reg-on-h {
541 /* external pullup to VCC1V8_PMUPLL */
542 rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
545 bt_wake_l: bt-wake-l {
546 rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
549 wifi_reg_on_h: wifi-reg_on-h {
550 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
555 sdmmc0_det_l: sdmmc0-det-l {
556 rockchip,pins = <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
559 sdmmc0_pwr_h: sdmmc0-pwr-h {
560 rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
566 pmu1830-supply = <&vcc_3v0>;
579 pinctrl-names = "active";
580 pinctrl-0 = <&pwm2_pin_pull_down>;
585 vref-supply = <&vcca1v8_s3>;
600 keep-power-in-suspend;
601 mmc-pwrseq = <&sdio_pwrseq>;
603 pinctrl-names = "default";
604 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
613 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
615 pinctrl-names = "default";
616 pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc0_det_l>;
618 vmmc-supply = <&vcc3v0_sd>;
619 vqmmc-supply = <&vcc_sdio>;
632 /* tshut mode 0:CRU 1:GPIO */
633 rockchip,hw-tshut-mode = <1>;
634 /* tshut polarity 0:LOW 1:HIGH */
635 rockchip,hw-tshut-polarity = <1>;
664 pinctrl-names = "default";
665 pinctrl-0 = <&uart0_xfer &uart0_rts &uart0_cts>;
669 compatible = "brcm,bcm43438-bt";
672 device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
673 host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
674 shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
675 max-speed = <4000000>;
676 pinctrl-names = "default";
677 pinctrl-0 = <&bt_reg_on_h &bt_host_wake_l &bt_wake_l>;
678 vbat-supply = <&vcc3v3_sys>;
679 vddio-supply = <&vcc_1v8>;