arm64: dts: mediatek: add USB3 DRD driver
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Wed, 19 Oct 2016 02:28:27 +0000 (10:28 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Oct 2016 15:02:42 +0000 (17:02 +0200)
USB3 DRD driver is added for MT8173-EVB, and xHCI driver
becomes its subnode

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/boot/dts/mediatek/mt8173-evb.dts
arch/arm64/boot/dts/mediatek/mt8173.dtsi

index 2a7f731c77590bebebbf9af0a81c01dc962cf4a2..0ecaad4333a7690f68c019d660ee0bc75b8580b3 100644 (file)
 
        chosen { };
 
-       usb_p1_vbus: regulator@0 {
-               compatible = "regulator-fixed";
-               regulator-name = "usb_vbus";
-               regulator-min-microvolt = <5000000>;
-               regulator-max-microvolt = <5000000>;
-               gpio = <&pio 130 GPIO_ACTIVE_HIGH>;
-               enable-active-high;
-       };
-
        connector {
                compatible = "hdmi-connector";
                label = "hdmi";
                        };
                };
        };
+
+       extcon_usb: extcon_iddig {
+               compatible = "linux,extcon-usb-gpio";
+               id-gpio = <&pio 16 GPIO_ACTIVE_HIGH>;
+       };
+
+       usb_p1_vbus: regulator@0 {
+               compatible = "regulator-fixed";
+               regulator-name = "usb_vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&pio 130 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       usb_p0_vbus: regulator@1 {
+               compatible = "regulator-fixed";
+               regulator-name = "vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&pio 9 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
 };
 
 &cec {
                        bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
                };
        };
+
+       usb_id_pins_float: usb_iddig_pull_up {
+               pins_iddig {
+                       pinmux = <MT8173_PIN_16_IDDIG__FUNC_IDDIG>;
+                       bias-pull-up;
+               };
+       };
+
+       usb_id_pins_ground: usb_iddig_pull_down {
+               pins_iddig {
+                       pinmux = <MT8173_PIN_16_IDDIG__FUNC_IDDIG>;
+                       bias-pull-down;
+               };
+       };
 };
 
 &pwm0 {
        status = "okay";
 };
 
+&ssusb {
+       vusb33-supply = <&mt6397_vusb_reg>;
+       vbus-supply = <&usb_p0_vbus>;
+       extcon = <&extcon_usb>;
+       dr_mode = "otg";
+       mediatek,enable-wakeup;
+       pinctrl-names = "default", "id_float", "id_ground";
+       pinctrl-0 = <&usb_id_pins_float>;
+       pinctrl-1 = <&usb_id_pins_float>;
+       pinctrl-2 = <&usb_id_pins_ground>;
+       status = "okay";
+};
+
 &uart0 {
        status = "okay";
 };
 
-&usb30 {
+&usb_host {
        vusb33-supply = <&mt6397_vusb_reg>;
        vbus-supply = <&usb_p1_vbus>;
-       mediatek,wakeup-src = <1>;
+       status = "okay";
 };
index 1c71e256601dc44b9a2d30ce7cb54db8b4811ee7..c2d588ca59b70f455f2da6e4d5c5332a4fb33575 100644 (file)
                        status = "disabled";
                };
 
-               usb30: usb@11270000 {
-                       compatible = "mediatek,mt8173-xhci";
-                       reg = <0 0x11270000 0 0x1000>,
+               ssusb: usb@11271000 {
+                       compatible = "mediatek,mt8173-mtu3";
+                       reg = <0 0x11271000 0 0x3000>,
                              <0 0x11280700 0 0x0100>;
-                       interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_LOW>;
+                       reg-names = "mac", "ippc";
+                       interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_LOW>;
+                       phys = <&phy_port0 PHY_TYPE_USB3>,
+                              <&phy_port1 PHY_TYPE_USB2>;
                        power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>;
                        clocks = <&topckgen CLK_TOP_USB30_SEL>,
                                 <&pericfg CLK_PERI_USB0>,
                        clock-names = "sys_ck",
                                      "wakeup_deb_p0",
                                      "wakeup_deb_p1";
-                       phys = <&phy_port0 PHY_TYPE_USB3>,
-                              <&phy_port1 PHY_TYPE_USB2>;
                        mediatek,syscon-wakeup = <&pericfg>;
-                       status = "okay";
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       ranges;
+                       status = "disabled";
+
+                       usb_host: xhci@11270000 {
+                               compatible = "mediatek,mt8173-xhci";
+                               reg = <0 0x11270000 0 0x1000>;
+                               reg-names = "mac";
+                               interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_LOW>;
+                               power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>;
+                               clocks = <&topckgen CLK_TOP_USB30_SEL>;
+                               clock-names = "sys_ck";
+                               status = "disabled";
+                       };
                };
 
                u3phy: usb-phy@11290000 {