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>;
153 phy-supply = <&vcc3v3_s3>;
154 snps,reset-active-low;
155 snps,reset-delays-us = <0 10000 50000>;
156 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
163 mali-supply = <&vdd_gpu>;
168 ddc-i2c-bus = <&i2c7>;
169 pinctrl-names = "default";
170 pinctrl-0 = <&hdmi_cec>;
175 clock-frequency = <400000>;
176 i2c-scl-rising-time-ns = <160>;
177 i2c-scl-falling-time-ns = <30>;
180 vdd_cpu_b: regulator@40 {
181 compatible = "silergy,syr827";
183 fcs,suspend-voltage-selector = <1>;
184 pinctrl-names = "default";
185 pinctrl-0 = <&cpu_b_sleep>;
188 regulator-min-microvolt = <712500>;
189 regulator-max-microvolt = <1500000>;
190 regulator-name = "vdd_cpu_b";
191 regulator-ramp-delay = <1000>;
192 vin-supply = <&vcc3v3_sys>;
194 regulator-state-mem {
195 regulator-off-in-suspend;
199 vdd_gpu: regulator@41 {
200 compatible = "silergy,syr828";
202 fcs,suspend-voltage-selector = <1>;
203 pinctrl-names = "default";
204 pinctrl-0 = <&gpu_sleep>;
207 regulator-min-microvolt = <712500>;
208 regulator-max-microvolt = <1500000>;
209 regulator-name = "vdd_gpu";
210 regulator-ramp-delay = <1000>;
211 vin-supply = <&vcc3v3_sys>;
213 regulator-state-mem {
214 regulator-off-in-suspend;
219 compatible = "rockchip,rk808";
221 clock-output-names = "xin32k", "rtc_clko_wifi";
223 interrupt-parent = <&gpio1>;
224 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
225 pinctrl-names = "default";
226 pinctrl-0 = <&pmic_int_l>;
227 rockchip,system-power-controller;
230 vcc1-supply = <&vcc3v3_sys>;
231 vcc2-supply = <&vcc3v3_sys>;
232 vcc3-supply = <&vcc3v3_sys>;
233 vcc4-supply = <&vcc3v3_sys>;
234 vcc6-supply = <&vcc3v3_sys>;
235 vcc7-supply = <&vcc3v3_sys>;
236 vcc8-supply = <&vcc3v3_sys>;
237 vcc9-supply = <&vcc3v3_sys>;
238 vcc10-supply = <&vcc3v3_sys>;
239 vcc11-supply = <&vcc3v3_sys>;
240 vcc12-supply = <&vcc3v3_sys>;
241 vddio-supply = <&vcc_3v0>;
244 vdd_center: DCDC_REG1 {
247 regulator-min-microvolt = <750000>;
248 regulator-max-microvolt = <1350000>;
249 regulator-name = "vdd_center";
250 regulator-ramp-delay = <6001>;
252 regulator-state-mem {
253 regulator-off-in-suspend;
257 vdd_cpu_l: DCDC_REG2 {
260 regulator-min-microvolt = <750000>;
261 regulator-max-microvolt = <1350000>;
262 regulator-name = "vdd_cpu_l";
263 regulator-ramp-delay = <6001>;
265 regulator-state-mem {
266 regulator-off-in-suspend;
273 regulator-name = "vcc_ddr";
275 regulator-state-mem {
276 regulator-on-in-suspend;
283 regulator-min-microvolt = <1800000>;
284 regulator-max-microvolt = <1800000>;
285 regulator-name = "vcc_1v8";
287 regulator-state-mem {
288 regulator-on-in-suspend;
289 regulator-suspend-microvolt = <1800000>;
293 vcc1v8_cam: LDO_REG1 {
296 regulator-min-microvolt = <1800000>;
297 regulator-max-microvolt = <1800000>;
298 regulator-name = "vcc1v8_cam";
300 regulator-state-mem {
301 regulator-off-in-suspend;
305 vcc3v0_touch: LDO_REG2 {
308 regulator-min-microvolt = <3000000>;
309 regulator-max-microvolt = <3000000>;
310 regulator-name = "vcc3v0_touch";
312 regulator-state-mem {
313 regulator-off-in-suspend;
317 vcc1v8_pmupll: LDO_REG3 {
320 regulator-min-microvolt = <1800000>;
321 regulator-max-microvolt = <1800000>;
322 regulator-name = "vcc1v8_pmupll";
324 regulator-state-mem {
325 regulator-on-in-suspend;
326 regulator-suspend-microvolt = <1800000>;
333 regulator-init-microvolt = <3000000>;
334 regulator-min-microvolt = <1800000>;
335 regulator-max-microvolt = <3300000>;
336 regulator-name = "vcc_sdio";
338 regulator-state-mem {
339 regulator-on-in-suspend;
340 regulator-suspend-microvolt = <3000000>;
344 vcca3v0_codec: LDO_REG5 {
347 regulator-min-microvolt = <3000000>;
348 regulator-max-microvolt = <3000000>;
349 regulator-name = "vcca3v0_codec";
351 regulator-state-mem {
352 regulator-off-in-suspend;
359 regulator-min-microvolt = <1500000>;
360 regulator-max-microvolt = <1500000>;
361 regulator-name = "vcc_1v5";
363 regulator-state-mem {
364 regulator-on-in-suspend;
365 regulator-suspend-microvolt = <1500000>;
369 vcca1v8_codec: LDO_REG7 {
372 regulator-min-microvolt = <1800000>;
373 regulator-max-microvolt = <1800000>;
374 regulator-name = "vcca1v8_codec";
376 regulator-state-mem {
377 regulator-off-in-suspend;
384 regulator-min-microvolt = <3000000>;
385 regulator-max-microvolt = <3000000>;
386 regulator-name = "vcc_3v0";
388 regulator-state-mem {
389 regulator-on-in-suspend;
390 regulator-suspend-microvolt = <3000000>;
394 vcc3v3_s3: SWITCH_REG1 {
397 regulator-name = "vcc3v3_s3";
399 regulator-state-mem {
400 regulator-off-in-suspend;
404 vcc3v3_s0: SWITCH_REG2 {
407 regulator-name = "vcc3v3_s0";
409 regulator-state-mem {
410 regulator-off-in-suspend;
418 clock-frequency = <200000>;
419 i2c-scl-rising-time-ns = <150>;
420 i2c-scl-falling-time-ns = <30>;
429 clock-frequency = <400000>;
430 i2c-scl-rising-time-ns = <160>;
431 i2c-scl-falling-time-ns = <30>;
434 fusb0: typec-portc@22 {
435 compatible = "fcs,fusb302";
437 interrupt-parent = <&gpio1>;
438 interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
439 pinctrl-names = "default";
440 pinctrl-0 = <&fusb0_int>;
441 vbus-supply = <&vbus_typec>;
450 bt656-supply = <&vcc_1v8>;
451 audio-supply = <&vcca1v8_codec>;
452 sdmmc-supply = <&vcc_sdio>;
453 gpio1830-supply = <&vcc_3v0>;
458 assigned-clock-parents = <&cru SCLK_PCIEPHY_REF100M>;
459 assigned-clock-rates = <100000000>;
460 assigned-clocks = <&cru SCLK_PCIEPHY_REF>;
465 ep-gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>;
466 max-link-speed = <2>;
473 fusb0_int: fusb0-int {
474 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
479 leds_gpio: leds-gpio {
480 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
485 cpu_b_sleep: cpu-b-sleep {
486 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
489 gpu_sleep: gpu-sleep {
490 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
493 pmic_int_l: pmic-int-l {
494 rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
499 power_key: power-key {
500 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
505 bt_host_wake_l: bt-host-wake-l {
506 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
509 bt_reg_on_h: bt-reg-on-h {
510 /* external pullup to VCC1V8_PMUPLL */
511 rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
514 bt_wake_l: bt-wake-l {
515 rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
518 wifi_reg_on_h: wifi-reg_on-h {
519 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
524 sdmmc0_det_l: sdmmc0-det-l {
525 rockchip,pins = <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
528 sdmmc0_pwr_h: sdmmc0-pwr-h {
529 rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
535 pmu1830-supply = <&vcc_3v0>;
548 pinctrl-names = "active";
549 pinctrl-0 = <&pwm2_pin_pull_down>;
554 vref-supply = <&vcca1v8_s3>;
569 keep-power-in-suspend;
570 mmc-pwrseq = <&sdio_pwrseq>;
572 pinctrl-names = "default";
573 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
582 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
584 pinctrl-names = "default";
585 pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc0_det_l>;
587 vmmc-supply = <&vcc3v0_sd>;
588 vqmmc-supply = <&vcc_sdio>;
601 /* tshut mode 0:CRU 1:GPIO */
602 rockchip,hw-tshut-mode = <1>;
603 /* tshut polarity 0:LOW 1:HIGH */
604 rockchip,hw-tshut-polarity = <1>;
633 pinctrl-names = "default";
634 pinctrl-0 = <&uart0_xfer &uart0_rts &uart0_cts>;
638 compatible = "brcm,bcm43438-bt";
641 device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
642 host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
643 shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
644 max-speed = <4000000>;
645 pinctrl-names = "default";
646 pinctrl-0 = <&bt_reg_on_h &bt_host_wake_l &bt_wake_l>;
647 vbat-supply = <&vcc3v3_sys>;
648 vddio-supply = <&vcc_1v8>;