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>;
155 snps,reset-active-low;
156 snps,reset-delays-us = <0 10000 30000>;
157 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
163 compatible = "snps,dwmac-mdio";
164 #address-cells = <1>;
169 interrupt-parent = <&gpio3>;
170 interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
176 mali-supply = <&vdd_gpu>;
181 ddc-i2c-bus = <&i2c7>;
182 pinctrl-names = "default";
183 pinctrl-0 = <&hdmi_cec>;
188 clock-frequency = <400000>;
189 i2c-scl-rising-time-ns = <160>;
190 i2c-scl-falling-time-ns = <30>;
193 vdd_cpu_b: regulator@40 {
194 compatible = "silergy,syr827";
196 fcs,suspend-voltage-selector = <1>;
197 pinctrl-names = "default";
198 pinctrl-0 = <&cpu_b_sleep>;
201 regulator-min-microvolt = <712500>;
202 regulator-max-microvolt = <1500000>;
203 regulator-name = "vdd_cpu_b";
204 regulator-ramp-delay = <1000>;
205 vin-supply = <&vcc3v3_sys>;
207 regulator-state-mem {
208 regulator-off-in-suspend;
212 vdd_gpu: regulator@41 {
213 compatible = "silergy,syr828";
215 fcs,suspend-voltage-selector = <1>;
216 pinctrl-names = "default";
217 pinctrl-0 = <&gpu_sleep>;
220 regulator-min-microvolt = <712500>;
221 regulator-max-microvolt = <1500000>;
222 regulator-name = "vdd_gpu";
223 regulator-ramp-delay = <1000>;
224 vin-supply = <&vcc3v3_sys>;
226 regulator-state-mem {
227 regulator-off-in-suspend;
232 compatible = "rockchip,rk808";
234 clock-output-names = "xin32k", "rtc_clko_wifi";
236 interrupt-parent = <&gpio1>;
237 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
238 pinctrl-names = "default";
239 pinctrl-0 = <&pmic_int_l>;
240 rockchip,system-power-controller;
243 vcc1-supply = <&vcc3v3_sys>;
244 vcc2-supply = <&vcc3v3_sys>;
245 vcc3-supply = <&vcc3v3_sys>;
246 vcc4-supply = <&vcc3v3_sys>;
247 vcc6-supply = <&vcc3v3_sys>;
248 vcc7-supply = <&vcc3v3_sys>;
249 vcc8-supply = <&vcc3v3_sys>;
250 vcc9-supply = <&vcc3v3_sys>;
251 vcc10-supply = <&vcc3v3_sys>;
252 vcc11-supply = <&vcc3v3_sys>;
253 vcc12-supply = <&vcc3v3_sys>;
254 vddio-supply = <&vcc_3v0>;
257 vdd_center: DCDC_REG1 {
260 regulator-min-microvolt = <750000>;
261 regulator-max-microvolt = <1350000>;
262 regulator-name = "vdd_center";
263 regulator-ramp-delay = <6001>;
265 regulator-state-mem {
266 regulator-off-in-suspend;
270 vdd_cpu_l: DCDC_REG2 {
273 regulator-min-microvolt = <750000>;
274 regulator-max-microvolt = <1350000>;
275 regulator-name = "vdd_cpu_l";
276 regulator-ramp-delay = <6001>;
278 regulator-state-mem {
279 regulator-off-in-suspend;
286 regulator-name = "vcc_ddr";
288 regulator-state-mem {
289 regulator-on-in-suspend;
296 regulator-min-microvolt = <1800000>;
297 regulator-max-microvolt = <1800000>;
298 regulator-name = "vcc_1v8";
300 regulator-state-mem {
301 regulator-on-in-suspend;
302 regulator-suspend-microvolt = <1800000>;
306 vcc1v8_cam: LDO_REG1 {
309 regulator-min-microvolt = <1800000>;
310 regulator-max-microvolt = <1800000>;
311 regulator-name = "vcc1v8_cam";
313 regulator-state-mem {
314 regulator-off-in-suspend;
318 vcc3v0_touch: LDO_REG2 {
321 regulator-min-microvolt = <3000000>;
322 regulator-max-microvolt = <3000000>;
323 regulator-name = "vcc3v0_touch";
325 regulator-state-mem {
326 regulator-off-in-suspend;
330 vcc1v8_pmupll: LDO_REG3 {
333 regulator-min-microvolt = <1800000>;
334 regulator-max-microvolt = <1800000>;
335 regulator-name = "vcc1v8_pmupll";
337 regulator-state-mem {
338 regulator-on-in-suspend;
339 regulator-suspend-microvolt = <1800000>;
346 regulator-init-microvolt = <3000000>;
347 regulator-min-microvolt = <1800000>;
348 regulator-max-microvolt = <3300000>;
349 regulator-name = "vcc_sdio";
351 regulator-state-mem {
352 regulator-on-in-suspend;
353 regulator-suspend-microvolt = <3000000>;
357 vcca3v0_codec: LDO_REG5 {
360 regulator-min-microvolt = <3000000>;
361 regulator-max-microvolt = <3000000>;
362 regulator-name = "vcca3v0_codec";
364 regulator-state-mem {
365 regulator-off-in-suspend;
372 regulator-min-microvolt = <1500000>;
373 regulator-max-microvolt = <1500000>;
374 regulator-name = "vcc_1v5";
376 regulator-state-mem {
377 regulator-on-in-suspend;
378 regulator-suspend-microvolt = <1500000>;
382 vcca1v8_codec: LDO_REG7 {
385 regulator-min-microvolt = <1800000>;
386 regulator-max-microvolt = <1800000>;
387 regulator-name = "vcca1v8_codec";
389 regulator-state-mem {
390 regulator-off-in-suspend;
397 regulator-min-microvolt = <3000000>;
398 regulator-max-microvolt = <3000000>;
399 regulator-name = "vcc_3v0";
401 regulator-state-mem {
402 regulator-on-in-suspend;
403 regulator-suspend-microvolt = <3000000>;
407 vcc3v3_s3: SWITCH_REG1 {
410 regulator-name = "vcc3v3_s3";
412 regulator-state-mem {
413 regulator-off-in-suspend;
417 vcc3v3_s0: SWITCH_REG2 {
420 regulator-name = "vcc3v3_s0";
422 regulator-state-mem {
423 regulator-off-in-suspend;
431 clock-frequency = <200000>;
432 i2c-scl-rising-time-ns = <150>;
433 i2c-scl-falling-time-ns = <30>;
442 clock-frequency = <400000>;
443 i2c-scl-rising-time-ns = <160>;
444 i2c-scl-falling-time-ns = <30>;
447 fusb0: typec-portc@22 {
448 compatible = "fcs,fusb302";
450 interrupt-parent = <&gpio1>;
451 interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
452 pinctrl-names = "default";
453 pinctrl-0 = <&fusb0_int>;
454 vbus-supply = <&vbus_typec>;
463 bt656-supply = <&vcc_1v8>;
464 audio-supply = <&vcca1v8_codec>;
465 sdmmc-supply = <&vcc_sdio>;
466 gpio1830-supply = <&vcc_3v0>;
471 assigned-clock-parents = <&cru SCLK_PCIEPHY_REF100M>;
472 assigned-clock-rates = <100000000>;
473 assigned-clocks = <&cru SCLK_PCIEPHY_REF>;
478 ep-gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>;
479 max-link-speed = <2>;
486 fusb0_int: fusb0-int {
487 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
492 leds_gpio: leds-gpio {
493 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
499 rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
503 rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
508 cpu_b_sleep: cpu-b-sleep {
509 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
512 gpu_sleep: gpu-sleep {
513 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
516 pmic_int_l: pmic-int-l {
517 rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
522 power_key: power-key {
523 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
528 bt_host_wake_l: bt-host-wake-l {
529 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
532 bt_reg_on_h: bt-reg-on-h {
533 /* external pullup to VCC1V8_PMUPLL */
534 rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
537 bt_wake_l: bt-wake-l {
538 rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
541 wifi_reg_on_h: wifi-reg_on-h {
542 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
547 sdmmc0_det_l: sdmmc0-det-l {
548 rockchip,pins = <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
551 sdmmc0_pwr_h: sdmmc0-pwr-h {
552 rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
558 pmu1830-supply = <&vcc_3v0>;
571 pinctrl-names = "active";
572 pinctrl-0 = <&pwm2_pin_pull_down>;
577 vref-supply = <&vcca1v8_s3>;
592 keep-power-in-suspend;
593 mmc-pwrseq = <&sdio_pwrseq>;
595 pinctrl-names = "default";
596 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
605 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
607 pinctrl-names = "default";
608 pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc0_det_l>;
610 vmmc-supply = <&vcc3v0_sd>;
611 vqmmc-supply = <&vcc_sdio>;
624 /* tshut mode 0:CRU 1:GPIO */
625 rockchip,hw-tshut-mode = <1>;
626 /* tshut polarity 0:LOW 1:HIGH */
627 rockchip,hw-tshut-polarity = <1>;
656 pinctrl-names = "default";
657 pinctrl-0 = <&uart0_xfer &uart0_rts &uart0_cts>;
661 compatible = "brcm,bcm43438-bt";
664 device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
665 host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
666 shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
667 max-speed = <4000000>;
668 pinctrl-names = "default";
669 pinctrl-0 = <&bt_reg_on_h &bt_host_wake_l &bt_wake_l>;
670 vbat-supply = <&vcc3v3_sys>;
671 vddio-supply = <&vcc_1v8>;