diff options
author | Dinh Nguyen <dinguyen@kernel.org> | 2017-10-16 16:57:18 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2017-10-19 10:38:14 +0300 |
commit | b11633c42a766cb3c824e3583163b9adf67501fe (patch) | |
tree | 1e4aeec9d408e929c66a4f3cfde977dd23e76980 /drivers/usb/dwc2/hcd.c | |
parent | 32428aa22d08a1be660b571a0f71880e5a9dd926 (diff) | |
download | linux-b11633c42a766cb3c824e3583163b9adf67501fe.tar.xz |
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.
This patch uses the standard 'disable-over-current' binding to allow of the
option of disabling the over-current condition.
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc2/hcd.c')
-rw-r--r-- | drivers/usb/dwc2/hcd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index c2631145f404..5e2033616aca 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -213,6 +213,11 @@ static int dwc2_hs_phy_init(struct dwc2_hsotg *hsotg, bool select_phy) usbcfg &= ~(GUSBCFG_PHYIF16 | GUSBCFG_DDRSEL); if (hsotg->params.phy_ulpi_ddr) usbcfg |= GUSBCFG_DDRSEL; + + /* Set external VBUS indicator as needed. */ + if (hsotg->params.oc_disable) + usbcfg |= (GUSBCFG_ULPI_INT_VBUS_IND | + GUSBCFG_INDICATORPASSTHROUGH); break; case DWC2_PHY_TYPE_PARAM_UTMI: /* UTMI+ interface */ |