arm64: dts: rk3328-evb: add sdio and sdmmc support
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / boot / dts / rockchip / rk3328-evb.dts
index 3001fbe95710d1a46a7596b04a34b7d65ceb12ae..fec13aee8e86deb3f893da4fa7fc0525e9449d7b 100644 (file)
        fiq-debugger {
                compatible = "rockchip,fiq-debugger";
                rockchip,serial-id = <2>;
-               rockchip,signal-irq = <135>;
+               rockchip,signal-irq = <145>;
                rockchip,wake-irq = <0>;
                /* If enable uart uses irq instead of fiq */
                rockchip,irq-mode-enable = <0>;
                rockchip,baudrate = <1500000>;  /* Only 115200 and 1500000 */
                status = "okay";
        };
+
+       gmac_clkin: external-gmac-clock {
+               compatible = "fixed-clock";
+               clock-frequency = <125000000>;
+               clock-output-names = "gmac_clkin";
+               #clock-cells = <0>;
+       };
+
+       vcc_phy: vcc-phy-regulator {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc_phy";
+               regulator-always-on;
+               regulator-boot-on;
+       };
+
+       sdio_pwrseq: sdio-pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_enable_h>;
+
+               /*
+                * On the module itself this is one of these (depending
+                * on the actual card populated):
+                * - SDIO_RESET_L_WL_REG_ON
+                * - PDN (power down when low)
+                */
+               reset-gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
+       };
+
+       wireless-wlan {
+               compatible = "wlan-platdata";
+               rockchip,grf = <&grf>;
+               wifi_chip_type = "ap6354";
+               sdio_vref = <1800>;
+               WIFI,host_wake_irq = <&gpio1 19 GPIO_ACTIVE_HIGH>;
+               status = "okay";
+       };
+
+};
+
+&cpu0 {
+       cpu-supply = <&vdd_arm>;
+};
+
+&sdio {
+       bus-width = <4>;
+       cap-sd-highspeed;
+       cap-sdio-irq;
+       disable-wp;
+       keep-power-in-suspend;
+       max-frequency = <150000000>;
+       mmc-pwrseq = <&sdio_pwrseq>;
+       non-removable;
+       num-slots = <1>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
+       supports-sdio;
+       status = "okay";
+};
+
+&sdmmc {
+       bus-width = <4>;
+       cap-mmc-highspeed;
+       cap-sd-highspeed;
+       disable-wp;
+       max-frequency = <150000000>;
+       num-slots = <1>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
+       supports-sd;
+       status = "okay";
 };
 
 &emmc {
        status = "okay";
 };
 
+&gmac2io {
+       phy-supply = <&vcc_phy>;
+       phy-mode = "rgmii";
+       clock_in_out = "input";
+       snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
+       snps,reset-active-low;
+       snps,reset-delays-us = <0 10000 50000>;
+       assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
+       assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&rgmiim1_pins>;
+       tx_delay = <0x26>;
+       rx_delay = <0x11>;
+       status = "disabled";
+};
+
+&io_domains {
+       status = "okay";
+
+       vccio1-supply = <&vcc_io>;
+       vccio2-supply = <&vcc_18emmc>;
+       vccio3-supply = <&vcc_io>;
+       vccio4-supply = <&vdd_18>;
+       vccio5-supply = <&vcc_io>;
+       vccio6-supply = <&vcc_io>;
+       pmuio-supply = <&vcc_io>;
+};
+
+&tsadc {
+       status = "okay";
+};
+
+&u2phy {
+       otg-vbus-gpios = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+
+       u2phy_host: host-port {
+               status = "okay";
+       };
+
+       u2phy_otg: otg-port {
+               status = "okay";
+       };
+};
+
+&u3phy {
+       vbus-drv-gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
+
+&u3phy_utmi {
+       status = "okay";
+};
+
+&u3phy_pipe {
+       status = "okay";
+};
+
 &usb20_otg {
        dr_mode = "peripheral";
        status = "okay";
 };
 
+&usb_host0_ehci {
+       status = "okay";
+};
+
+&usb_host0_ohci {
+       status = "okay";
+};
+
+&usbdrd3 {
+       status = "okay";
+};
+
+&usbdrd_dwc3 {
+       status = "okay";
+};
+
 &i2c1 {
        status = "okay";
 
        pmic {
                pmic_int_l: pmic-int-l {
                rockchip,pins =
-                       <2 6 RK_FUNC_GPIO &pcfg_pull_up>;       /* gpio2_a6 */
+                       <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;  /* gpio2_a6 */
+               };
+       };
+
+       sdio-pwrseq {
+               wifi_enable_h: wifi-enable-h {
+               rockchip,pins =
+                       <1 18 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
 };