From: wlf Date: Mon, 21 Oct 2013 02:03:41 +0000 (+0800) Subject: USB: RK3188 Host2.0 and OTG controller disconnect threshold adjustment X-Git-Tag: firefly_0821_release~6548 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2892f765f97440744e849f9ae1f5b7a8815ebdc5;p=firefly-linux-kernel-4.4.55.git USB: RK3188 Host2.0 and OTG controller disconnect threshold adjustment --- diff --git a/drivers/usb/dwc_otg/usbdev_rk30.c b/drivers/usb/dwc_otg/usbdev_rk30.c index 462e5f4d716f..d7c21d0a7ae9 100755 --- a/drivers/usb/dwc_otg/usbdev_rk30.c +++ b/drivers/usb/dwc_otg/usbdev_rk30.c @@ -128,6 +128,8 @@ void usb20otg_hw_init(void) //usb phy enter usb mode unsigned int * otg_phy_con3 = (unsigned int*)(USBGRF_UOC0_CON0); *otg_phy_con3 = (0x0300 << 16); + //Disconnect Threshold Adjustment + *otg_phy_con3 = (0x07<<1)|((0x07<<1)<<16); #endif // other haredware init #if defined(CONFIG_ARCH_RK3066B) || defined(CONFIG_ARCH_RK3188) @@ -321,6 +323,11 @@ static struct resource usb20_host_resource[] = { void usb20host_hw_init(void) { // usb phy config init +#ifdef CONFIG_ARCH_RK3188 + //Disconnect Threshold Adjustment + unsigned int * otg_phy_con1 = (unsigned int*)(USBGRF_UOC1_CON0); + *otg_phy_con1 = (0x07<<1)|((0x07<<1)<<16); +#endif // other haredware init #if defined(CONFIG_ARCH_RK3066B) || defined(CONFIG_ARCH_RK3188)