Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Copyright (c) 2017 T-Chip Intelligent Technology Co., Ltd
0004  */
0005 
0006 /dts-v1/;
0007 #include "rk3328.dtsi"
0008 
0009 / {
0010         model = "Firefly roc-rk3328-cc";
0011         compatible = "firefly,roc-rk3328-cc", "rockchip,rk3328";
0012 
0013         aliases {
0014                 mmc0 = &sdmmc;
0015                 mmc1 = &emmc;
0016         };
0017 
0018         chosen {
0019                 stdout-path = "serial2:1500000n8";
0020         };
0021 
0022         gmac_clkin: external-gmac-clock {
0023                 compatible = "fixed-clock";
0024                 clock-frequency = <125000000>;
0025                 clock-output-names = "gmac_clkin";
0026                 #clock-cells = <0>;
0027         };
0028 
0029         dc_12v: dc-12v {
0030                 compatible = "regulator-fixed";
0031                 regulator-name = "dc_12v";
0032                 regulator-always-on;
0033                 regulator-boot-on;
0034                 regulator-min-microvolt = <12000000>;
0035                 regulator-max-microvolt = <12000000>;
0036         };
0037 
0038         vcc_sd: sdmmc-regulator {
0039                 compatible = "regulator-fixed";
0040                 gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
0041                 pinctrl-names = "default";
0042                 pinctrl-0 = <&sdmmc0m1_pin>;
0043                 regulator-boot-on;
0044                 regulator-name = "vcc_sd";
0045                 regulator-min-microvolt = <3300000>;
0046                 regulator-max-microvolt = <3300000>;
0047                 vin-supply = <&vcc_io>;
0048         };
0049 
0050         vcc_sdio: sdmmcio-regulator {
0051                 compatible = "regulator-gpio";
0052                 gpios = <&grf_gpio 0 GPIO_ACTIVE_HIGH>;
0053                 states = <1800000 0x1>,
0054                          <3300000 0x0>;
0055                 regulator-name = "vcc_sdio";
0056                 regulator-type = "voltage";
0057                 regulator-min-microvolt = <1800000>;
0058                 regulator-max-microvolt = <3300000>;
0059                 regulator-always-on;
0060                 vin-supply = <&vcc_sys>;
0061         };
0062 
0063         vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator {
0064                 compatible = "regulator-fixed";
0065                 enable-active-high;
0066                 gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
0067                 pinctrl-names = "default";
0068                 pinctrl-0 = <&usb20_host_drv>;
0069                 regulator-name = "vcc_host1_5v";
0070                 regulator-always-on;
0071                 vin-supply = <&vcc_sys>;
0072         };
0073 
0074         vcc_sys: vcc-sys {
0075                 compatible = "regulator-fixed";
0076                 regulator-name = "vcc_sys";
0077                 regulator-always-on;
0078                 regulator-boot-on;
0079                 regulator-min-microvolt = <5000000>;
0080                 regulator-max-microvolt = <5000000>;
0081                 vin-supply = <&dc_12v>;
0082         };
0083 
0084         vcc_phy: vcc-phy-regulator {
0085                 compatible = "regulator-fixed";
0086                 regulator-name = "vcc_phy";
0087                 regulator-always-on;
0088                 regulator-boot-on;
0089         };
0090 
0091         leds {
0092                 compatible = "gpio-leds";
0093 
0094                 power_led: led-0 {
0095                         label = "firefly:blue:power";
0096                         linux,default-trigger = "heartbeat";
0097                         gpios = <&rk805 1 GPIO_ACTIVE_LOW>;
0098                         default-state = "on";
0099                         mode = <0x23>;
0100                 };
0101 
0102                 user_led: led-1 {
0103                         label = "firefly:yellow:user";
0104                         linux,default-trigger = "mmc1";
0105                         gpios = <&rk805 0 GPIO_ACTIVE_LOW>;
0106                         default-state = "off";
0107                         mode = <0x05>;
0108                 };
0109         };
0110 };
0111 
0112 &analog_sound {
0113         status = "okay";
0114 };
0115 
0116 &codec {
0117         status = "okay";
0118 };
0119 
0120 &cpu0 {
0121         cpu-supply = <&vdd_arm>;
0122 };
0123 
0124 &cpu1 {
0125         cpu-supply = <&vdd_arm>;
0126 };
0127 
0128 &cpu2 {
0129         cpu-supply = <&vdd_arm>;
0130 };
0131 
0132 &cpu3 {
0133         cpu-supply = <&vdd_arm>;
0134 };
0135 
0136 &emmc {
0137         bus-width = <8>;
0138         cap-mmc-highspeed;
0139         max-frequency = <150000000>;
0140         mmc-ddr-1_8v;
0141         mmc-hs200-1_8v;
0142         non-removable;
0143         pinctrl-names = "default";
0144         pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
0145         vmmc-supply = <&vcc_io>;
0146         vqmmc-supply = <&vcc18_emmc>;
0147         status = "okay";
0148 };
0149 
0150 &gmac2io {
0151         assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
0152         assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>;
0153         clock_in_out = "input";
0154         phy-supply = <&vcc_phy>;
0155         phy-mode = "rgmii";
0156         pinctrl-names = "default";
0157         pinctrl-0 = <&rgmiim1_pins>;
0158         snps,aal;
0159         snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
0160         snps,reset-active-low;
0161         snps,reset-delays-us = <0 10000 50000>;
0162         snps,rxpbl = <0x4>;
0163         snps,txpbl = <0x4>;
0164         tx_delay = <0x24>;
0165         rx_delay = <0x18>;
0166         status = "okay";
0167 };
0168 
0169 &hdmi {
0170         status = "okay";
0171 };
0172 
0173 &hdmiphy {
0174         status = "okay";
0175 };
0176 
0177 &hdmi_sound {
0178         status = "okay";
0179 };
0180 
0181 &i2c1 {
0182         status = "okay";
0183 
0184         rk805: pmic@18 {
0185                 compatible = "rockchip,rk805";
0186                 reg = <0x18>;
0187                 interrupt-parent = <&gpio1>;
0188                 interrupts = <24 IRQ_TYPE_LEVEL_LOW>;
0189                 #clock-cells = <1>;
0190                 clock-output-names = "xin32k", "rk805-clkout2";
0191                 gpio-controller;
0192                 #gpio-cells = <2>;
0193                 pinctrl-names = "default";
0194                 pinctrl-0 = <&pmic_int_l>;
0195                 rockchip,system-power-controller;
0196                 wakeup-source;
0197 
0198                 vcc1-supply = <&vcc_sys>;
0199                 vcc2-supply = <&vcc_sys>;
0200                 vcc3-supply = <&vcc_sys>;
0201                 vcc4-supply = <&vcc_sys>;
0202                 vcc5-supply = <&vcc_io>;
0203                 vcc6-supply = <&vcc_io>;
0204 
0205                 regulators {
0206                         vdd_logic: DCDC_REG1 {
0207                                 regulator-name = "vdd_logic";
0208                                 regulator-min-microvolt = <712500>;
0209                                 regulator-max-microvolt = <1450000>;
0210                                 regulator-always-on;
0211                                 regulator-boot-on;
0212                                 regulator-state-mem {
0213                                         regulator-on-in-suspend;
0214                                         regulator-suspend-microvolt = <1000000>;
0215                                 };
0216                         };
0217 
0218                         vdd_arm: DCDC_REG2 {
0219                                 regulator-name = "vdd_arm";
0220                                 regulator-min-microvolt = <712500>;
0221                                 regulator-max-microvolt = <1450000>;
0222                                 regulator-always-on;
0223                                 regulator-boot-on;
0224                                 regulator-state-mem {
0225                                         regulator-on-in-suspend;
0226                                         regulator-suspend-microvolt = <950000>;
0227                                 };
0228                         };
0229 
0230                         vcc_ddr: DCDC_REG3 {
0231                                 regulator-name = "vcc_ddr";
0232                                 regulator-always-on;
0233                                 regulator-boot-on;
0234                                 regulator-state-mem {
0235                                         regulator-on-in-suspend;
0236                                 };
0237                         };
0238 
0239                         vcc_io: DCDC_REG4 {
0240                                 regulator-name = "vcc_io";
0241                                 regulator-min-microvolt = <3300000>;
0242                                 regulator-max-microvolt = <3300000>;
0243                                 regulator-always-on;
0244                                 regulator-boot-on;
0245                                 regulator-state-mem {
0246                                         regulator-on-in-suspend;
0247                                         regulator-suspend-microvolt = <3300000>;
0248                                 };
0249                         };
0250 
0251                         vcc_18: LDO_REG1 {
0252                                 regulator-name = "vcc_18";
0253                                 regulator-min-microvolt = <1800000>;
0254                                 regulator-max-microvolt = <1800000>;
0255                                 regulator-always-on;
0256                                 regulator-boot-on;
0257                                 regulator-state-mem {
0258                                         regulator-on-in-suspend;
0259                                         regulator-suspend-microvolt = <1800000>;
0260                                 };
0261                         };
0262 
0263                         vcc18_emmc: LDO_REG2 {
0264                                 regulator-name = "vcc18_emmc";
0265                                 regulator-min-microvolt = <1800000>;
0266                                 regulator-max-microvolt = <1800000>;
0267                                 regulator-always-on;
0268                                 regulator-boot-on;
0269                                 regulator-state-mem {
0270                                         regulator-on-in-suspend;
0271                                         regulator-suspend-microvolt = <1800000>;
0272                                 };
0273                         };
0274 
0275                         vdd_10: LDO_REG3 {
0276                                 regulator-name = "vdd_10";
0277                                 regulator-min-microvolt = <1000000>;
0278                                 regulator-max-microvolt = <1000000>;
0279                                 regulator-always-on;
0280                                 regulator-boot-on;
0281                                 regulator-state-mem {
0282                                         regulator-on-in-suspend;
0283                                         regulator-suspend-microvolt = <1000000>;
0284                                 };
0285                         };
0286                 };
0287         };
0288 };
0289 
0290 &i2s0 {
0291         status = "okay";
0292 };
0293 
0294 &i2s1 {
0295         status = "okay";
0296 };
0297 
0298 &io_domains {
0299         status = "okay";
0300 
0301         vccio1-supply = <&vcc_io>;
0302         vccio2-supply = <&vcc18_emmc>;
0303         vccio3-supply = <&vcc_sdio>;
0304         vccio4-supply = <&vcc_18>;
0305         vccio5-supply = <&vcc_io>;
0306         vccio6-supply = <&vcc_io>;
0307         pmuio-supply = <&vcc_io>;
0308 };
0309 
0310 &pinctrl {
0311         pmic {
0312                 pmic_int_l: pmic-int-l {
0313                         rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
0314                 };
0315         };
0316 
0317         usb2 {
0318                 usb20_host_drv: usb20-host-drv {
0319                         rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
0320                 };
0321         };
0322 };
0323 
0324 &sdmmc {
0325         bus-width = <4>;
0326         cap-mmc-highspeed;
0327         cap-sd-highspeed;
0328         disable-wp;
0329         max-frequency = <150000000>;
0330         pinctrl-names = "default";
0331         pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
0332         sd-uhs-sdr12;
0333         sd-uhs-sdr25;
0334         sd-uhs-sdr50;
0335         sd-uhs-sdr104;
0336         vmmc-supply = <&vcc_sd>;
0337         vqmmc-supply = <&vcc_sdio>;
0338         status = "okay";
0339 };
0340 
0341 &tsadc {
0342         status = "okay";
0343 };
0344 
0345 &u2phy {
0346         status = "okay";
0347 };
0348 
0349 &u2phy_host {
0350         status = "okay";
0351 };
0352 
0353 &u2phy_otg {
0354         status = "okay";
0355 };
0356 
0357 &uart2 {
0358         status = "okay";
0359 };
0360 
0361 &usb20_otg {
0362         dr_mode = "host";
0363         status = "okay";
0364 };
0365 
0366 &usbdrd3 {
0367         dr_mode = "host";
0368         status = "okay";
0369 };
0370 
0371 &usb_host0_ehci {
0372         status = "okay";
0373 };
0374 
0375 &usb_host0_ohci {
0376         status = "okay";
0377 };
0378 
0379 &vop {
0380         status = "okay";
0381 };
0382 
0383 &vop_mmu {
0384         status = "okay";
0385 };