USB: RK3188 Host2.0 and OTG controller disconnect threshold adjustment
authorwlf <wulf@rock-chips.com>
Mon, 21 Oct 2013 02:03:41 +0000 (10:03 +0800)
committerwlf <wulf@rock-chips.com>
Mon, 21 Oct 2013 02:03:41 +0000 (10:03 +0800)
drivers/usb/dwc_otg/usbdev_rk30.c

index 462e5f4d716f5c08172606efc04eecccfb37ce8a..d7c21d0a7ae988bfd3d921acb7d11fafcea7ffcb 100755 (executable)
@@ -128,6 +128,8 @@ void usb20otg_hw_init(void)
         //usb phy enter usb mode\r
         unsigned int * otg_phy_con3 = (unsigned int*)(USBGRF_UOC0_CON0);\r
         *otg_phy_con3 = (0x0300 << 16);\r
+       //Disconnect Threshold Adjustment\r
+       *otg_phy_con3 = (0x07<<1)|((0x07<<1)<<16);      \r
 #endif    \r
         // other haredware init\r
 #if defined(CONFIG_ARCH_RK3066B) || defined(CONFIG_ARCH_RK3188)\r
@@ -321,6 +323,11 @@ static struct resource usb20_host_resource[] = {
 void usb20host_hw_init(void)\r
 {\r
     // usb phy config init\r
+#ifdef CONFIG_ARCH_RK3188\r
+    //Disconnect Threshold Adjustment\r
+    unsigned int * otg_phy_con1 = (unsigned int*)(USBGRF_UOC1_CON0);\r
+    *otg_phy_con1 = (0x07<<1)|((0x07<<1)<<16);\r
+#endif    \r
 \r
     // other haredware init\r
 #if defined(CONFIG_ARCH_RK3066B) || defined(CONFIG_ARCH_RK3188)\r