1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd
4 * Copyright (c) 2019 Radxa Limited
5 * Copyright (c) 2022 Amarula Solutions(India)
9 #include <dt-bindings/leds/common.h>
10 #include "rk3399.dtsi"
11 #include "rk3399-t-opp.dtsi"
14 model = "Radxa ROCK 4C+";
15 compatible = "radxa,rock-4c-plus", "rockchip,rk3399";
23 stdout-path = "serial2:1500000n8";
26 clkin_gmac: external-gmac-clock {
27 compatible = "fixed-clock";
28 clock-frequency = <125000000>;
29 clock-output-names = "clkin_gmac";
34 compatible = "gpio-leds";
35 pinctrl-names = "default";
36 pinctrl-0 = <&user_led1 &user_led2>;
40 function = LED_FUNCTION_POWER;
41 color = <LED_COLOR_ID_GREEN>;
42 gpios = <&gpio3 RK_PD4 GPIO_ACTIVE_LOW>;
43 linux,default-trigger = "default-on";
48 function = LED_FUNCTION_STATUS;
49 color = <LED_COLOR_ID_BLUE>;
50 gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>;
51 linux,default-trigger = "heartbeat";
55 sdio_pwrseq: sdio-pwrseq {
56 compatible = "mmc-pwrseq-simple";
58 clock-names = "ext_clock";
59 pinctrl-names = "default";
60 pinctrl-0 = <&wifi_enable_h>;
61 reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
64 vcc_3v3: vcc-3v3-regulator {
65 compatible = "regulator-fixed";
66 regulator-name = "vcc_3v3";
69 regulator-min-microvolt = <3300000>;
70 regulator-max-microvolt = <3300000>;
71 vin-supply = <&vcc3v3_sys>;
74 vcc3v3_phy1: vcc3v3-phy1-regulator {
75 compatible = "regulator-fixed";
76 regulator-name = "vcc3v3_phy1";
79 regulator-min-microvolt = <3300000>;
80 regulator-max-microvolt = <3300000>;
81 vin-supply = <&vcc_3v3>;
84 vcc5v0_host1: vcc5v0-host-regulator {
85 compatible = "regulator-fixed";
87 gpio = <&gpio3 RK_PD6 GPIO_ACTIVE_HIGH>;
88 pinctrl-names = "default";
89 pinctrl-0 = <&vcc5v0_host_en>;
90 regulator-name = "vcc5v0_host1";
93 vin-supply = <&vcc5v0_host0_s0>;
96 vcc5v0_sys: vcc5v0-sys-regulator {
97 compatible = "regulator-fixed";
98 regulator-name = "vcc5v0_sys";
101 regulator-min-microvolt = <5000000>;
102 regulator-max-microvolt = <5000000>;
105 vcc5v0_typec: vcc5v0-typec-regulator {
106 compatible = "regulator-fixed";
108 gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
109 pinctrl-names = "default";
110 pinctrl-0 = <&vcc5v0_typec0_en>;
111 regulator-name = "vcc5v0_typec";
114 vin-supply = <&vcc5v0_sys>;
117 vdd_log: vdd-log-regulator {
118 compatible = "regulator-fixed";
119 regulator-name = "vdd_log";
122 regulator-min-microvolt = <950000>;
123 regulator-max-microvolt = <950000>;
124 vin-supply = <&vcc5v0_sys>;
129 cpu-supply = <&vdd_cpu_l>;
133 cpu-supply = <&vdd_cpu_l>;
137 cpu-supply = <&vdd_cpu_l>;
141 cpu-supply = <&vdd_cpu_l>;
145 cpu-supply = <&vdd_cpu_b>;
149 cpu-supply = <&vdd_cpu_b>;
157 assigned-clocks = <&cru SCLK_RMII_SRC>;
158 assigned-clock-parents = <&clkin_gmac>;
159 clock_in_out = "input";
160 phy-supply = <&vcc3v3_phy1>;
162 pinctrl-names = "default";
163 pinctrl-0 = <&rgmii_pins>;
164 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
165 snps,reset-active-low;
166 snps,reset-delays-us = <0 10000 50000>;
173 mali-supply = <&vdd_gpu>;
178 avdd-0v9-supply = <&vcc_0v9_s0>;
179 avdd-1v8-supply = <&vcc_1v8_s0>;
180 ddc-i2c-bus = <&i2c3>;
181 pinctrl-names = "default";
182 pinctrl-0 = <&hdmi_cec>;
192 i2c-scl-falling-time-ns = <30>;
193 i2c-scl-rising-time-ns = <180>;
194 clock-frequency = <400000>;
197 compatible = "rockchip,rk809";
199 interrupt-parent = <&gpio1>;
200 interrupts = <RK_PC5 IRQ_TYPE_LEVEL_LOW>;
202 clock-output-names = "rk808-clkout1", "rk808-clkout2";
203 pinctrl-names = "default";
204 pinctrl-0 = <&pmic_int_l>;
205 rockchip,system-power-controller;
208 vcc1-supply = <&vcc5v0_sys>;
209 vcc2-supply = <&vcc5v0_sys>;
210 vcc3-supply = <&vcc5v0_sys>;
211 vcc4-supply = <&vcc5v0_sys>;
212 vcc5-supply = <&vcc_buck5_s3>;
213 vcc6-supply = <&vcc_buck5_s3>;
214 vcc7-supply = <&vcc5v0_sys>;
215 vcc8-supply = <&vcc3v3_sys>;
216 vcc9-supply = <&vcc5v0_sys>;
219 vdd_center: DCDC_REG1 {
222 regulator-min-microvolt = <750000>;
223 regulator-max-microvolt = <1350000>;
224 regulator-initial-mode = <0x2>;
225 regulator-name = "vdd_center";
226 regulator-state-mem {
227 regulator-off-in-suspend;
228 regulator-suspend-microvolt = <900000>;
232 vdd_cpu_l: DCDC_REG2 {
235 regulator-min-microvolt = <750000>;
236 regulator-max-microvolt = <1350000>;
237 regulator-ramp-delay = <6001>;
238 regulator-initial-mode = <0x2>;
239 regulator-name = "vdd_cpu_l";
240 regulator-state-mem {
241 regulator-off-in-suspend;
248 regulator-name = "vcc_ddr";
249 regulator-initial-mode = <0x2>;
250 regulator-state-mem {
251 regulator-on-in-suspend;
255 vcc3v3_sys: DCDC_REG4 {
258 regulator-min-microvolt = <3300000>;
259 regulator-max-microvolt = <3300000>;
260 regulator-initial-mode = <0x2>;
261 regulator-name = "vcc3v3_sys";
262 regulator-state-mem {
263 regulator-on-in-suspend;
264 regulator-suspend-microvolt = <3300000>;
268 vcc_buck5_s3: DCDC_REG5 {
271 regulator-min-microvolt = <3300000>;
272 regulator-max-microvolt = <3300000>;
273 regulator-name = "vcc_buck5_s3";
274 regulator-state-mem {
275 regulator-on-in-suspend;
276 regulator-suspend-microvolt = <3300000>;
280 vcc_0v9_s3: LDO_REG1 {
283 regulator-min-microvolt = <900000>;
284 regulator-max-microvolt = <900000>;
285 regulator-name = "vcc_0v9_s3";
286 regulator-state-mem {
287 regulator-off-in-suspend;
291 vcc_1v8_s3: LDO_REG2 {
294 regulator-min-microvolt = <1800000>;
295 regulator-max-microvolt = <1800000>;
296 regulator-name = "vcc_1v8_s3";
297 regulator-state-mem {
298 regulator-on-in-suspend;
299 regulator-suspend-microvolt = <1800000>;
303 vcc_0v9_s0: LDO_REG3 {
306 regulator-min-microvolt = <900000>;
307 regulator-max-microvolt = <900000>;
308 regulator-name = "vcc_0v9_s0";
309 regulator-state-mem {
310 regulator-on-in-suspend;
311 regulator-suspend-microvolt = <900000>;
315 vcc_1v8_s0: LDO_REG4 {
318 regulator-min-microvolt = <1800000>;
319 regulator-max-microvolt = <1800000>;
320 regulator-name = "vcc_1v8_s0";
321 regulator-state-mem {
322 regulator-off-in-suspend;
329 regulator-min-microvolt = <3000000>;
330 regulator-max-microvolt = <3000000>;
331 regulator-name = "vcc_mipi";
332 regulator-state-mem {
333 regulator-off-in-suspend;
337 vcc_1v5_s0: LDO_REG6 {
340 regulator-min-microvolt = <1500000>;
341 regulator-max-microvolt = <1500000>;
342 regulator-name = "vcc_1v5_s0";
343 regulator-state-mem {
344 regulator-off-in-suspend;
348 vcc_3v0_s0: LDO_REG7 {
351 regulator-min-microvolt = <3000000>;
352 regulator-max-microvolt = <3000000>;
353 regulator-name = "vcc_3v0_s0";
354 regulator-state-mem {
355 regulator-off-in-suspend;
359 vcc_sdio_s0: LDO_REG8 {
362 regulator-min-microvolt = <1800000>;
363 regulator-max-microvolt = <3300000>;
364 regulator-name = "vcc_sdio_s0";
365 regulator-state-mem {
366 regulator-off-in-suspend;
373 regulator-min-microvolt = <3300000>;
374 regulator-max-microvolt = <3300000>;
375 regulator-name = "vcc_cam";
376 regulator-state-mem {
377 regulator-off-in-suspend;
381 vcc5v0_host0_s0: SWITCH_REG1 {
384 regulator-name = "vcc5v0_host0_s0";
385 regulator-state-mem {
386 regulator-on-in-suspend;
390 lcd_3v3: SWITCH_REG2 {
393 regulator-name = "lcd_3v3";
394 regulator-state-mem {
395 regulator-off-in-suspend;
401 vdd_cpu_b: regulator@40 {
402 compatible = "silergy,syr827";
404 fcs,suspend-voltage-selector = <1>;
405 regulator-compatible = "fan53555-reg";
406 pinctrl-0 = <&vsel1_gpio>;
407 vsel-gpios = <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>;
408 regulator-name = "vdd_cpu_b";
409 regulator-min-microvolt = <712500>;
410 regulator-max-microvolt = <1500000>;
411 regulator-ramp-delay = <1000>;
414 vin-supply = <&vcc5v0_sys>;
415 regulator-state-mem {
416 regulator-off-in-suspend;
420 vdd_gpu: regulator@41 {
421 compatible = "silergy,syr828";
423 fcs,suspend-voltage-selector = <1>;
424 regulator-compatible = "fan53555-reg";
425 pinctrl-0 = <&vsel2_gpio>;
426 vsel-gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_HIGH>;
427 regulator-name = "vdd_gpu";
428 regulator-min-microvolt = <712500>;
429 regulator-max-microvolt = <1500000>;
430 regulator-ramp-delay = <1000>;
433 vin-supply = <&vcc5v0_sys>;
434 regulator-initial-mode = <1>; /* 1:force PWM 2:auto */
435 regulator-state-mem {
436 regulator-off-in-suspend;
442 i2c-scl-rising-time-ns = <450>;
443 i2c-scl-falling-time-ns = <15>;
452 audio-supply = <&vcc_1v8_s0>;
453 bt656-supply = <&vcc_3v0_s0>;
454 gpio1830-supply = <&vcc_3v0_s0>;
455 sdmmc-supply = <&vcc_sdio_s0>;
461 bt_enable_h: bt-enable-h {
462 rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
465 bt_host_wake_l: bt-host-wake-l {
466 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
469 bt_wake_l: bt-wake-l {
470 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
475 user_led1: user-led1 {
476 rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
479 user_led2: user-led2 {
480 rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
485 pmic_int_l: pmic-int-l {
486 rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
489 vsel1_gpio: vsel1-gpio {
490 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
493 vsel2_gpio: vsel2-gpio {
494 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
499 sdmmc_bus4: sdmmc-bus4 {
500 rockchip,pins = <4 8 1 &pcfg_pull_up_8ma>,
501 <4 9 1 &pcfg_pull_up_8ma>,
502 <4 10 1 &pcfg_pull_up_8ma>,
503 <4 11 1 &pcfg_pull_up_8ma>;
506 sdmmc_clk: sdmmc-clk {
507 rockchip,pins = <4 12 1 &pcfg_pull_none_18ma>;
510 sdmmc_cmd: sdmmc-cmd {
511 rockchip,pins = <4 13 1 &pcfg_pull_up_8ma>;
516 vcc5v0_typec0_en: vcc5v0-typec-en {
517 rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
522 vcc5v0_host_en: vcc5v0-host-en {
523 rockchip,pins = <3 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
528 wifi_enable_h: wifi-enable-h {
529 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
532 wifi_host_wake_l: wifi-host-wake-l {
533 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
539 pmu1830-supply = <&vcc_3v0_s0>;
545 vref-supply = <&vcc_1v8_s3>;
549 max-frequency = <150000000>;
557 #address-cells = <1>;
560 clock-frequency = <50000000>;
563 keep-power-in-suspend;
564 mmc-pwrseq = <&sdio_pwrseq>;
566 pinctrl-names = "default";
567 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
572 compatible = "brcm,bcm4329-fmac";
574 interrupt-parent = <&gpio0>;
575 interrupts = <RK_PA3 IRQ_TYPE_LEVEL_HIGH>;
576 interrupt-names = "host-wake";
577 pinctrl-names = "default";
578 pinctrl-0 = <&wifi_host_wake_l>;
586 card-detect-delay = <800>;
588 pinctrl-names = "default";
589 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
590 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
591 vqmmc-supply = <&vcc_sdio_s0>;
604 rockchip,hw-tshut-mode = <1>;
605 rockchip,hw-tshut-polarity = <1>;
612 u2phy0_otg: otg-port {
616 u2phy0_host: host-port {
617 phy-supply = <&vcc5v0_host1>;
625 u2phy1_otg: otg-port {
629 u2phy1_host: host-port {
630 phy-supply = <&vcc5v0_host1>;
636 pinctrl-names = "default";
637 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
641 compatible = "brcm,bcm4345c5";
644 device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
645 host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
646 shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
647 max-speed = <1500000>;
648 pinctrl-names = "default";
649 pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
650 vbat-supply = <&vcc3v3_sys>;
651 vddio-supply = <&vcc_1v8_s3>;