usb: xhci-exynos5: Disable USB 3.0 port for host mode
authorDongwoo Lee <dwoo08.lee@samsung.com>
Thu, 24 Nov 2016 04:40:39 +0000 (13:40 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Tue, 11 Apr 2017 09:58:18 +0000 (18:58 +0900)
xhci driver have not been completely implemented, so the controller
cannot recognize the USB 3.0 device when it is connected to xhci-hosted
port. This patch disable USB 3.0 port of xhci host, then super-speed
devices can be recognized as at least high-speed devices.

Change-Id: I6100f6c441993ae882db371d880a457cdcde4ae5
Reported-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
arch/arm/mach-exynos/include/mach/xhci-exynos.h
drivers/usb/host/xhci-exynos5.c

index 92b90a462c924dc9be2ca59bf0213c51316509db..3ac18098d41f5f0d5b675cd881aba9ac91570e92 100644 (file)
 
 #define PHYBATCHG_UTMI_CLKSEL                  (0x1 << 2)
 
+
+#define LINK_PORT_HOST_U3_PORT_DISABLE         (0x1 << 8)
+#define LINK_PORT_HOST_U2_PORT_DISABLE         (0x1 << 7)
+
 #define FSEL_CLKSEL_24M                                (0x5)
 
 /* XHCI PHY register structure */
index b3f48b34e222d2b19f16254dc530325e50eb7ce9..3d844e369daea3fa0e5a0ba089965e6d185fbf0a 100644 (file)
@@ -110,6 +110,15 @@ static void exynos5_usb3_phy_init(struct exynos_usb3_phy *phy)
 
        writel(0x0, &phy->phy_resume);
 
+       /*
+        * FIXME: If xhci becomes being able to fully support super-speed
+        * devices, this should be reverted.
+        *
+        * Disable USB 3.0 port and enable USB 2.0 port only
+        */
+       clrbits_le32(&phy->link_port, LINK_PORT_HOST_U2_PORT_DISABLE);
+       setbits_le32(&phy->link_port, LINK_PORT_HOST_U3_PORT_DISABLE);
+
        /*
         * Setting the Frame length Adj value[6:1] to default 0x20
         * See xHCI 1.0 spec, 5.2.4