From 2892f765f97440744e849f9ae1f5b7a8815ebdc5 Mon Sep 17 00:00:00 2001 From: wlf Date: Mon, 21 Oct 2013 10:03:41 +0800 Subject: [PATCH] USB: RK3188 Host2.0 and OTG controller disconnect threshold adjustment --- drivers/usb/dwc_otg/usbdev_rk30.c | 7 +++++++ 1 file changed, 7 insertions(+) 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) -- 2.34.1