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 = "Pine64 RK3566 SoQuartz SOM";
0011 compatible = "pine64,soquartz", "rockchip,rk3566";
0012
0013 aliases {
0014 ethernet0 = &gmac1;
0015 mmc0 = &sdmmc0;
0016 mmc1 = &sdhci;
0017 mmc2 = &sdmmc1;
0018 };
0019
0020 chosen: chosen {
0021 stdout-path = "serial2:1500000n8";
0022 };
0023
0024 gmac1_clkin: external-gmac1-clock {
0025 compatible = "fixed-clock";
0026 clock-frequency = <125000000>;
0027 clock-output-names = "gmac1_clkin";
0028 #clock-cells = <0>;
0029 };
0030
0031 leds {
0032 compatible = "gpio-leds";
0033
0034 led_diy: led-diy {
0035 label = "diy-led";
0036 default-state = "on";
0037 gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_LOW>;
0038 linux,default-trigger = "heartbeat";
0039 pinctrl-names = "default";
0040 pinctrl-0 = <&diy_led_enable_h>;
0041 retain-state-suspended;
0042 status = "disabled";
0043 };
0044
0045 led_work: led-work {
0046 label = "work-led";
0047 default-state = "off";
0048 gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_LOW>;
0049 pinctrl-names = "default";
0050 pinctrl-0 = <&work_led_enable_h>;
0051 retain-state-suspended;
0052 status = "disabled";
0053 };
0054 };
0055
0056 sdio_pwrseq: sdio-pwrseq {
0057 status = "okay";
0058 compatible = "mmc-pwrseq-simple";
0059 clocks = <&rk809 1>;
0060 clock-names = "ext_clock";
0061 pinctrl-names = "default";
0062 pinctrl-0 = <&wifi_enable_h>;
0063 reset-gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_LOW>;
0064 };
0065
0066 vbus: vbus-regulator {
0067 compatible = "regulator-fixed";
0068 regulator-name = "vbus";
0069 regulator-always-on;
0070 regulator-boot-on;
0071 regulator-min-microvolt = <5000000>;
0072 regulator-max-microvolt = <5000000>;
0073 };
0074
0075 /* sourced from vbus, vbus is provided by the carrier board */
0076 vcc5v0_sys: vcc5v0-sys-regulator {
0077 compatible = "regulator-fixed";
0078 regulator-name = "vcc5v0_sys";
0079 regulator-always-on;
0080 regulator-boot-on;
0081 regulator-min-microvolt = <5000000>;
0082 regulator-max-microvolt = <5000000>;
0083 vin-supply = <&vbus>;
0084 };
0085
0086 vcc3v3_sys: vcc3v3-sys-regulator {
0087 compatible = "regulator-fixed";
0088 regulator-name = "vcc3v3_sys";
0089 regulator-always-on;
0090 regulator-boot-on;
0091 regulator-min-microvolt = <3300000>;
0092 regulator-max-microvolt = <3300000>;
0093 vin-supply = <&vcc5v0_sys>;
0094 };
0095
0096 sdmmc_pwr: sdmmc-pwr-regulator {
0097 compatible = "regulator-fixed";
0098 enable-active-high;
0099 gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
0100 pinctrl-names = "default";
0101 pinctrl-0 = <&sdmmc_pwr_h>;
0102 regulator-name = "sdmmc_pwr";
0103 status = "disabled";
0104 };
0105 };
0106
0107 &cpu0 {
0108 cpu-supply = <&vdd_cpu>;
0109 };
0110
0111 &cpu1 {
0112 cpu-supply = <&vdd_cpu>;
0113 };
0114
0115 &cpu2 {
0116 cpu-supply = <&vdd_cpu>;
0117 };
0118
0119 &cpu3 {
0120 cpu-supply = <&vdd_cpu>;
0121 };
0122
0123 &gmac1 {
0124 assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>;
0125 assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>, <&gmac1_clkin>;
0126 clock_in_out = "input";
0127 phy-supply = <&vcc_3v3>;
0128 phy-mode = "rgmii";
0129 pinctrl-names = "default";
0130 pinctrl-0 = <&gmac1m0_miim
0131 &gmac1m0_tx_bus2
0132 &gmac1m0_rx_bus2
0133 &gmac1m0_rgmii_clk
0134 &gmac1m0_clkinout
0135 &gmac1m0_rgmii_bus>;
0136 snps,reset-gpio = <&gpio0 RK_PC3 GPIO_ACTIVE_LOW>;
0137 snps,reset-active-low;
0138 /* Reset time is 20ms, 100ms for rtl8211f, also works well here */
0139 snps,reset-delays-us = <0 20000 100000>;
0140 tx_delay = <0x30>;
0141 rx_delay = <0x10>;
0142 phy-handle = <&rgmii_phy1>;
0143 status = "disabled";
0144 };
0145
0146 &i2c0 {
0147 status = "okay";
0148
0149 vdd_cpu: regulator@1c {
0150 compatible = "tcs,tcs4525";
0151 reg = <0x1c>;
0152 fcs,suspend-voltage-selector = <1>;
0153 regulator-name = "vdd_cpu";
0154 regulator-min-microvolt = <800000>;
0155 regulator-max-microvolt = <1150000>;
0156 regulator-ramp-delay = <2300>;
0157 regulator-always-on;
0158 regulator-boot-on;
0159 vin-supply = <&vcc5v0_sys>;
0160
0161 regulator-state-mem {
0162 regulator-off-in-suspend;
0163 };
0164 };
0165
0166 rk809: pmic@20 {
0167 compatible = "rockchip,rk809";
0168 reg = <0x20>;
0169 interrupt-parent = <&gpio0>;
0170 interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
0171 #clock-cells = <1>;
0172 clock-output-names = "rk808-clkout1", "rk808-clkout2";
0173 pinctrl-names = "default";
0174 pinctrl-0 = <&pmic_int_l>;
0175 rockchip,system-power-controller;
0176 wakeup-source;
0177
0178 vcc1-supply = <&vcc3v3_sys>;
0179 vcc2-supply = <&vcc3v3_sys>;
0180 vcc3-supply = <&vcc3v3_sys>;
0181 vcc4-supply = <&vcc3v3_sys>;
0182 vcc5-supply = <&vcc3v3_sys>;
0183 vcc6-supply = <&vcc3v3_sys>;
0184 vcc7-supply = <&vcc3v3_sys>;
0185 vcc8-supply = <&vcc3v3_sys>;
0186 vcc9-supply = <&vcc3v3_sys>;
0187
0188 regulators {
0189 vdd_logic: DCDC_REG1 {
0190 regulator-name = "vdd_logic";
0191 regulator-always-on;
0192 regulator-boot-on;
0193 regulator-min-microvolt = <500000>;
0194 regulator-max-microvolt = <1350000>;
0195 regulator-init-microvolt = <900000>;
0196 regulator-ramp-delay = <6001>;
0197 regulator-initial-mode = <0x2>;
0198 regulator-state-mem {
0199 regulator-on-in-suspend;
0200 regulator-suspend-microvolt = <900000>;
0201 };
0202 };
0203
0204 vdd_gpu: DCDC_REG2 {
0205 regulator-name = "vdd_gpu";
0206 regulator-always-on;
0207 regulator-boot-on;
0208 regulator-min-microvolt = <500000>;
0209 regulator-max-microvolt = <1350000>;
0210 regulator-init-microvolt = <900000>;
0211 regulator-ramp-delay = <6001>;
0212 regulator-initial-mode = <0x2>;
0213 regulator-state-mem {
0214 regulator-off-in-suspend;
0215 };
0216 };
0217
0218 vcc_ddr: DCDC_REG3 {
0219 regulator-always-on;
0220 regulator-boot-on;
0221 regulator-initial-mode = <0x2>;
0222 regulator-name = "vcc_ddr";
0223 regulator-state-mem {
0224 regulator-on-in-suspend;
0225 };
0226 };
0227
0228 vdd_npu: DCDC_REG4 {
0229 regulator-always-on;
0230 regulator-boot-on;
0231 regulator-min-microvolt = <500000>;
0232 regulator-max-microvolt = <1350000>;
0233 regulator-init-microvolt = <900000>;
0234 regulator-initial-mode = <0x2>;
0235 regulator-name = "vdd_npu";
0236 regulator-state-mem {
0237 regulator-off-in-suspend;
0238 };
0239 };
0240
0241 vcc_1v8: DCDC_REG5 {
0242 regulator-name = "vcc_1v8";
0243 regulator-always-on;
0244 regulator-boot-on;
0245 regulator-min-microvolt = <1800000>;
0246 regulator-max-microvolt = <1800000>;
0247 regulator-state-mem {
0248 regulator-on-in-suspend;
0249 regulator-suspend-microvolt = <1800000>;
0250 };
0251 };
0252
0253 vdda0v9_image: LDO_REG1 {
0254 regulator-always-on;
0255 regulator-boot-on;
0256 regulator-min-microvolt = <900000>;
0257 regulator-max-microvolt = <900000>;
0258 regulator-name = "vdda0v9_image";
0259 regulator-state-mem {
0260 regulator-on-in-suspend;
0261 regulator-suspend-microvolt = <900000>;
0262 };
0263 };
0264
0265 vdda_0v9: LDO_REG2 {
0266 regulator-always-on;
0267 regulator-boot-on;
0268 regulator-min-microvolt = <900000>;
0269 regulator-max-microvolt = <900000>;
0270 regulator-name = "vdda_0v9";
0271 regulator-state-mem {
0272 regulator-off-in-suspend;
0273 };
0274 };
0275
0276 vdda0v9_pmu: LDO_REG3 {
0277 regulator-always-on;
0278 regulator-boot-on;
0279 regulator-min-microvolt = <900000>;
0280 regulator-max-microvolt = <900000>;
0281 regulator-name = "vdda0v9_pmu";
0282 regulator-state-mem {
0283 regulator-on-in-suspend;
0284 regulator-suspend-microvolt = <900000>;
0285 };
0286 };
0287
0288 vccio_acodec: LDO_REG4 {
0289 regulator-always-on;
0290 regulator-boot-on;
0291 regulator-min-microvolt = <3300000>;
0292 regulator-max-microvolt = <3300000>;
0293 regulator-name = "vccio_acodec";
0294 regulator-state-mem {
0295 regulator-off-in-suspend;
0296 };
0297 };
0298
0299 vccio_sd: LDO_REG5 {
0300 regulator-always-on;
0301 regulator-boot-on;
0302 regulator-min-microvolt = <1800000>;
0303 regulator-max-microvolt = <3300000>;
0304 regulator-name = "vccio_sd";
0305 regulator-state-mem {
0306 regulator-off-in-suspend;
0307 };
0308 };
0309
0310 vcc3v3_pmu: LDO_REG6 {
0311 regulator-always-on;
0312 regulator-boot-on;
0313 regulator-min-microvolt = <3300000>;
0314 regulator-max-microvolt = <3300000>;
0315 regulator-name = "vcc3v3_pmu";
0316 regulator-state-mem {
0317 regulator-on-in-suspend;
0318 regulator-suspend-microvolt = <3300000>;
0319 };
0320 };
0321
0322 vcca_1v8: LDO_REG7 {
0323 regulator-always-on;
0324 regulator-boot-on;
0325 regulator-min-microvolt = <1800000>;
0326 regulator-max-microvolt = <1800000>;
0327 regulator-name = "vcca_1v8";
0328 regulator-state-mem {
0329 regulator-off-in-suspend;
0330 };
0331 };
0332
0333 vcca1v8_pmu: LDO_REG8 {
0334 regulator-always-on;
0335 regulator-boot-on;
0336 regulator-min-microvolt = <1800000>;
0337 regulator-max-microvolt = <1800000>;
0338 regulator-name = "vcca1v8_pmu";
0339 regulator-state-mem {
0340 regulator-off-in-suspend;
0341 };
0342 };
0343
0344 vcca1v8_image: LDO_REG9 {
0345 regulator-always-on;
0346 regulator-boot-on;
0347 regulator-min-microvolt = <1800000>;
0348 regulator-max-microvolt = <1800000>;
0349 regulator-name = "vcca1v8_image";
0350 regulator-state-mem {
0351 regulator-off-in-suspend;
0352 };
0353 };
0354
0355 vcc_3v3: SWITCH_REG1 {
0356 regulator-name = "vcc_3v3";
0357 regulator-state-mem {
0358 regulator-off-in-suspend;
0359 };
0360 };
0361
0362 vcc3v3_sd: SWITCH_REG2 {
0363 regulator-name = "vcc3v3_sd";
0364 status = "disabled";
0365 regulator-state-mem {
0366 regulator-on-in-suspend;
0367 };
0368 };
0369
0370 };
0371 };
0372 };
0373
0374 /*
0375 * i2c1 is exposed on CM1 / Module1A
0376 * pin 80 - i2c1_scl_m0, pullup to vcc3v3_pmu
0377 * pin 82 - i2c1_sda_m0, pullup to vcc3v3_pmu
0378 */
0379 &i2c1 {
0380 status = "disabled";
0381 };
0382
0383 /*
0384 * i2c2 is exposed on CM1 / Module1A
0385 * pin 56 - i2c2_scl_m1, pullup to vcc_3v3, shared with i2s1_8ch
0386 * pin 58 - i2c2_sda_m1, pullup to vcc_3v3
0387 */
0388 &i2c2 {
0389 pinctrl-names = "default";
0390 pinctrl-0 = <&i2c2m1_xfer>;
0391 status = "disabled";
0392 };
0393
0394 /*
0395 * i2c3 is exposed on CM1 / Module1A
0396 * pin 35 - i2c3_scl_m0, pullup to vcc_3v3
0397 * pin 36 - i2c3_sda_m0, pullup to vcc_3v3
0398 */
0399 &i2c3 {
0400 status = "disabled";
0401 };
0402
0403 /*
0404 * i2c4 is exposed on CM2 / Module1B
0405 * pin 45 - i2c4_scl_m1
0406 * pin 47 - i2c4_sda_m1
0407 */
0408 &i2c4 {
0409 pinctrl-names = "default";
0410 pinctrl-0 = <&i2c4m1_xfer>;
0411 status = "disabled";
0412 };
0413
0414 /*
0415 * i2s1_8ch is exposed on CM1 / Module1A
0416 * pin 24 - i2s1_sdi1_m1
0417 * pin 25 - i2s1_sdo0_m1
0418 * pin 26 - i2s1_lrck_tx_m1
0419 * pin 27 - i2s1_sdi0_m1
0420 * pin 29 - i2s1_sdi3_m1
0421 * pin 30 - i2s1_sdi2_m1
0422 * pin 40 - i2s1_sdo1_m1, shared with spi3
0423 * pin 41 - i2s1_sdo2_m1
0424 * pin 49 - i2s1_sclk_tx_m1
0425 * pin 50 - i2s1_mclk_m1
0426 * pin 56 - i2s1_sdo3_m1, shared with i2c2
0427 */
0428 &i2s1_8ch {
0429 pinctrl-names = "default";
0430 pinctrl-0 = <&i2s1m1_sclktx &i2s1m1_sclkrx
0431 &i2s1m1_lrcktx &i2s1m1_lrckrx
0432 &i2s1m1_sdi0 &i2s1m1_sdi1
0433 &i2s1m1_sdi2 &i2s1m1_sdi3
0434 &i2s1m1_sdo0 &i2s1m1_sdo1
0435 &i2s1m1_sdo2 &i2s1m1_sdo3>;
0436 status = "disabled";
0437 };
0438
0439 &mdio1 {
0440 rgmii_phy1: ethernet-phy@0 {
0441 compatible = "ethernet-phy-ieee802.3-c22";
0442 reg = <0>;
0443 status = "disabled";
0444 };
0445 };
0446
0447 &pinctrl {
0448 bt {
0449 bt_enable_h: bt-enable-h {
0450 rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
0451 };
0452
0453 bt_host_wake_l: bt-host-wake-l {
0454 rockchip,pins = <2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_down>;
0455 };
0456
0457 bt_wake_l: bt-wake-l {
0458 rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
0459 };
0460 };
0461
0462 leds {
0463 work_led_enable_h: work-led-enable-h {
0464 rockchip,pins = <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
0465 };
0466
0467 diy_led_enable_h: diy-led-enable-h {
0468 rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
0469 };
0470 };
0471
0472 pmic {
0473 pmic_int_l: pmic-int-l {
0474 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
0475 };
0476 };
0477
0478 sdio-pwrseq {
0479 wifi_enable_h: wifi-enable-h {
0480 rockchip,pins = <2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
0481 };
0482 };
0483
0484 sdmmc-pwr {
0485 sdmmc_pwr_h: sdmmc-pwr-h {
0486 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
0487 };
0488 };
0489 };
0490
0491 &pmu_io_domains {
0492 pmuio1-supply = <&vcc3v3_pmu>;
0493 pmuio2-supply = <&vcc3v3_pmu>;
0494 vccio1-supply = <&vcc_3v3>;
0495 vccio2-supply = <&vcc_1v8>;
0496 vccio3-supply = <&vccio_sd>;
0497 vccio4-supply = <&vcc_1v8>;
0498 vccio5-supply = <&vcc_3v3>;
0499 vccio6-supply = <&vcc_3v3>;
0500 vccio7-supply = <&vcc_3v3>;
0501 status = "okay";
0502 };
0503
0504 /*
0505 * saradc is exposed on CM1 / Module1A
0506 * pin 94 - saradc_vin3
0507 * pin 96 - saradc_vin2
0508 */
0509 &saradc {
0510 vref-supply = <&vcca_1v8>;
0511 status = "disabled";
0512 };
0513
0514 &sdhci {
0515 bus-width = <8>;
0516 mmc-hs200-1_8v;
0517 non-removable;
0518 vmmc-supply = <&vcc_3v3>;
0519 vqmmc-supply = <&vcc_1v8>;
0520 status = "okay";
0521 };
0522
0523 &sdmmc0 {
0524 broken-cd;
0525 bus-width = <4>;
0526 cap-sd-highspeed;
0527 disable-wp;
0528 pinctrl-names = "default";
0529 pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
0530 vqmmc-supply = <&vccio_sd>;
0531 status = "disabled";
0532 };
0533
0534 &sdmmc1 {
0535 bus-width = <4>;
0536 cap-sd-highspeed;
0537 cap-sdio-irq;
0538 keep-power-in-suspend;
0539 mmc-pwrseq = <&sdio_pwrseq>;
0540 non-removable;
0541 pinctrl-names = "default";
0542 pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
0543 sd-uhs-sdr104;
0544 vmmc-supply = <&vcc3v3_sys>;
0545 vqmmc-supply = <&vcc_1v8>;
0546 status = "okay";
0547 };
0548
0549 /*
0550 * spi3 is exposed on CM1 / Module1A
0551 * pin 37 - spi3_cs1_m0
0552 * pin 38 - spi3_clk_m0
0553 * pin 39 - spi3_cs0_m0
0554 * pin 40 - spi3_miso_m0, shared with i2s1_8ch
0555 * pin 44 - spi3_mosi_m0
0556 */
0557 &spi3 {
0558 status = "disabled";
0559 };
0560
0561 &tsadc {
0562 status = "okay";
0563 };
0564
0565 &uart1 {
0566 pinctrl-names = "default";
0567 pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn &uart1m0_rtsn>;
0568 uart-has-rtscts;
0569 status = "okay";
0570
0571 bluetooth {
0572 compatible = "brcm,bcm43438-bt";
0573 clocks = <&rk809 1>;
0574 clock-names = "lpo";
0575 device-wakeup-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
0576 host-wakeup-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
0577 shutdown-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
0578 pinctrl-names = "default";
0579 pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
0580 vbat-supply = <&vcc3v3_sys>;
0581 vddio-supply = <&vcca1v8_pmu>;
0582 };
0583 };
0584
0585 /*
0586 * uart2 is exposed on CM1 / Module1A
0587 * pin 51 - uart2_rx_m0
0588 * pin 55 - uart2_tx_m0
0589 */
0590 &uart2 {
0591 status = "disabled";
0592 };
0593
0594 /*
0595 * uart7 is exposed on CM1 / Module1A
0596 * pin 46 - uart7_tx_m2
0597 * pin 47 - uart7_rx_m2
0598 */
0599 &uart7 {
0600 pinctrl-names = "default";
0601 pinctrl-0 = <&uart7m2_xfer>;
0602 status = "disabled";
0603 };
0604
0605 /* dwc3_otg is the only usb port available */
0606 &usb2phy0 {
0607 status = "disabled";
0608 };
0609
0610 &usb2phy0_otg {
0611 status = "disabled";
0612 };
0613
0614 &usb_host0_xhci {
0615 status = "disabled";
0616 };