Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Copyright (c) 2017 PINE64
0004  */
0005 
0006 /dts-v1/;
0007 #include "rk3328.dtsi"
0008 
0009 / {
0010         model = "Pine64 Rock64";
0011         compatible = "pine64,rock64", "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         vcc_sd: sdmmc-regulator {
0030                 compatible = "regulator-fixed";
0031                 gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
0032                 pinctrl-names = "default";
0033                 pinctrl-0 = <&sdmmc0m1_pin>;
0034                 regulator-name = "vcc_sd";
0035                 regulator-min-microvolt = <3300000>;
0036                 regulator-max-microvolt = <3300000>;
0037                 vin-supply = <&vcc_io>;
0038         };
0039 
0040         vcc_host_5v: vcc-host-5v-regulator {
0041                 compatible = "regulator-fixed";
0042                 gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
0043                 pinctrl-names = "default";
0044                 pinctrl-0 = <&usb20_host_drv>;
0045                 regulator-name = "vcc_host_5v";
0046                 regulator-always-on;
0047                 regulator-boot-on;
0048                 vin-supply = <&vcc_sys>;
0049         };
0050 
0051         vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator {
0052                 compatible = "regulator-fixed";
0053                 gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
0054                 pinctrl-names = "default";
0055                 pinctrl-0 = <&usb20_host_drv>;
0056                 regulator-name = "vcc_host1_5v";
0057                 regulator-always-on;
0058                 regulator-boot-on;
0059                 vin-supply = <&vcc_sys>;
0060         };
0061 
0062         vcc_sys: vcc-sys {
0063                 compatible = "regulator-fixed";
0064                 regulator-name = "vcc_sys";
0065                 regulator-always-on;
0066                 regulator-boot-on;
0067                 regulator-min-microvolt = <5000000>;
0068                 regulator-max-microvolt = <5000000>;
0069         };
0070 
0071         ir-receiver {
0072                 compatible = "gpio-ir-receiver";
0073                 gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>;
0074                 pinctrl-0 = <&ir_int>;
0075                 pinctrl-names = "default";
0076         };
0077 
0078         leds {
0079                 compatible = "gpio-leds";
0080 
0081                 power_led: led-0 {
0082                         gpios = <&rk805 1 GPIO_ACTIVE_LOW>;
0083                         linux,default-trigger = "mmc0";
0084                 };
0085 
0086                 standby_led: led-1 {
0087                         gpios = <&rk805 0 GPIO_ACTIVE_LOW>;
0088                         linux,default-trigger = "heartbeat";
0089                 };
0090         };
0091 
0092         spdif_sound: spdif-sound {
0093                 compatible = "simple-audio-card";
0094                 simple-audio-card,name = "SPDIF";
0095 
0096                 simple-audio-card,cpu {
0097                         sound-dai = <&spdif>;
0098                 };
0099 
0100                 simple-audio-card,codec {
0101                         sound-dai = <&spdif_dit>;
0102                 };
0103         };
0104 
0105         spdif_dit: spdif-dit {
0106                 compatible = "linux,spdif-dit";
0107                 #sound-dai-cells = <0>;
0108         };
0109 };
0110 
0111 &analog_sound {
0112         status = "okay";
0113 };
0114 
0115 &codec {
0116         mute-gpios = <&grf_gpio 0 GPIO_ACTIVE_LOW>;
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         mmc-hs200-1_8v;
0140         non-removable;
0141         pinctrl-names = "default";
0142         pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
0143         vmmc-supply = <&vcc_io>;
0144         vqmmc-supply = <&vcc18_emmc>;
0145         status = "okay";
0146 };
0147 
0148 &gmac2io {
0149         assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
0150         assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>;
0151         clock_in_out = "input";
0152         phy-supply = <&vcc_io>;
0153         phy-mode = "rgmii";
0154         pinctrl-names = "default";
0155         pinctrl-0 = <&rgmiim1_pins>;
0156         snps,force_thresh_dma_mode;
0157         snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
0158         snps,reset-active-low;
0159         snps,reset-delays-us = <0 10000 50000>;
0160         tx_delay = <0x24>;
0161         rx_delay = <0x18>;
0162         status = "okay";
0163 };
0164 
0165 &hdmi {
0166         status = "okay";
0167 };
0168 
0169 &hdmi_sound {
0170         status = "okay";
0171 };
0172 
0173 &hdmiphy {
0174         status = "okay";
0175 };
0176 
0177 &i2c1 {
0178         status = "okay";
0179 
0180         rk805: pmic@18 {
0181                 compatible = "rockchip,rk805";
0182                 reg = <0x18>;
0183                 interrupt-parent = <&gpio2>;
0184                 interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
0185                 #clock-cells = <1>;
0186                 clock-output-names = "xin32k", "rk805-clkout2";
0187                 gpio-controller;
0188                 #gpio-cells = <2>;
0189                 pinctrl-names = "default";
0190                 pinctrl-0 = <&pmic_int_l>;
0191                 rockchip,system-power-controller;
0192                 wakeup-source;
0193 
0194                 vcc1-supply = <&vcc_sys>;
0195                 vcc2-supply = <&vcc_sys>;
0196                 vcc3-supply = <&vcc_sys>;
0197                 vcc4-supply = <&vcc_sys>;
0198                 vcc5-supply = <&vcc_io>;
0199                 vcc6-supply = <&vcc_sys>;
0200 
0201                 regulators {
0202                         vdd_logic: DCDC_REG1 {
0203                                 regulator-name = "vdd_logic";
0204                                 regulator-min-microvolt = <712500>;
0205                                 regulator-max-microvolt = <1450000>;
0206                                 regulator-ramp-delay = <12500>;
0207                                 regulator-always-on;
0208                                 regulator-boot-on;
0209                                 regulator-state-mem {
0210                                         regulator-on-in-suspend;
0211                                         regulator-suspend-microvolt = <1000000>;
0212                                 };
0213                         };
0214 
0215                         vdd_arm: DCDC_REG2 {
0216                                 regulator-name = "vdd_arm";
0217                                 regulator-min-microvolt = <712500>;
0218                                 regulator-max-microvolt = <1450000>;
0219                                 regulator-ramp-delay = <12500>;
0220                                 regulator-always-on;
0221                                 regulator-boot-on;
0222                                 regulator-state-mem {
0223                                         regulator-on-in-suspend;
0224                                         regulator-suspend-microvolt = <950000>;
0225                                 };
0226                         };
0227 
0228                         vcc_ddr: DCDC_REG3 {
0229                                 regulator-name = "vcc_ddr";
0230                                 regulator-always-on;
0231                                 regulator-boot-on;
0232                                 regulator-state-mem {
0233                                         regulator-on-in-suspend;
0234                                 };
0235                         };
0236 
0237                         vcc_io: DCDC_REG4 {
0238                                 regulator-name = "vcc_io";
0239                                 regulator-min-microvolt = <3300000>;
0240                                 regulator-max-microvolt = <3300000>;
0241                                 regulator-always-on;
0242                                 regulator-boot-on;
0243                                 regulator-state-mem {
0244                                         regulator-on-in-suspend;
0245                                         regulator-suspend-microvolt = <3300000>;
0246                                 };
0247                         };
0248 
0249                         vcc_18: LDO_REG1 {
0250                                 regulator-name = "vcc_18";
0251                                 regulator-min-microvolt = <1800000>;
0252                                 regulator-max-microvolt = <1800000>;
0253                                 regulator-always-on;
0254                                 regulator-boot-on;
0255                                 regulator-state-mem {
0256                                         regulator-on-in-suspend;
0257                                         regulator-suspend-microvolt = <1800000>;
0258                                 };
0259                         };
0260 
0261                         vcc18_emmc: LDO_REG2 {
0262                                 regulator-name = "vcc18_emmc";
0263                                 regulator-min-microvolt = <1800000>;
0264                                 regulator-max-microvolt = <1800000>;
0265                                 regulator-always-on;
0266                                 regulator-boot-on;
0267                                 regulator-state-mem {
0268                                         regulator-on-in-suspend;
0269                                         regulator-suspend-microvolt = <1800000>;
0270                                 };
0271                         };
0272 
0273                         vdd_10: LDO_REG3 {
0274                                 regulator-name = "vdd_10";
0275                                 regulator-min-microvolt = <1000000>;
0276                                 regulator-max-microvolt = <1000000>;
0277                                 regulator-always-on;
0278                                 regulator-boot-on;
0279                                 regulator-state-mem {
0280                                         regulator-on-in-suspend;
0281                                         regulator-suspend-microvolt = <1000000>;
0282                                 };
0283                         };
0284                 };
0285         };
0286 };
0287 
0288 &i2s0 {
0289         status = "okay";
0290 };
0291 
0292 &i2s1 {
0293         status = "okay";
0294 };
0295 
0296 &io_domains {
0297         status = "okay";
0298 
0299         vccio1-supply = <&vcc_io>;
0300         vccio2-supply = <&vcc18_emmc>;
0301         vccio3-supply = <&vcc_io>;
0302         vccio4-supply = <&vcc_18>;
0303         vccio5-supply = <&vcc_io>;
0304         vccio6-supply = <&vcc_io>;
0305         pmuio-supply = <&vcc_io>;
0306 };
0307 
0308 &pinctrl {
0309         ir {
0310                 ir_int: ir-int {
0311                         rockchip,pins = <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
0312                 };
0313         };
0314 
0315         pmic {
0316                 pmic_int_l: pmic-int-l {
0317                         rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
0318                 };
0319         };
0320 
0321         usb2 {
0322                 usb20_host_drv: usb20-host-drv {
0323                         rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
0324                 };
0325         };
0326 };
0327 
0328 &sdmmc {
0329         bus-width = <4>;
0330         cap-mmc-highspeed;
0331         cap-sd-highspeed;
0332         disable-wp;
0333         max-frequency = <150000000>;
0334         pinctrl-names = "default";
0335         pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
0336         vmmc-supply = <&vcc_sd>;
0337         status = "okay";
0338 };
0339 
0340 &spdif {
0341         pinctrl-0 = <&spdifm0_tx>;
0342         status = "okay";
0343 };
0344 
0345 &spi0 {
0346         status = "okay";
0347 
0348         flash@0 {
0349                 compatible = "jedec,spi-nor";
0350                 reg = <0>;
0351 
0352                 /* maximum speed for Rockchip SPI */
0353                 spi-max-frequency = <50000000>;
0354         };
0355 };
0356 
0357 &tsadc {
0358         rockchip,hw-tshut-mode = <0>;
0359         rockchip,hw-tshut-polarity = <0>;
0360         status = "okay";
0361 };
0362 
0363 &uart2 {
0364         status = "okay";
0365 };
0366 
0367 &u2phy {
0368         status = "okay";
0369 
0370         u2phy_host: host-port {
0371                 status = "okay";
0372         };
0373 
0374         u2phy_otg: otg-port {
0375                 status = "okay";
0376         };
0377 };
0378 
0379 &usb20_otg {
0380         dr_mode = "host";
0381         status = "okay";
0382 };
0383 
0384 &usbdrd3 {
0385         dr_mode = "host";
0386         status = "okay";
0387 };
0388 
0389 &usb_host0_ehci {
0390         status = "okay";
0391 };
0392 
0393 &usb_host0_ohci {
0394         status = "okay";
0395 };
0396 
0397 &vop {
0398         status = "okay";
0399 };
0400 
0401 &vop_mmu {
0402         status = "okay";
0403 };