lkml.org 
[lkml]   [2015]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] usb: dwc2: fix unnecessary USB overcurrent condition
Date
From: Dinh Nguyen <dinguyen@opensource.altera.com>

For platforms that use a ULPI phy, we should enable the external VbusValid
signal instead.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Gregory Herrero <gregory.herrero@intel.com>
Cc: Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
Cc: Felipe Balbi <balbi@ti.com>
---
drivers/usb/dwc2/core.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
index e5b546f..08ffdc6 100644
--- a/drivers/usb/dwc2/core.c
+++ b/drivers/usb/dwc2/core.c
@@ -807,6 +807,11 @@ int dwc2_core_init(struct dwc2_hsotg *hsotg, bool select_phy, int irq)
if (hsotg->core_params->ts_dline > 0)
usbcfg |= GUSBCFG_TERMSELDLPULSE;

+ /* Set external VBUS indicator as needed. */
+ if (hsotg->core_params->phy_type == DWC2_PHY_TYPE_PARAM_ULPI)
+ usbcfg |= (GUSBCFG_ULPI_INT_VBUS_IND |
+ GUSBCFG_INDICATORPASSTHROUGH);
+
writel(usbcfg, hsotg->regs + GUSBCFG);

/* Reset the Controller */
--
2.2.1


\
 
 \ /
  Last update: 2015-05-27 04:41    [W:0.195 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site