0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002
0003 /dts-v1/;
0004
0005 #include <dt-bindings/gpio/gpio.h>
0006 #include <dt-bindings/pinctrl/rockchip.h>
0007 #include "rk3566.dtsi"
0008
0009 / {
0010 model = "Firefly Station M2";
0011 compatible = "firefly,rk3566-roc-pc", "rockchip,rk3566";
0012
0013 aliases {
0014 mmc0 = &sdmmc0;
0015 mmc1 = &sdhci;
0016 mmc2 = &sdmmc1;
0017 };
0018
0019 chosen: chosen {
0020 stdout-path = "serial2:1500000n8";
0021 };
0022
0023 gmac1_clkin: external-gmac1-clock {
0024 compatible = "fixed-clock";
0025 clock-frequency = <125000000>;
0026 clock-output-names = "gmac1_clkin";
0027 #clock-cells = <0>;
0028 };
0029
0030 leds {
0031 compatible = "gpio-leds";
0032
0033 led-user {
0034 label = "user-led";
0035 default-state = "on";
0036 gpios = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>;
0037 linux,default-trigger = "heartbeat";
0038 pinctrl-names = "default";
0039 pinctrl-0 = <&user_led_enable_h>;
0040 retain-state-suspended;
0041 };
0042 };
0043
0044 sdio_pwrseq: sdio-pwrseq {
0045 status = "okay";
0046 compatible = "mmc-pwrseq-simple";
0047 clocks = <&rk809 1>;
0048 clock-names = "ext_clock";
0049 pinctrl-names = "default";
0050 pinctrl-0 = <&wifi_enable_h>;
0051 reset-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>;
0052 };
0053
0054 usb_5v: usb-5v-regulator {
0055 compatible = "regulator-fixed";
0056 regulator-name = "usb_5v";
0057 regulator-always-on;
0058 regulator-boot-on;
0059 regulator-min-microvolt = <5000000>;
0060 regulator-max-microvolt = <5000000>;
0061 };
0062
0063 vcc5v0_sys: vcc5v0-sys-regulator {
0064 compatible = "regulator-fixed";
0065 regulator-name = "vcc5v0_sys";
0066 regulator-always-on;
0067 regulator-boot-on;
0068 regulator-min-microvolt = <5000000>;
0069 regulator-max-microvolt = <5000000>;
0070 vin-supply = <&usb_5v>;
0071 };
0072
0073 vcc3v3_sys: vcc3v3-sys-regulator {
0074 compatible = "regulator-fixed";
0075 regulator-name = "vcc3v3_sys";
0076 regulator-min-microvolt = <3300000>;
0077 regulator-max-microvolt = <3300000>;
0078 regulator-always-on;
0079 vin-supply = <&vcc5v0_sys>;
0080 };
0081
0082 vcc5v0_usb30_host: vcc5v0-usb30-host-regulator {
0083 compatible = "regulator-fixed";
0084 regulator-name = "vcc5v0_usb30_host";
0085 enable-active-high;
0086 gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
0087 pinctrl-names = "default";
0088 pinctrl-0 = <&vcc5v0_usb30_host_en_h>;
0089 regulator-always-on;
0090 regulator-min-microvolt = <5000000>;
0091 regulator-max-microvolt = <5000000>;
0092 vin-supply = <&vcc5v0_sys>;
0093 };
0094
0095 vcc5v0_usb_otg: vcc5v0-usb-otg-regulator {
0096 compatible = "regulator-fixed";
0097 regulator-name = "vcc5v0_usb_otg";
0098 enable-active-high;
0099 gpio = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
0100 pinctrl-names = "default";
0101 pinctrl-0 = <&vcc5v0_usb_otg_en_h>;
0102 regulator-always-on;
0103 regulator-min-microvolt = <5000000>;
0104 regulator-max-microvolt = <5000000>;
0105 vin-supply = <&vcc5v0_sys>;
0106 };
0107 };
0108
0109 &combphy1 {
0110 status = "okay";
0111 };
0112
0113 &cpu0 {
0114 cpu-supply = <&vdd_cpu>;
0115 };
0116
0117 &cpu1 {
0118 cpu-supply = <&vdd_cpu>;
0119 };
0120
0121 &cpu2 {
0122 cpu-supply = <&vdd_cpu>;
0123 };
0124
0125 &cpu3 {
0126 cpu-supply = <&vdd_cpu>;
0127 };
0128
0129 &gmac1 {
0130 assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>;
0131 assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>, <&gmac1_clkin>;
0132 clock_in_out = "input";
0133 phy-mode = "rgmii-id";
0134 phy-supply = <&vcc_3v3>;
0135 pinctrl-names = "default";
0136 pinctrl-0 = <&gmac1m0_miim
0137 &gmac1m0_tx_bus2
0138 &gmac1m0_rx_bus2
0139 &gmac1m0_rgmii_clk
0140 &gmac1m0_clkinout
0141 &gmac1m0_rgmii_bus>;
0142 snps,reset-gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>;
0143 snps,reset-active-low;
0144 /* Reset time is 20ms, 100ms for rtl8211f */
0145 snps,reset-delays-us = <0 20000 100000>;
0146 tx_delay = <0x4f>;
0147 rx_delay = <0x24>;
0148 phy-handle = <&rgmii_phy1>;
0149 status = "okay";
0150 };
0151
0152 &i2c0 {
0153 status = "okay";
0154
0155 vdd_cpu: regulator@1c {
0156 compatible = "tcs,tcs4525";
0157 reg = <0x1c>;
0158 fcs,suspend-voltage-selector = <1>;
0159 regulator-name = "vdd_cpu";
0160 regulator-min-microvolt = <800000>;
0161 regulator-max-microvolt = <1150000>;
0162 regulator-ramp-delay = <2300>;
0163 regulator-always-on;
0164 regulator-boot-on;
0165 vin-supply = <&vcc5v0_sys>;
0166
0167 regulator-state-mem {
0168 regulator-off-in-suspend;
0169 };
0170 };
0171
0172 rk809: pmic@20 {
0173 compatible = "rockchip,rk809";
0174 reg = <0x20>;
0175 interrupt-parent = <&gpio0>;
0176 interrupts = <RK_PA7 IRQ_TYPE_LEVEL_LOW>;
0177 clock-output-names = "rk808-clkout1", "rk808-clkout2";
0178
0179 pinctrl-names = "default";
0180 pinctrl-0 = <&pmic_int>;
0181 rockchip,system-power-controller;
0182 wakeup-source;
0183 #clock-cells = <1>;
0184
0185 vcc1-supply = <&vcc3v3_sys>;
0186 vcc2-supply = <&vcc3v3_sys>;
0187 vcc3-supply = <&vcc3v3_sys>;
0188 vcc4-supply = <&vcc3v3_sys>;
0189 vcc5-supply = <&vcc3v3_sys>;
0190 vcc6-supply = <&vcc3v3_sys>;
0191 vcc7-supply = <&vcc3v3_sys>;
0192 vcc8-supply = <&vcc3v3_sys>;
0193 vcc9-supply = <&vcc3v3_sys>;
0194
0195 regulators {
0196 vdd_log: DCDC_REG1 {
0197 regulator-name = "vdd_log";
0198 regulator-always-on;
0199 regulator-boot-on;
0200 regulator-min-microvolt = <500000>;
0201 regulator-max-microvolt = <1350000>;
0202 regulator-init-microvolt = <900000>;
0203 regulator-ramp-delay = <6001>;
0204
0205 regulator-state-mem {
0206 regulator-on-in-suspend;
0207 regulator-suspend-microvolt = <900000>;
0208 };
0209 };
0210
0211 vdd_gpu: DCDC_REG2 {
0212 regulator-name = "vdd_gpu";
0213 regulator-min-microvolt = <900000>;
0214 regulator-max-microvolt = <1350000>;
0215 regulator-init-microvolt = <900000>;
0216 regulator-ramp-delay = <6001>;
0217
0218 regulator-state-mem {
0219 regulator-off-in-suspend;
0220 regulator-suspend-microvolt = <900000>;
0221 };
0222 };
0223
0224 vcc_ddr: DCDC_REG3 {
0225 regulator-name = "vcc_ddr";
0226 regulator-always-on;
0227 regulator-boot-on;
0228 regulator-min-microvolt = <1100000>;
0229 regulator-max-microvolt = <1100000>;
0230 regulator-initial-mode = <0x2>;
0231 regulator-state-mem {
0232 regulator-on-in-suspend;
0233 };
0234 };
0235
0236 vdd_npu: DCDC_REG4 {
0237 regulator-name = "vdd_npu";
0238 regulator-min-microvolt = <900000>;
0239 regulator-max-microvolt = <1350000>;
0240 regulator-initial-mode = <0x2>;
0241 regulator-state-mem {
0242 regulator-off-in-suspend;
0243 };
0244 };
0245
0246 vcc_1v8: DCDC_REG5 {
0247 regulator-name = "vcc_1v8";
0248 regulator-always-on;
0249 regulator-boot-on;
0250 regulator-min-microvolt = <1800000>;
0251 regulator-max-microvolt = <1800000>;
0252
0253 regulator-state-mem {
0254 regulator-on-in-suspend;
0255 regulator-suspend-microvolt = <1800000>;
0256 };
0257 };
0258
0259 vdda0v9_image: LDO_REG1 {
0260 regulator-name = "vdda0v9_image";
0261 regulator-always-on;
0262 regulator-boot-on;
0263 regulator-min-microvolt = <900000>;
0264 regulator-max-microvolt = <900000>;
0265
0266 regulator-state-mem {
0267 regulator-on-in-suspend;
0268 regulator-suspend-microvolt = <900000>;
0269 };
0270 };
0271
0272 vdda_0v9: LDO_REG2 {
0273 regulator-name = "vdda_0v9";
0274 regulator-always-on;
0275 regulator-boot-on;
0276 regulator-min-microvolt = <900000>;
0277 regulator-max-microvolt = <900000>;
0278
0279 regulator-state-mem {
0280 regulator-on-in-suspend;
0281 regulator-suspend-microvolt = <900000>;
0282 };
0283 };
0284
0285 vdda0v9_pmu: LDO_REG3 {
0286 regulator-name = "vdda0v9_pmu";
0287 regulator-always-on;
0288 regulator-boot-on;
0289 regulator-min-microvolt = <900000>;
0290 regulator-max-microvolt = <900000>;
0291 regulator-state-mem {
0292 regulator-on-in-suspend;
0293 regulator-suspend-microvolt = <900000>;
0294 };
0295 };
0296
0297 vccio_acodec: LDO_REG4 {
0298 regulator-name = "vccio_acodec";
0299 regulator-always-on;
0300 regulator-boot-on;
0301 regulator-min-microvolt = <3300000>;
0302 regulator-max-microvolt = <3300000>;
0303
0304 regulator-state-mem {
0305 regulator-on-in-suspend;
0306 regulator-suspend-microvolt = <3300000>;
0307
0308 };
0309 };
0310
0311 vccio_sd: LDO_REG5 {
0312 regulator-name = "vccio_sd";
0313 regulator-always-on;
0314 regulator-boot-on;
0315 regulator-min-microvolt = <1800000>;
0316 regulator-max-microvolt = <3300000>;
0317
0318 regulator-state-mem {
0319 regulator-on-in-suspend;
0320 regulator-suspend-microvolt = <3300000>;
0321 };
0322 };
0323
0324 vcc3v3_pmu: LDO_REG6 {
0325 regulator-name = "vcc3v3_pmu";
0326 regulator-always-on;
0327 regulator-boot-on;
0328 regulator-min-microvolt = <3300000>;
0329 regulator-max-microvolt = <3300000>;
0330
0331 regulator-state-mem {
0332 regulator-on-in-suspend;
0333 regulator-suspend-microvolt = <3300000>;
0334 };
0335 };
0336
0337 vcca_1v8: LDO_REG7 {
0338 regulator-name = "vcca_1v8";
0339 regulator-always-on;
0340 regulator-boot-on;
0341 regulator-min-microvolt = <1800000>;
0342 regulator-max-microvolt = <1800000>;
0343
0344 regulator-state-mem {
0345 regulator-on-in-suspend;
0346 regulator-suspend-microvolt = <1800000>;
0347 };
0348 };
0349
0350 vcca1v8_pmu: LDO_REG8 {
0351 regulator-name = "vcca1v8_pmu";
0352 regulator-always-on;
0353 regulator-boot-on;
0354 regulator-min-microvolt = <1800000>;
0355 regulator-max-microvolt = <1800000>;
0356
0357 regulator-state-mem {
0358 regulator-on-in-suspend;
0359 regulator-suspend-microvolt = <1800000>;
0360 };
0361 };
0362
0363 vcca1v8_image: LDO_REG9 {
0364 regulator-name = "vcca1v8_image";
0365 regulator-always-on;
0366 regulator-boot-on;
0367 regulator-min-microvolt = <1800000>;
0368 regulator-max-microvolt = <1800000>;
0369
0370 regulator-state-mem {
0371 regulator-on-in-suspend;
0372 regulator-suspend-microvolt = <1800000>;
0373 };
0374 };
0375
0376 vcc_3v3: SWITCH_REG1 {
0377 regulator-boot-on;
0378 regulator-name = "vcc3v3";
0379 };
0380
0381 vcc3v3_sd: SWITCH_REG2 {
0382 regulator-name = "vcc3v3_sd";
0383 regulator-always-on;
0384 regulator-boot-on;
0385 };
0386 };
0387 };
0388 };
0389
0390 &i2c1 {
0391 status = "okay";
0392 };
0393
0394 &i2c2 {
0395 status = "okay";
0396 };
0397
0398 &i2c3 {
0399 pinctrl-names = "default";
0400 pinctrl-0 = <&i2c3m1_xfer>;
0401 status = "okay";
0402 };
0403
0404 &i2c5 {
0405 status = "okay";
0406 };
0407
0408 &mdio1 {
0409 rgmii_phy1: ethernet-phy@0 {
0410 compatible = "ethernet-phy-ieee802.3-c22";
0411 reg = <0x0>;
0412 };
0413 };
0414
0415 &pinctrl {
0416 bt {
0417 bt_enable_h: bt-enable-h {
0418 rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
0419 };
0420
0421 bt_host_wake_l: bt-host-wake-l {
0422 rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_down>;
0423 };
0424
0425 bt_wake_l: bt-wake-l {
0426 rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
0427 };
0428 };
0429
0430 leds {
0431 user_led_enable_h: user-led-enable-h {
0432 rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
0433 };
0434 };
0435
0436 pmic {
0437 pmic_int: pmic_int {
0438 rockchip,pins =
0439 <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
0440 };
0441 };
0442
0443 sdio-pwrseq {
0444 wifi_enable_h: wifi-enable-h {
0445 rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
0446 };
0447 };
0448
0449 usb {
0450 vcc5v0_usb30_host_en_h: vcc5v0-usb30-host-en_h {
0451 rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
0452 };
0453
0454 vcc5v0_usb_otg_en_h: vcc5v0-usb-otg-en_h {
0455 rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
0456 };
0457 };
0458 };
0459
0460 &pmu_io_domains {
0461 status = "okay";
0462 pmuio1-supply = <&vcc3v3_pmu>;
0463 pmuio2-supply = <&vcc3v3_pmu>;
0464 vccio1-supply = <&vccio_acodec>;
0465 vccio2-supply = <&vcc_1v8>;
0466 vccio3-supply = <&vccio_sd>;
0467 vccio4-supply = <&vcc_1v8>;
0468 vccio5-supply = <&vcc_3v3>;
0469 vccio6-supply = <&vcc_1v8>;
0470 vccio7-supply = <&vcc_3v3>;
0471 };
0472
0473 &sdhci {
0474 bus-width = <8>;
0475 mmc-hs200-1_8v;
0476 non-removable;
0477 vmmc-supply = <&vcc_3v3>;
0478 vqmmc-supply = <&vcc_1v8>;
0479 status = "okay";
0480 };
0481
0482 &sdmmc0 {
0483 bus-width = <4>;
0484 cap-sd-highspeed;
0485 cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
0486 disable-wp;
0487 pinctrl-names = "default";
0488 pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
0489 sd-uhs-sdr104;
0490 vmmc-supply = <&vcc3v3_sd>;
0491 vqmmc-supply = <&vccio_sd>;
0492 status = "okay";
0493 };
0494
0495 &sdmmc1 {
0496 bus-width = <4>;
0497 cap-sd-highspeed;
0498 cap-sdio-irq;
0499 keep-power-in-suspend;
0500 mmc-pwrseq = <&sdio_pwrseq>;
0501 vmmc-supply = <&vcc3v3_sys>;
0502 vqmmc-supply = <&vcca1v8_pmu>;
0503 pinctrl-names = "default";
0504 pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
0505 status = "okay";
0506 };
0507
0508 &tsadc {
0509 status = "okay";
0510 };
0511
0512 &uart0 {
0513 pinctrl-names = "default";
0514 pinctrl-0 = <&uart0_xfer>;
0515 status = "okay";
0516 };
0517
0518 &uart1 {
0519 pinctrl-names = "default";
0520 pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
0521 status = "okay";
0522 uart-has-rtscts;
0523
0524 bluetooth {
0525 compatible = "brcm,bcm43438-bt";
0526 clocks = <&rk809 1>;
0527 clock-names = "lpo";
0528 device-wakeup-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
0529 host-wakeup-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
0530 shutdown-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
0531 pinctrl-names = "default";
0532 pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
0533 vbat-supply = <&vcc3v3_sys>;
0534 vddio-supply = <&vcca1v8_pmu>;
0535 };
0536 };
0537
0538 &uart2 {
0539 status = "okay";
0540 };
0541
0542 &usb2phy0_host {
0543 phy-supply = <&vcc5v0_usb30_host>;
0544 status = "okay";
0545 };
0546
0547 &usb2phy0_otg {
0548 phy-supply = <&vcc5v0_usb_otg>;
0549 status = "okay";
0550 };
0551
0552 &usb2phy1_otg {
0553 phy-supply = <&vcc5v0_usb30_host>;
0554 status = "okay";
0555 };
0556
0557 &usb2phy0 {
0558 status = "okay";
0559 };
0560
0561 &usb2phy1 {
0562 status = "okay";
0563 };
0564
0565 &usb_host0_xhci {
0566 status = "okay";
0567 };
0568
0569 &usb_host1_xhci {
0570 status = "okay";
0571 };
0572
0573 &usb_host0_ehci {
0574 status = "okay";
0575 };
0576
0577 &usb_host0_ohci {
0578 status = "okay";
0579 };