Back to home page

OSCL-LXR

 
 

    


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