* [PATCH] usb: dwc2: fix unnecessary USB overcurrent condition
@ 2015-05-27 2:26 dinguyen
2015-06-10 2:12 ` John Youn
0 siblings, 1 reply; 2+ messages in thread
From: dinguyen @ 2015-05-27 2:26 UTC (permalink / raw)
To: johnyoun
Cc: dinh.linux, linux-usb, linux-kernel, Dinh Nguyen,
Gregory Herrero, Mian Yousaf Kaukab, Felipe Balbi
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] usb: dwc2: fix unnecessary USB overcurrent condition
2015-05-27 2:26 [PATCH] usb: dwc2: fix unnecessary USB overcurrent condition dinguyen
@ 2015-06-10 2:12 ` John Youn
0 siblings, 0 replies; 2+ messages in thread
From: John Youn @ 2015-06-10 2:12 UTC (permalink / raw)
To: dinguyen, John.Youn
Cc: dinh.linux, linux-usb, linux-kernel, Gregory Herrero,
Mian Yousaf Kaukab, Felipe Balbi
Hi Dinh,
Responding again to the proper message to add linux-usb. And also
added more comments.
On 5/26/2015 7:32 PM, dinguyen@opensource.altera.com wrote:
> From: Dinh Nguyen <dinguyen@opensource.altera.com>
>
> For platforms that use a ULPI phy, we should enable the external VbusValid
> signal instead.
I don't think it should be for all ULPI phys. Though I'm not that
familiar with ULPI.
>
> 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);
> +
I think these should all be conditional on using the external
vbus, and probably also on the features themselves since it will
depend on the PHY and platform how you want to set these bits.
John
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-10 2:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-27 2:26 [PATCH] usb: dwc2: fix unnecessary USB overcurrent condition dinguyen
2015-06-10 2:12 ` John Youn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®