Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 
0003 /dts-v1/;
0004 #include <dt-bindings/gpio/gpio.h>
0005 #include <dt-bindings/leds/common.h>
0006 #include <dt-bindings/pinctrl/rockchip.h>
0007 #include <dt-bindings/soc/rockchip,vop2.h>
0008 #include "rk3568.dtsi"
0009 
0010 / {
0011         model = "Radxa ROCK3 Model A";
0012         compatible = "radxa,rock3a", "rockchip,rk3568";
0013 
0014         aliases {
0015                 ethernet0 = &gmac1;
0016                 mmc0 = &sdmmc0;
0017                 mmc1 = &sdhci;
0018         };
0019 
0020         chosen: chosen {
0021                 stdout-path = "serial2:1500000n8";
0022         };
0023 
0024         hdmi-con {
0025                 compatible = "hdmi-connector";
0026                 type = "a";
0027 
0028                 port {
0029                         hdmi_con_in: endpoint {
0030                                 remote-endpoint = <&hdmi_out_con>;
0031                         };
0032                 };
0033         };
0034 
0035         leds {
0036                 compatible = "gpio-leds";
0037 
0038                 led_user: led-0 {
0039                         gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
0040                         function = LED_FUNCTION_HEARTBEAT;
0041                         color = <LED_COLOR_ID_BLUE>;
0042                         linux,default-trigger = "heartbeat";
0043                         pinctrl-names = "default";
0044                         pinctrl-0 = <&led_user_en>;
0045                 };
0046         };
0047 
0048         rk809-sound {
0049                 compatible = "simple-audio-card";
0050                 simple-audio-card,format = "i2s";
0051                 simple-audio-card,name = "Analog RK809";
0052                 simple-audio-card,mclk-fs = <256>;
0053 
0054                 simple-audio-card,cpu {
0055                         sound-dai = <&i2s1_8ch>;
0056                 };
0057 
0058                 simple-audio-card,codec {
0059                         sound-dai = <&rk809>;
0060                 };
0061         };
0062 
0063         vcc12v_dcin: vcc12v-dcin {
0064                 compatible = "regulator-fixed";
0065                 regulator-name = "vcc12v_dcin";
0066                 regulator-always-on;
0067                 regulator-boot-on;
0068         };
0069 
0070         vcc3v3_sys: vcc3v3-sys {
0071                 compatible = "regulator-fixed";
0072                 regulator-name = "vcc3v3_sys";
0073                 regulator-always-on;
0074                 regulator-boot-on;
0075                 regulator-min-microvolt = <3300000>;
0076                 regulator-max-microvolt = <3300000>;
0077                 vin-supply = <&vcc12v_dcin>;
0078         };
0079 
0080         vcc5v0_sys: vcc5v0-sys {
0081                 compatible = "regulator-fixed";
0082                 regulator-name = "vcc5v0_sys";
0083                 regulator-always-on;
0084                 regulator-boot-on;
0085                 regulator-min-microvolt = <5000000>;
0086                 regulator-max-microvolt = <5000000>;
0087                 vin-supply = <&vcc12v_dcin>;
0088         };
0089 
0090         vcc5v0_usb: vcc5v0-usb {
0091                 compatible = "regulator-fixed";
0092                 regulator-name = "vcc5v0_usb";
0093                 regulator-always-on;
0094                 regulator-boot-on;
0095                 regulator-min-microvolt = <5000000>;
0096                 regulator-max-microvolt = <5000000>;
0097                 vin-supply = <&vcc12v_dcin>;
0098         };
0099 
0100         vcc5v0_usb_host: vcc5v0-usb-host {
0101                 compatible = "regulator-fixed";
0102                 enable-active-high;
0103                 gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
0104                 pinctrl-names = "default";
0105                 pinctrl-0 = <&vcc5v0_usb_host_en>;
0106                 regulator-name = "vcc5v0_usb_host";
0107                 regulator-min-microvolt = <5000000>;
0108                 regulator-max-microvolt = <5000000>;
0109                 vin-supply = <&vcc5v0_usb>;
0110         };
0111 
0112         vcc5v0_usb_hub: vcc5v0-usb-hub-regulator {
0113                 compatible = "regulator-fixed";
0114                 enable-active-high;
0115                 gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>;
0116                 pinctrl-names = "default";
0117                 pinctrl-0 = <&vcc5v0_usb_hub_en>;
0118                 regulator-name = "vcc5v0_usb_hub";
0119                 regulator-always-on;
0120                 vin-supply = <&vcc5v0_usb>;
0121         };
0122 
0123         vcc5v0_usb_otg: vcc5v0-usb-otg-regulator {
0124                 compatible = "regulator-fixed";
0125                 enable-active-high;
0126                 gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
0127                 pinctrl-names = "default";
0128                 pinctrl-0 = <&vcc5v0_usb_otg_en>;
0129                 regulator-name = "vcc5v0_usb_otg";
0130                 regulator-min-microvolt = <5000000>;
0131                 regulator-max-microvolt = <5000000>;
0132                 vin-supply = <&vcc5v0_usb>;
0133         };
0134 };
0135 
0136 &combphy0 {
0137         status = "okay";
0138 };
0139 
0140 &combphy1 {
0141         status = "okay";
0142 };
0143 
0144 &cpu0 {
0145         cpu-supply = <&vdd_cpu>;
0146 };
0147 
0148 &cpu1 {
0149         cpu-supply = <&vdd_cpu>;
0150 };
0151 
0152 &cpu2 {
0153         cpu-supply = <&vdd_cpu>;
0154 };
0155 
0156 &cpu3 {
0157         cpu-supply = <&vdd_cpu>;
0158 };
0159 
0160 &gmac1 {
0161         assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
0162         assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>;
0163         assigned-clock-rates = <0>, <125000000>;
0164         clock_in_out = "output";
0165         phy-handle = <&rgmii_phy1>;
0166         phy-mode = "rgmii-id";
0167         pinctrl-names = "default";
0168         pinctrl-0 = <&gmac1m1_miim
0169                      &gmac1m1_tx_bus2
0170                      &gmac1m1_rx_bus2
0171                      &gmac1m1_rgmii_clk
0172                      &gmac1m1_rgmii_bus>;
0173         status = "okay";
0174 };
0175 
0176 &gpu {
0177         mali-supply = <&vdd_gpu>;
0178         status = "okay";
0179 };
0180 
0181 &hdmi {
0182         avdd-0v9-supply = <&vdda0v9_image>;
0183         avdd-1v8-supply = <&vcca1v8_image>;
0184         status = "okay";
0185 };
0186 
0187 &hdmi_in {
0188         hdmi_in_vp0: endpoint {
0189                 remote-endpoint = <&vp0_out_hdmi>;
0190         };
0191 };
0192 
0193 &hdmi_out {
0194         hdmi_out_con: endpoint {
0195                 remote-endpoint = <&hdmi_con_in>;
0196         };
0197 };
0198 
0199 &hdmi_sound {
0200         status = "okay";
0201 };
0202 
0203 &i2c0 {
0204         status = "okay";
0205 
0206         vdd_cpu: regulator@1c {
0207                 compatible = "tcs,tcs4525";
0208                 reg = <0x1c>;
0209                 fcs,suspend-voltage-selector = <1>;
0210                 regulator-name = "vdd_cpu";
0211                 regulator-always-on;
0212                 regulator-boot-on;
0213                 regulator-min-microvolt = <800000>;
0214                 regulator-max-microvolt = <1150000>;
0215                 regulator-ramp-delay = <2300>;
0216                 vin-supply = <&vcc5v0_sys>;
0217 
0218                 regulator-state-mem {
0219                         regulator-off-in-suspend;
0220                 };
0221         };
0222 
0223         rk809: pmic@20 {
0224                 compatible = "rockchip,rk809";
0225                 reg = <0x20>;
0226                 interrupt-parent = <&gpio0>;
0227                 interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
0228                 assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
0229                 assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
0230                 #clock-cells = <1>;
0231                 clock-names = "mclk";
0232                 clocks = <&cru I2S1_MCLKOUT_TX>;
0233                 pinctrl-names = "default";
0234                 pinctrl-0 = <&pmic_int>, <&i2s1m0_mclk>;
0235                 rockchip,system-power-controller;
0236                 #sound-dai-cells = <0>;
0237                 vcc1-supply = <&vcc3v3_sys>;
0238                 vcc2-supply = <&vcc3v3_sys>;
0239                 vcc3-supply = <&vcc3v3_sys>;
0240                 vcc4-supply = <&vcc3v3_sys>;
0241                 vcc5-supply = <&vcc3v3_sys>;
0242                 vcc6-supply = <&vcc3v3_sys>;
0243                 vcc7-supply = <&vcc3v3_sys>;
0244                 vcc8-supply = <&vcc3v3_sys>;
0245                 vcc9-supply = <&vcc3v3_sys>;
0246                 wakeup-source;
0247 
0248                 regulators {
0249                         vdd_logic: DCDC_REG1 {
0250                                 regulator-name = "vdd_logic";
0251                                 regulator-always-on;
0252                                 regulator-boot-on;
0253                                 regulator-init-microvolt = <900000>;
0254                                 regulator-initial-mode = <0x2>;
0255                                 regulator-min-microvolt = <500000>;
0256                                 regulator-max-microvolt = <1350000>;
0257                                 regulator-ramp-delay = <6001>;
0258 
0259                                 regulator-state-mem {
0260                                         regulator-off-in-suspend;
0261                                 };
0262                         };
0263 
0264                         vdd_gpu: DCDC_REG2 {
0265                                 regulator-name = "vdd_gpu";
0266                                 regulator-always-on;
0267                                 regulator-init-microvolt = <900000>;
0268                                 regulator-initial-mode = <0x2>;
0269                                 regulator-min-microvolt = <500000>;
0270                                 regulator-max-microvolt = <1350000>;
0271                                 regulator-ramp-delay = <6001>;
0272 
0273                                 regulator-state-mem {
0274                                         regulator-off-in-suspend;
0275                                 };
0276                         };
0277 
0278                         vcc_ddr: DCDC_REG3 {
0279                                 regulator-name = "vcc_ddr";
0280                                 regulator-always-on;
0281                                 regulator-boot-on;
0282                                 regulator-initial-mode = <0x2>;
0283 
0284                                 regulator-state-mem {
0285                                         regulator-on-in-suspend;
0286                                 };
0287                         };
0288 
0289                         vdd_npu: DCDC_REG4 {
0290                                 regulator-name = "vdd_npu";
0291                                 regulator-init-microvolt = <900000>;
0292                                 regulator-initial-mode = <0x2>;
0293                                 regulator-min-microvolt = <500000>;
0294                                 regulator-max-microvolt = <1350000>;
0295                                 regulator-ramp-delay = <6001>;
0296 
0297                                 regulator-state-mem {
0298                                         regulator-off-in-suspend;
0299                                 };
0300                         };
0301 
0302                         vcc_1v8: DCDC_REG5 {
0303                                 regulator-name = "vcc_1v8";
0304                                 regulator-always-on;
0305                                 regulator-boot-on;
0306                                 regulator-min-microvolt = <1800000>;
0307                                 regulator-max-microvolt = <1800000>;
0308 
0309                                 regulator-state-mem {
0310                                         regulator-off-in-suspend;
0311                                 };
0312                         };
0313 
0314                         vdda0v9_image: LDO_REG1 {
0315                                 regulator-name = "vdda0v9_image";
0316                                 regulator-min-microvolt = <900000>;
0317                                 regulator-max-microvolt = <900000>;
0318 
0319                                 regulator-state-mem {
0320                                         regulator-off-in-suspend;
0321                                 };
0322                         };
0323 
0324                         vdda_0v9: LDO_REG2 {
0325                                 regulator-name = "vdda_0v9";
0326                                 regulator-always-on;
0327                                 regulator-boot-on;
0328                                 regulator-min-microvolt = <900000>;
0329                                 regulator-max-microvolt = <900000>;
0330 
0331                                 regulator-state-mem {
0332                                         regulator-off-in-suspend;
0333                                 };
0334                         };
0335 
0336                         vdda0v9_pmu: LDO_REG3 {
0337                                 regulator-name = "vdda0v9_pmu";
0338                                 regulator-always-on;
0339                                 regulator-boot-on;
0340                                 regulator-min-microvolt = <900000>;
0341                                 regulator-max-microvolt = <900000>;
0342 
0343                                 regulator-state-mem {
0344                                         regulator-on-in-suspend;
0345                                         regulator-suspend-microvolt = <900000>;
0346                                 };
0347                         };
0348 
0349                         vccio_acodec: LDO_REG4 {
0350                                 regulator-name = "vccio_acodec";
0351                                 regulator-always-on;
0352                                 regulator-min-microvolt = <3300000>;
0353                                 regulator-max-microvolt = <3300000>;
0354 
0355                                 regulator-state-mem {
0356                                         regulator-off-in-suspend;
0357                                 };
0358                         };
0359 
0360                         vccio_sd: LDO_REG5 {
0361                                 regulator-name = "vccio_sd";
0362                                 regulator-min-microvolt = <1800000>;
0363                                 regulator-max-microvolt = <3300000>;
0364 
0365                                 regulator-state-mem {
0366                                         regulator-off-in-suspend;
0367                                 };
0368                         };
0369 
0370                         vcc3v3_pmu: LDO_REG6 {
0371                                 regulator-name = "vcc3v3_pmu";
0372                                 regulator-always-on;
0373                                 regulator-boot-on;
0374                                 regulator-min-microvolt = <3300000>;
0375                                 regulator-max-microvolt = <3300000>;
0376 
0377                                 regulator-state-mem {
0378                                         regulator-on-in-suspend;
0379                                         regulator-suspend-microvolt = <3300000>;
0380                                 };
0381                         };
0382 
0383                         vcca_1v8: LDO_REG7 {
0384                                 regulator-name = "vcca_1v8";
0385                                 regulator-always-on;
0386                                 regulator-boot-on;
0387                                 regulator-min-microvolt = <1800000>;
0388                                 regulator-max-microvolt = <1800000>;
0389 
0390                                 regulator-state-mem {
0391                                         regulator-off-in-suspend;
0392                                 };
0393                         };
0394 
0395                         vcca1v8_pmu: LDO_REG8 {
0396                                 regulator-name = "vcca1v8_pmu";
0397                                 regulator-always-on;
0398                                 regulator-boot-on;
0399                                 regulator-min-microvolt = <1800000>;
0400                                 regulator-max-microvolt = <1800000>;
0401 
0402                                 regulator-state-mem {
0403                                         regulator-on-in-suspend;
0404                                         regulator-suspend-microvolt = <1800000>;
0405                                 };
0406                         };
0407 
0408                         vcca1v8_image: LDO_REG9 {
0409                                 regulator-name = "vcca1v8_image";
0410                                 regulator-min-microvolt = <1800000>;
0411                                 regulator-max-microvolt = <1800000>;
0412 
0413                                 regulator-state-mem {
0414                                         regulator-off-in-suspend;
0415                                 };
0416                         };
0417 
0418                         vcc_3v3: SWITCH_REG1 {
0419                                 regulator-name = "vcc_3v3";
0420                                 regulator-always-on;
0421                                 regulator-boot-on;
0422 
0423                                 regulator-state-mem {
0424                                         regulator-off-in-suspend;
0425                                 };
0426                         };
0427 
0428                         vcc3v3_sd: SWITCH_REG2 {
0429                                 regulator-name = "vcc3v3_sd";
0430 
0431                                 regulator-state-mem {
0432                                         regulator-off-in-suspend;
0433                                 };
0434                         };
0435                 };
0436 
0437                 codec {
0438                         mic-in-differential;
0439                 };
0440         };
0441 };
0442 
0443 &i2s0_8ch {
0444         status = "okay";
0445 };
0446 
0447 &i2s1_8ch {
0448         rockchip,trcm-sync-tx-only;
0449         status = "okay";
0450 };
0451 
0452 &mdio1 {
0453         rgmii_phy1: ethernet-phy@0 {
0454                 compatible = "ethernet-phy-ieee802.3-c22";
0455                 reg = <0x0>;
0456                 pinctrl-names = "default";
0457                 pinctrl-0 = <&eth_phy_rst>;
0458                 reset-assert-us = <20000>;
0459                 reset-deassert-us = <100000>;
0460                 reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>;
0461         };
0462 };
0463 
0464 &pinctrl {
0465         ethernet {
0466                 eth_phy_rst: eth_phy_rst {
0467                         rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
0468                 };
0469         };
0470 
0471         leds {
0472                 led_user_en: led_user_en {
0473                         rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
0474                 };
0475         };
0476 
0477         pmic {
0478                 pmic_int: pmic_int {
0479                         rockchip,pins =
0480                                 <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
0481                 };
0482         };
0483 
0484         usb {
0485                 vcc5v0_usb_host_en: vcc5v0_usb_host_en {
0486                         rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
0487                 };
0488                 vcc5v0_usb_hub_en: vcc5v0_usb_hub_en {
0489                         rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
0490                 };
0491                 vcc5v0_usb_otg_en: vcc5v0_usb_otg_en {
0492                         rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
0493                 };
0494         };
0495 };
0496 
0497 &pmu_io_domains {
0498         pmuio1-supply = <&vcc3v3_pmu>;
0499         pmuio2-supply = <&vcc3v3_pmu>;
0500         vccio1-supply = <&vccio_acodec>;
0501         vccio2-supply = <&vcc_1v8>;
0502         vccio3-supply = <&vccio_sd>;
0503         vccio4-supply = <&vcc_1v8>;
0504         vccio5-supply = <&vcc_3v3>;
0505         vccio6-supply = <&vcc_1v8>;
0506         vccio7-supply = <&vcc_3v3>;
0507         status = "okay";
0508 };
0509 
0510 &saradc {
0511         vref-supply = <&vcca_1v8>;
0512         status = "okay";
0513 };
0514 
0515 &sdhci {
0516         bus-width = <8>;
0517         max-frequency = <200000000>;
0518         non-removable;
0519         pinctrl-names = "default";
0520         pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
0521         vmmc-supply = <&vcc_3v3>;
0522         vqmmc-supply = <&vcc_1v8>;
0523         status = "okay";
0524 };
0525 
0526 &sdmmc0 {
0527         bus-width = <4>;
0528         cap-sd-highspeed;
0529         cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
0530         disable-wp;
0531         pinctrl-names = "default";
0532         pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
0533         sd-uhs-sdr104;
0534         vmmc-supply = <&vcc3v3_sd>;
0535         vqmmc-supply = <&vccio_sd>;
0536         status = "okay";
0537 };
0538 
0539 &tsadc {
0540         rockchip,hw-tshut-mode = <1>;
0541         rockchip,hw-tshut-polarity = <0>;
0542         status = "okay";
0543 };
0544 
0545 &uart2 {
0546         status = "okay";
0547 };
0548 
0549 &usb_host0_ehci {
0550         status = "okay";
0551 };
0552 
0553 &usb_host0_ohci {
0554         status = "okay";
0555 };
0556 
0557 &usb_host0_xhci {
0558         extcon = <&usb2phy0>;
0559         status = "okay";
0560 };
0561 
0562 &usb_host1_ehci {
0563         status = "okay";
0564 };
0565 
0566 &usb_host1_ohci {
0567         status = "okay";
0568 };
0569 
0570 &usb_host1_xhci {
0571         status = "okay";
0572 };
0573 
0574 &usb2phy0 {
0575         status = "okay";
0576 };
0577 
0578 &usb2phy0_host {
0579         phy-supply = <&vcc5v0_usb_host>;
0580         status = "okay";
0581 };
0582 
0583 &usb2phy0_otg {
0584         phy-supply = <&vcc5v0_usb_otg>;
0585         status = "okay";
0586 };
0587 
0588 &usb2phy1 {
0589         status = "okay";
0590 };
0591 
0592 &usb2phy1_host {
0593         phy-supply = <&vcc5v0_usb_host>;
0594         status = "okay";
0595 };
0596 
0597 &usb2phy1_otg {
0598         phy-supply = <&vcc5v0_usb_host>;
0599         status = "okay";
0600 };
0601 
0602 &vop {
0603         assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
0604         assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
0605         status = "okay";
0606 };
0607 
0608 &vop_mmu {
0609         status = "okay";
0610 };
0611 
0612 &vp0 {
0613         vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
0614                 reg = <ROCKCHIP_VOP2_EP_HDMI0>;
0615                 remote-endpoint = <&hdmi_in_vp0>;
0616         };
0617 };