From a1b3f0ccb92ce7ad58fe4d33d6a1d4e646eb6d6e Mon Sep 17 00:00:00 2001
From: lyz <lyz@rock-chips.com>
Date: Mon, 23 Mar 2015 16:48:19 +0800
Subject: [PATCH] rk3368: usb: adjust usb phy parameter

---
 drivers/usb/dwc_otg_310/usbdev_rk3368.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc_otg_310/usbdev_rk3368.c b/drivers/usb/dwc_otg_310/usbdev_rk3368.c
index c7521a9cf9c6..8a316b31382a 100644
--- a/drivers/usb/dwc_otg_310/usbdev_rk3368.c
+++ b/drivers/usb/dwc_otg_310/usbdev_rk3368.c
@@ -22,6 +22,9 @@ static void usb20otg_hw_init(void)
 	/* Turn off differential receiver in suspend mode */
 	uoc_write(UOC_HIWORD_UPDATE(0, 1, 2), 0x798);
 
+	/* Set disconnect detection trigger point to 600mv */
+	uoc_write(UOC_HIWORD_UPDATE(0, 0xf, 11), 0x79c);
+
 	/* other haredware init,include:
 	 * DRV_VBUS GPIO init */
 	if (gpio_is_valid(control_usb->otg_gpios->gpio))
@@ -31,10 +34,9 @@ static void usb20otg_hw_init(void)
 static void usb20otg_phy_suspend(void *pdata, int suspend)
 {
 	struct dwc_otg_platform_data *usbpdata = pdata;
-
 	if (suspend) {
 		/* enable soft control */
-		uoc_write(UOC_HIWORD_UPDATE(0x55, 0x7f, 0), 0x700);
+		uoc_write(UOC_HIWORD_UPDATE(0x1d5, 0x1ff, 0), 0x700);
 		usbpdata->phy_status = 1;
 	} else {
 		/* exit suspend */
-- 
2.34.1