Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd
0004  * Copyright (c) 2019 Vamrs Limited
0005  * Copyright (c) 2019 Amarula Solutions(India)
0006  */
0007 
0008 #include <dt-bindings/gpio/gpio.h>
0009 #include <dt-bindings/pinctrl/rockchip.h>
0010 #include <dt-bindings/pwm/pwm.h>
0011 
0012 / {
0013         compatible = "vamrs,rk3399pro-vmarc-som", "rockchip,rk3399pro";
0014 
0015         aliases {
0016                 mmc0 = &sdmmc;
0017                 mmc1 = &sdhci;
0018         };
0019 
0020         vcc3v3_pcie: vcc-pcie-regulator {
0021                 compatible = "regulator-fixed";
0022                 enable-active-high;
0023                 gpio = <&gpio4 RK_PD4 GPIO_ACTIVE_HIGH>;
0024                 pinctrl-names = "default";
0025                 pinctrl-0 = <&pcie_pwr>;
0026                 regulator-name = "vcc3v3_pcie";
0027                 regulator-always-on;
0028                 regulator-boot-on;
0029                 vin-supply = <&vcc5v0_sys>;
0030         };
0031 };
0032 
0033 &cpu_l0 {
0034         cpu-supply = <&vdd_cpu_l>;
0035 };
0036 
0037 &cpu_l1 {
0038         cpu-supply = <&vdd_cpu_l>;
0039 };
0040 
0041 &cpu_l2 {
0042         cpu-supply = <&vdd_cpu_l>;
0043 };
0044 
0045 &cpu_l3 {
0046         cpu-supply = <&vdd_cpu_l>;
0047 };
0048 
0049 &emmc_phy {
0050         status = "okay";
0051 };
0052 
0053 &gmac {
0054         assigned-clocks = <&cru SCLK_RMII_SRC>;
0055         phy-supply = <&vcc_lan>;
0056         snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
0057 };
0058 
0059 &hdmi {
0060         ddc-i2c-bus = <&i2c3>;
0061         pinctrl-names = "default";
0062         pinctrl-0 = <&hdmi_cec>;
0063 };
0064 
0065 &i2c0 {
0066         clock-frequency = <400000>;
0067         i2c-scl-falling-time-ns = <30>;
0068         i2c-scl-rising-time-ns = <180>;
0069         status = "okay";
0070 
0071         rk809: pmic@20 {
0072                 compatible = "rockchip,rk809";
0073                 reg = <0x20>;
0074                 interrupt-parent = <&gpio1>;
0075                 interrupts = <RK_PC2 IRQ_TYPE_LEVEL_LOW>;
0076                 #clock-cells = <1>;
0077                 clock-output-names = "rk808-clkout1", "rk808-clkout2";
0078                 pinctrl-names = "default";
0079                 pinctrl-0 = <&pmic_int_l>;
0080                 rockchip,system-power-controller;
0081                 wakeup-source;
0082 
0083                 vcc1-supply = <&vcc5v0_sys>;
0084                 vcc2-supply = <&vcc5v0_sys>;
0085                 vcc3-supply = <&vcc5v0_sys>;
0086                 vcc4-supply = <&vcc5v0_sys>;
0087                 vcc5-supply = <&vcc_buck5>;
0088                 vcc6-supply = <&vcc_buck5>;
0089                 vcc7-supply = <&vcc5v0_sys>;
0090                 vcc8-supply = <&vcc3v3_sys>;
0091                 vcc9-supply = <&vcc5v0_sys>;
0092 
0093                 regulators {
0094                         vdd_log: DCDC_REG1 {
0095                                 regulator-name = "vdd_log";
0096                                 regulator-always-on;
0097                                 regulator-boot-on;
0098                                 regulator-min-microvolt = <750000>;
0099                                 regulator-max-microvolt = <1350000>;
0100                                 regulator-initial-mode = <0x2>;
0101                                 regulator-state-mem {
0102                                         regulator-off-in-suspend;
0103                                         regulator-suspend-microvolt = <900000>;
0104                                 };
0105                         };
0106 
0107                         vdd_cpu_l: DCDC_REG2 {
0108                                 regulator-name = "vdd_cpu_l";
0109                                 regulator-always-on;
0110                                 regulator-boot-on;
0111                                 regulator-min-microvolt = <750000>;
0112                                 regulator-max-microvolt = <1350000>;
0113                                 regulator-ramp-delay = <6001>;
0114                                 regulator-initial-mode = <0x2>;
0115                                 regulator-state-mem {
0116                                         regulator-off-in-suspend;
0117                                 };
0118                         };
0119 
0120                         vcc_ddr: DCDC_REG3 {
0121                                 regulator-name = "vcc_ddr";
0122                                 regulator-always-on;
0123                                 regulator-boot-on;
0124                                 regulator-initial-mode = <0x2>;
0125                                 regulator-state-mem {
0126                                         regulator-on-in-suspend;
0127                                 };
0128                         };
0129 
0130                         vcc3v3_sys: DCDC_REG4 {
0131                                 regulator-name = "vcc3v3_sys";
0132                                 regulator-always-on;
0133                                 regulator-boot-on;
0134                                 regulator-min-microvolt = <3300000>;
0135                                 regulator-max-microvolt = <3300000>;
0136                                 regulator-initial-mode = <0x2>;
0137                                 regulator-state-mem {
0138                                         regulator-on-in-suspend;
0139                                         regulator-suspend-microvolt = <3300000>;
0140                                 };
0141                         };
0142 
0143                         vcc_buck5: DCDC_REG5 {
0144                                 regulator-name = "vcc_buck5";
0145                                 regulator-always-on;
0146                                 regulator-boot-on;
0147                                 regulator-min-microvolt = <2200000>;
0148                                 regulator-max-microvolt = <2200000>;
0149                                 regulator-state-mem {
0150                                         regulator-on-in-suspend;
0151                                         regulator-suspend-microvolt = <2200000>;
0152                                 };
0153                         };
0154 
0155                         vcca_0v9: LDO_REG1 {
0156                                 regulator-name = "vcca_0v9";
0157                                 regulator-always-on;
0158                                 regulator-boot-on;
0159                                 regulator-min-microvolt = <900000>;
0160                                 regulator-max-microvolt = <900000>;
0161                                 regulator-state-mem {
0162                                         regulator-on-in-suspend;
0163                                         regulator-suspend-microvolt = <900000>;
0164                                 };
0165                         };
0166 
0167                         vcc_1v8: LDO_REG2 {
0168                                 regulator-name = "vcc_1v8";
0169                                 regulator-always-on;
0170                                 regulator-boot-on;
0171                                 regulator-min-microvolt = <1800000>;
0172                                 regulator-max-microvolt = <1800000>;
0173                                 regulator-state-mem {
0174                                         regulator-on-in-suspend;
0175                                         regulator-suspend-microvolt = <1800000>;
0176                                 };
0177                         };
0178 
0179                         vcc_0v9: LDO_REG3 {
0180                                 regulator-name = "vcc_0v9";
0181                                 regulator-always-on;
0182                                 regulator-boot-on;
0183                                 regulator-min-microvolt = <900000>;
0184                                 regulator-max-microvolt = <900000>;
0185                                 regulator-state-mem {
0186                                         regulator-on-in-suspend;
0187                                         regulator-suspend-microvolt = <900000>;
0188                                 };
0189                         };
0190 
0191                         vcca_1v8: LDO_REG4 {
0192                                 regulator-name = "vcca_1v8";
0193                                 regulator-always-on;
0194                                 regulator-boot-on;
0195                                 regulator-min-microvolt = <1850000>;
0196                                 regulator-max-microvolt = <1850000>;
0197                                 regulator-state-mem {
0198                                         regulator-on-in-suspend;
0199                                         regulator-suspend-microvolt = <1850000>;
0200                                 };
0201                         };
0202 
0203                         /*
0204                          * As per BSP, but schematic not showing any regulator
0205                          * pin for LD05.
0206                          */
0207                         vdd1v5_dvp: LDO_REG5 {
0208                                 regulator-name = "vdd1v5_dvp";
0209                                 regulator-always-on;
0210                                 regulator-boot-on;
0211                                 regulator-min-microvolt = <1500000>;
0212                                 regulator-max-microvolt = <1500000>;
0213                                 regulator-state-mem {
0214                                         regulator-off-in-suspend;
0215                                 };
0216                         };
0217 
0218                         vcc_1v5: LDO_REG6 {
0219                                 regulator-name = "vcc_1v5";
0220                                 regulator-always-on;
0221                                 regulator-boot-on;
0222                                 regulator-min-microvolt = <1500000>;
0223                                 regulator-max-microvolt = <1500000>;
0224                                 regulator-state-mem {
0225                                         regulator-off-in-suspend;
0226                                 };
0227                         };
0228 
0229                         vccio_3v0: LDO_REG7 {
0230                                 regulator-name = "vccio_3v0";
0231                                 regulator-always-on;
0232                                 regulator-boot-on;
0233                                 regulator-min-microvolt = <3000000>;
0234                                 regulator-max-microvolt = <3000000>;
0235                                 regulator-state-mem {
0236                                         regulator-off-in-suspend;
0237                                 };
0238                         };
0239 
0240                         vccio_sd: LDO_REG8 {
0241                                 regulator-name = "vccio_sd";
0242                                 regulator-always-on;
0243                                 regulator-boot-on;
0244                                 regulator-min-microvolt = <1800000>;
0245                                 regulator-max-microvolt = <3300000>;
0246                                 regulator-state-mem {
0247                                         regulator-off-in-suspend;
0248                                 };
0249                         };
0250 
0251                         /*
0252                          * As per BSP, but schematic not showing any regulator
0253                          * pin for LD09.
0254                          */
0255                         vcc_sd: LDO_REG9 {
0256                                 regulator-name = "vcc_sd";
0257                                 regulator-always-on;
0258                                 regulator-boot-on;
0259                                 regulator-min-microvolt = <3300000>;
0260                                 regulator-max-microvolt = <3300000>;
0261                                 regulator-state-mem {
0262                                         regulator-off-in-suspend;
0263                                 };
0264                         };
0265 
0266                         vcc5v0_usb2: SWITCH_REG1 {
0267                                 regulator-name = "vcc5v0_usb2";
0268                                 regulator-min-microvolt = <5000000>;
0269                                 regulator-max-microvolt = <5000000>;
0270                                 regulator-state-mem {
0271                                         regulator-on-in-suspend;
0272                                         regulator-suspend-microvolt = <5000000>;
0273                                 };
0274                         };
0275 
0276                         vccio_3v3: vcc_lan: SWITCH_REG2 {
0277                                 regulator-name = "vccio_3v3";
0278                                 regulator-always-on;
0279                                 regulator-boot-on;
0280                                 regulator-min-microvolt = <3300000>;
0281                                 regulator-max-microvolt = <3300000>;
0282                                 regulator-state-mem {
0283                                         regulator-off-in-suspend;
0284                                 };
0285                         };
0286                 };
0287         };
0288 };
0289 
0290 &i2c1 {
0291         i2c-scl-falling-time-ns = <30>;
0292         i2c-scl-rising-time-ns = <140>;
0293         status = "okay";
0294 };
0295 
0296 &i2c2 {
0297         clock-frequency = <400000>;
0298         status = "okay";
0299 
0300         hym8563: hym8563@51 {
0301                 compatible = "haoyu,hym8563";
0302                 reg = <0x51>;
0303                 #clock-cells = <0>;
0304                 clock-frequency = <32768>;
0305                 clock-output-names = "hym8563";
0306                 pinctrl-names = "default";
0307                 pinctrl-0 = <&hym8563_int>;
0308                 interrupt-parent = <&gpio4>;
0309                 interrupts = <RK_PD6 IRQ_TYPE_LEVEL_LOW>;
0310         };
0311 };
0312 
0313 &i2c3 {
0314         i2c-scl-rising-time-ns = <450>;
0315         i2c-scl-falling-time-ns = <15>;
0316         status = "okay";
0317 };
0318 
0319 &io_domains {
0320         status = "okay";
0321         bt656-supply = <&vcca_1v8>;
0322         gpio1830-supply = <&vccio_3v0>;
0323         sdmmc-supply = <&vccio_sd>;
0324 };
0325 
0326 &pcie_phy {
0327         status = "okay";
0328 };
0329 
0330 &pcie0 {
0331         ep-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
0332         num-lanes = <4>;
0333         pinctrl-0 = <&pcie_clkreqnb_cpm>;
0334         pinctrl-names = "default";
0335         vpcie0v9-supply = <&vcca_0v9>;  /* VCC_0V9_S0 */
0336         vpcie1v8-supply = <&vcca_1v8>;  /* VCC_1V8_S0 */
0337         vpcie3v3-supply = <&vcc3v3_pcie>;
0338         status = "okay";
0339 };
0340 
0341 &pinctrl {
0342         hym8563 {
0343                 hym8563_int: hym8563-int {
0344                         rockchip,pins = <4 RK_PD6 0 &pcfg_pull_up>;
0345                 };
0346         };
0347 
0348         pcie {
0349                 pcie_pwr: pcie-pwr {
0350                         rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>;
0351                 };
0352         };
0353 
0354         pmic {
0355                 pmic_int_l: pmic-int-l {
0356                         rockchip,pins = <1 RK_PC2 0 &pcfg_pull_up>;
0357                 };
0358         };
0359 
0360         sdio-pwrseq {
0361                 wifi_enable_h: wifi-enable-h {
0362                         rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
0363                 };
0364         };
0365 
0366         vbus_host {
0367                 usb1_en_oc: usb1-en-oc {
0368                         rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>;
0369                 };
0370         };
0371 
0372         vbus_typec {
0373                 usb0_en_oc: usb0-en-oc {
0374                         rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>;
0375                 };
0376         };
0377 };
0378 
0379 &pmu_io_domains {
0380         status = "okay";
0381         pmu1830-supply = <&vcc_1v8>;
0382 };
0383 
0384 &sdio_pwrseq {
0385         /*
0386          * On the module itself this is one of these (depending
0387          * on the actual card populated):
0388          * - SDIO_RESET_L_WL_REG_ON
0389          * - PDN (power down when low)
0390          */
0391         reset-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
0392 };
0393 
0394 &sdhci {
0395         bus-width = <8>;
0396         mmc-hs400-1_8v;
0397         mmc-hs400-enhanced-strobe;
0398         non-removable;
0399         status = "okay";
0400 };
0401 
0402 &sdmmc {
0403         cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
0404         max-frequency = <150000000>;
0405 };
0406 
0407 &tcphy0 {
0408         status = "okay";
0409 };
0410 
0411 &tsadc {
0412         rockchip,hw-tshut-mode = <1>;
0413         rockchip,hw-tshut-polarity = <1>;
0414         status = "okay";
0415 };
0416 
0417 &u2phy0 {
0418         status = "okay";
0419 
0420         u2phy0_otg: otg-port {
0421                 phy-supply = <&vbus_typec>;
0422                 status = "okay";
0423         };
0424 
0425         u2phy0_host: host-port {
0426                 phy-supply = <&vbus_host>;
0427                 status = "okay";
0428         };
0429 };
0430 
0431 
0432 &u2phy1 {
0433         status = "okay";
0434 
0435         u2phy1_host: host-port {
0436                 phy-supply = <&vbus_host>;
0437                 status = "okay";
0438         };
0439 };
0440 
0441 &usb_host0_ehci {
0442         status = "okay";
0443 };
0444 
0445 &usb_host0_ohci {
0446         status = "okay";
0447 };
0448 
0449 &usb_host1_ehci {
0450         status = "okay";
0451 };
0452 
0453 &usb_host1_ohci {
0454         status = "okay";
0455 };
0456 
0457 &usbdrd3_0 {
0458         status = "okay";
0459 };
0460 
0461 &usbdrd_dwc3_0 {
0462         status = "okay";
0463 };
0464 
0465 &vbus_host {
0466         enable-active-high;
0467         gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>; /* USB1_EN_OC# */
0468         pinctrl-names = "default";
0469         pinctrl-0 = <&usb1_en_oc>;
0470 };
0471 
0472 &vbus_typec {
0473         enable-active-high;
0474         gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; /* USB0_EN_OC# */
0475         pinctrl-names = "default";
0476         pinctrl-0 = <&usb0_en_oc>;
0477 };