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";
32 compatible = "regulator-fixed";
35 regulator-name = "vdd_5v";
38 vcc5v0_core: vcc5v0-core {
39 compatible = "regulator-fixed";
42 regulator-name = "vcc5v0_core";
43 vin-supply = <&vdd_5v>;
46 vcc3v3_sys: vcc3v3-sys {
47 compatible = "regulator-fixed";
50 regulator-min-microvolt = <3300000>;
51 regulator-max-microvolt = <3300000>;
52 regulator-name = "vcc3v3_sys";
53 vin-supply = <&vcc5v0_core>;
56 vcc5v0_sys: vcc5v0-sys {
57 compatible = "regulator-fixed";
60 regulator-min-microvolt = <5000000>;
61 regulator-max-microvolt = <5000000>;
62 regulator-name = "vcc5v0_sys";
63 vin-supply = <&vdd_5v>;
66 vcc5v0_usb1: vcc5v0-usb1 {
67 compatible = "regulator-fixed";
70 regulator-name = "vcc5v0_usb1";
71 vin-supply = <&vcc5v0_sys>;
74 vcc5v0_usb2: vcc5v0-usb2 {
75 compatible = "regulator-fixed";
78 regulator-name = "vcc5v0_usb2";
79 vin-supply = <&vcc5v0_sys>;
82 /* switched by pmic_sleep */
83 vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
84 compatible = "regulator-fixed";
87 regulator-min-microvolt = <1800000>;
88 regulator-max-microvolt = <1800000>;
89 regulator-name = "vcc1v8_s3";
90 vin-supply = <&vcc_1v8>;
93 vcc3v0_sd: vcc3v0-sd {
94 compatible = "regulator-fixed";
96 gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
97 pinctrl-names = "default";
98 pinctrl-0 = <&sdmmc0_pwr_h>;
100 regulator-min-microvolt = <3000000>;
101 regulator-max-microvolt = <3000000>;
102 regulator-name = "vcc3v0_sd";
103 vin-supply = <&vcc3v3_sys>;
106 vbus_typec: vbus-typec {
107 compatible = "regulator-fixed";
109 gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
111 regulator-min-microvolt = <5000000>;
112 regulator-max-microvolt = <5000000>;
113 regulator-name = "vbus_typec";
114 vin-supply = <&vdd_5v>;
118 compatible = "adc-keys";
119 io-channels = <&saradc 1>;
120 io-channel-names = "buttons";
121 keyup-threshold-microvolt = <1800000>;
122 poll-interval = <100>;
126 linux,code = <KEY_VENDOR>;
127 press-threshold-microvolt = <18000>;
132 compatible = "gpio-keys";
134 pinctrl-names = "default";
135 pinctrl-0 = <&power_key>;
138 debounce-interval = <100>;
139 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
140 label = "GPIO Key Power";
141 linux,code = <KEY_POWER>;
147 compatible = "gpio-leds";
148 pinctrl-names = "default";
149 pinctrl-0 = <&leds_gpio>;
152 gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
153 label = "status_led";
154 linux,default-trigger = "heartbeat";
158 sdio_pwrseq: sdio-pwrseq {
159 compatible = "mmc-pwrseq-simple";
161 clock-names = "ext_clock";
162 pinctrl-names = "default";
163 pinctrl-0 = <&wifi_reg_on_h>;
164 reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
169 cpu-supply = <&vdd_cpu_b>;
173 cpu-supply = <&vdd_cpu_b>;
177 cpu-supply = <&vdd_cpu_l>;
181 cpu-supply = <&vdd_cpu_l>;
185 cpu-supply = <&vdd_cpu_l>;
189 cpu-supply = <&vdd_cpu_l>;
197 assigned-clock-parents = <&clkin_gmac>;
198 assigned-clocks = <&cru SCLK_RMII_SRC>;
199 clock_in_out = "input";
200 pinctrl-names = "default";
201 pinctrl-0 = <&rgmii_pins>;
203 phy-supply = <&vcc3v3_s3>;
204 snps,reset-active-low;
205 snps,reset-delays-us = <0 10000 50000>;
206 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
213 mali-supply = <&vdd_gpu>;
218 ddc-i2c-bus = <&i2c7>;
219 pinctrl-names = "default";
220 pinctrl-0 = <&hdmi_cec>;
225 clock-frequency = <400000>;
226 i2c-scl-rising-time-ns = <160>;
227 i2c-scl-falling-time-ns = <30>;
230 vdd_cpu_b: regulator@40 {
231 compatible = "silergy,syr827";
233 fcs,suspend-voltage-selector = <1>;
234 pinctrl-names = "default";
235 pinctrl-0 = <&cpu_b_sleep>;
238 regulator-min-microvolt = <712500>;
239 regulator-max-microvolt = <1500000>;
240 regulator-name = "vdd_cpu_b";
241 regulator-ramp-delay = <1000>;
242 vin-supply = <&vcc3v3_sys>;
244 regulator-state-mem {
245 regulator-off-in-suspend;
249 vdd_gpu: regulator@41 {
250 compatible = "silergy,syr828";
252 fcs,suspend-voltage-selector = <1>;
253 pinctrl-names = "default";
254 pinctrl-0 = <&gpu_sleep>;
257 regulator-min-microvolt = <712500>;
258 regulator-max-microvolt = <1500000>;
259 regulator-name = "vdd_gpu";
260 regulator-ramp-delay = <1000>;
261 vin-supply = <&vcc3v3_sys>;
263 regulator-state-mem {
264 regulator-off-in-suspend;
269 compatible = "rockchip,rk808";
271 clock-output-names = "xin32k", "rk808-clkout2";
273 interrupt-parent = <&gpio1>;
274 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
275 pinctrl-names = "default";
276 pinctrl-0 = <&pmic_int_l>;
277 rockchip,system-power-controller;
280 vcc1-supply = <&vcc3v3_sys>;
281 vcc2-supply = <&vcc3v3_sys>;
282 vcc3-supply = <&vcc3v3_sys>;
283 vcc4-supply = <&vcc3v3_sys>;
284 vcc6-supply = <&vcc3v3_sys>;
285 vcc7-supply = <&vcc3v3_sys>;
286 vcc8-supply = <&vcc3v3_sys>;
287 vcc9-supply = <&vcc3v3_sys>;
288 vcc10-supply = <&vcc3v3_sys>;
289 vcc11-supply = <&vcc3v3_sys>;
290 vcc12-supply = <&vcc3v3_sys>;
291 vddio-supply = <&vcc_3v0>;
294 vdd_center: DCDC_REG1 {
297 regulator-min-microvolt = <750000>;
298 regulator-max-microvolt = <1350000>;
299 regulator-name = "vdd_center";
300 regulator-ramp-delay = <6001>;
302 regulator-state-mem {
303 regulator-off-in-suspend;
307 vdd_cpu_l: DCDC_REG2 {
310 regulator-min-microvolt = <750000>;
311 regulator-max-microvolt = <1350000>;
312 regulator-name = "vdd_cpu_l";
313 regulator-ramp-delay = <6001>;
315 regulator-state-mem {
316 regulator-off-in-suspend;
323 regulator-name = "vcc_ddr";
325 regulator-state-mem {
326 regulator-on-in-suspend;
333 regulator-min-microvolt = <1800000>;
334 regulator-max-microvolt = <1800000>;
335 regulator-name = "vcc_1v8";
337 regulator-state-mem {
338 regulator-on-in-suspend;
339 regulator-suspend-microvolt = <1800000>;
343 vcc1v8_cam: LDO_REG1 {
346 regulator-min-microvolt = <1800000>;
347 regulator-max-microvolt = <1800000>;
348 regulator-name = "vcc1v8_cam";
350 regulator-state-mem {
351 regulator-off-in-suspend;
355 vcc3v0_touch: LDO_REG2 {
358 regulator-min-microvolt = <3000000>;
359 regulator-max-microvolt = <3000000>;
360 regulator-name = "vcc3v0_touch";
362 regulator-state-mem {
363 regulator-off-in-suspend;
367 vcc1v8_pmupll: LDO_REG3 {
370 regulator-min-microvolt = <1800000>;
371 regulator-max-microvolt = <1800000>;
372 regulator-name = "vcc1v8_pmupll";
374 regulator-state-mem {
375 regulator-on-in-suspend;
376 regulator-suspend-microvolt = <1800000>;
383 regulator-init-microvolt = <3000000>;
384 regulator-min-microvolt = <1800000>;
385 regulator-max-microvolt = <3300000>;
386 regulator-name = "vcc_sdio";
388 regulator-state-mem {
389 regulator-on-in-suspend;
390 regulator-suspend-microvolt = <3000000>;
394 vcca3v0_codec: LDO_REG5 {
397 regulator-min-microvolt = <3000000>;
398 regulator-max-microvolt = <3000000>;
399 regulator-name = "vcca3v0_codec";
401 regulator-state-mem {
402 regulator-off-in-suspend;
409 regulator-min-microvolt = <1500000>;
410 regulator-max-microvolt = <1500000>;
411 regulator-name = "vcc_1v5";
413 regulator-state-mem {
414 regulator-on-in-suspend;
415 regulator-suspend-microvolt = <1500000>;
419 vcca1v8_codec: LDO_REG7 {
422 regulator-min-microvolt = <1800000>;
423 regulator-max-microvolt = <1800000>;
424 regulator-name = "vcca1v8_codec";
426 regulator-state-mem {
427 regulator-off-in-suspend;
434 regulator-min-microvolt = <3000000>;
435 regulator-max-microvolt = <3000000>;
436 regulator-name = "vcc_3v0";
438 regulator-state-mem {
439 regulator-on-in-suspend;
440 regulator-suspend-microvolt = <3000000>;
444 vcc3v3_s3: SWITCH_REG1 {
447 regulator-name = "vcc3v3_s3";
449 regulator-state-mem {
450 regulator-off-in-suspend;
454 vcc3v3_s0: SWITCH_REG2 {
457 regulator-name = "vcc3v3_s0";
459 regulator-state-mem {
460 regulator-off-in-suspend;
468 clock-frequency = <200000>;
469 i2c-scl-rising-time-ns = <150>;
470 i2c-scl-falling-time-ns = <30>;
479 clock-frequency = <400000>;
480 i2c-scl-rising-time-ns = <160>;
481 i2c-scl-falling-time-ns = <30>;
484 fusb0: typec-portc@22 {
485 compatible = "fcs,fusb302";
487 interrupt-parent = <&gpio1>;
488 interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
489 pinctrl-names = "default";
490 pinctrl-0 = <&fusb0_int>;
491 vbus-supply = <&vbus_typec>;
500 bt656-supply = <&vcc_1v8>;
501 audio-supply = <&vcca1v8_codec>;
502 sdmmc-supply = <&vcc_sdio>;
503 gpio1830-supply = <&vcc_3v0>;
508 assigned-clock-parents = <&cru SCLK_PCIEPHY_REF100M>;
509 assigned-clock-rates = <100000000>;
510 assigned-clocks = <&cru SCLK_PCIEPHY_REF>;
515 ep-gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>;
516 max-link-speed = <2>;
523 fusb0_int: fusb0-int {
524 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
529 leds_gpio: leds-gpio {
530 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
535 cpu_b_sleep: cpu-b-sleep {
536 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
539 gpu_sleep: gpu-sleep {
540 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
543 pmic_int_l: pmic-int-l {
544 rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
549 power_key: power-key {
550 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
555 sdmmc0_pwr_h: sdmmc0-pwr-h {
556 rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
561 wifi_reg_on_h: wifi-reg_on-h {
562 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
568 pmu1830-supply = <&vcc_3v0>;
581 pinctrl-names = "active";
582 pinctrl-0 = <&pwm2_pin_pull_down>;
587 vref-supply = <&vcca1v8_s3>;
594 mmc-hs400-enhanced-strobe;
604 keep-power-in-suspend;
605 mmc-pwrseq = <&sdio_pwrseq>;
607 pinctrl-names = "default";
608 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
618 pinctrl-names = "default";
619 pinctrl-0 = <&sdmmc_bus4 &sdmmc_cd &sdmmc_clk &sdmmc_cmd>;
621 vmmc-supply = <&vcc3v0_sd>;
622 vqmmc-supply = <&vcc_sdio>;
635 /* tshut mode 0:CRU 1:GPIO */
636 rockchip,hw-tshut-mode = <1>;
637 /* tshut polarity 0:LOW 1:HIGH */
638 rockchip,hw-tshut-polarity = <1>;
647 phy-supply = <&vcc5v0_usb1>;
660 phy-supply = <&vcc5v0_usb2>;
669 pinctrl-names = "default";
670 pinctrl-0 = <&uart0_xfer &uart0_rts &uart0_cts>;