summaryrefslogtreecommitdiff
path: root/drivers/usb/host/dwc2.c
diff options
context:
space:
mode:
authorDinh Nguyen <dinguyen@opensource.altera.com>2016-03-04 18:57:04 -0600
committerMarek Vasut <marex@denx.de>2016-03-05 02:21:36 +0100
commitb5ab663a6956e47180706b897bc9567335257d58 (patch)
tree6771f5cec4271c7b58375fea745a85bf081771b5 /drivers/usb/host/dwc2.c
parent8038f6d2881d58f5322109a2f5ec2de5aaa6fc30 (diff)
downloadu-boot-b5ab663a6956e47180706b897bc9567335257d58.tar.gz
u-boot-b5ab663a6956e47180706b897bc9567335257d58.tar.bz2
u-boot-b5ab663a6956e47180706b897bc9567335257d58.zip
usb: dwc2: disable erroneous overcurrent condition
For the case where an external VBUS is used, we should enable the external VBUS comparator in the driver. This would prevent an unnecessary overcurrent error which would then disable the host port. The overcurrent condition was happening on the SoCFPGA Cyclone5 devkit, thus USB was not working on the devkit. This patch fixes that problem. Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Diffstat (limited to 'drivers/usb/host/dwc2.c')
-rw-r--r--drivers/usb/host/dwc2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index c6727c381c..b2f4bc685a 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -263,7 +263,9 @@ static void dwc_otg_core_init(struct dwc2_core_regs *regs)
/* Program the ULPI External VBUS bit if needed */
#ifdef CONFIG_DWC2_PHY_ULPI_EXT_VBUS
- usbcfg |= DWC2_GUSBCFG_ULPI_EXT_VBUS_DRV;
+ usbcfg |= (DWC2_GUSBCFG_ULPI_EXT_VBUS_DRV |
+ DWC2_GUSBCFG_ULPI_INT_VBUS_INDICATOR |
+ DWC2_GUSBCFG_INDICATOR_PASSTHROUGH);
#else
usbcfg &= ~DWC2_GUSBCFG_ULPI_EXT_VBUS_DRV;
#endif