diff mbox

[U-Boot,1/2] usb: host: xhci: make sure to power up PHY

Message ID 1403558739-24461-1-git-send-email-balbi@ti.com
State Superseded
Delegated to: Marek Vasut
Headers show

Commit Message

Felipe Balbi June 23, 2014, 9:25 p.m. UTC
some boards won't work if the PHY isn't explicitly
powered up.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/host/xhci-omap.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Dan Murphy June 27, 2014, 3:27 p.m. UTC | #1
Hi

On 06/23/2014 04:25 PM, Felipe Balbi wrote:
> some boards won't work if the PHY isn't explicitly
> powered up.
>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
>  drivers/usb/host/xhci-omap.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/host/xhci-omap.c b/drivers/usb/host/xhci-omap.c
> index e667810..912b2bd 100644
> --- a/drivers/usb/host/xhci-omap.c
> +++ b/drivers/usb/host/xhci-omap.c
> @@ -98,6 +98,7 @@ static int omap_xhci_core_init(struct omap_xhci *omap)
>  {
>  	int ret = 0;
>  
> +	usb_phy_power(1);

Should this not be in the omap_usb_phy.c in the omap_enable_phy call below?
I mean you are enabling the PHY right?

>  	omap_enable_phy(omap);
>  
>  	ret = dwc3_core_init(omap->dwc3_reg);
Felipe Balbi June 27, 2014, 3:36 p.m. UTC | #2
On Fri, Jun 27, 2014 at 10:27:30AM -0500, Dan Murphy wrote:
> Hi
> 
> On 06/23/2014 04:25 PM, Felipe Balbi wrote:
> > some boards won't work if the PHY isn't explicitly
> > powered up.
> >
> > Signed-off-by: Felipe Balbi <balbi@ti.com>
> > ---
> >  drivers/usb/host/xhci-omap.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/usb/host/xhci-omap.c b/drivers/usb/host/xhci-omap.c
> > index e667810..912b2bd 100644
> > --- a/drivers/usb/host/xhci-omap.c
> > +++ b/drivers/usb/host/xhci-omap.c
> > @@ -98,6 +98,7 @@ static int omap_xhci_core_init(struct omap_xhci *omap)
> >  {
> >  	int ret = 0;
> >  
> > +	usb_phy_power(1);
> 
> Should this not be in the omap_usb_phy.c in the omap_enable_phy call below?
> I mean you are enabling the PHY right?

no, I'm powering it up :-) moreover omap_xhci_core_exit() calls
usb_power_power(0), so it's only balancing the calls.
Dan Murphy June 27, 2014, 3:37 p.m. UTC | #3
On 06/27/2014 10:36 AM, Felipe Balbi wrote:
> On Fri, Jun 27, 2014 at 10:27:30AM -0500, Dan Murphy wrote:
>> Hi
>>
>> On 06/23/2014 04:25 PM, Felipe Balbi wrote:
>>> some boards won't work if the PHY isn't explicitly
>>> powered up.
>>>
>>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>>> ---
>>>  drivers/usb/host/xhci-omap.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/usb/host/xhci-omap.c b/drivers/usb/host/xhci-omap.c
>>> index e667810..912b2bd 100644
>>> --- a/drivers/usb/host/xhci-omap.c
>>> +++ b/drivers/usb/host/xhci-omap.c
>>> @@ -98,6 +98,7 @@ static int omap_xhci_core_init(struct omap_xhci *omap)
>>>  {
>>>  	int ret = 0;
>>>  
>>> +	usb_phy_power(1);
>> Should this not be in the omap_usb_phy.c in the omap_enable_phy call below?
>> I mean you are enabling the PHY right?
> no, I'm powering it up :-) moreover omap_xhci_core_exit() calls
> usb_power_power(0), so it's only balancing the calls.
>

OK that makes sense then
Felipe Balbi July 7, 2014, 4:14 p.m. UTC | #4
On Mon, Jun 23, 2014 at 04:25:38PM -0500, Felipe Balbi wrote:
> some boards won't work if the PHY isn't explicitly
> powered up.
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>

ping, this is still pending in mainline u-boot. Without this, usb won't
work on am437x-sk.

> ---
>  drivers/usb/host/xhci-omap.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/host/xhci-omap.c b/drivers/usb/host/xhci-omap.c
> index e667810..912b2bd 100644
> --- a/drivers/usb/host/xhci-omap.c
> +++ b/drivers/usb/host/xhci-omap.c
> @@ -98,6 +98,7 @@ static int omap_xhci_core_init(struct omap_xhci *omap)
>  {
>  	int ret = 0;
>  
> +	usb_phy_power(1);
>  	omap_enable_phy(omap);
>  
>  	ret = dwc3_core_init(omap->dwc3_reg);
> -- 
> 2.0.0.390.gcb682f8
>
diff mbox

Patch

diff --git a/drivers/usb/host/xhci-omap.c b/drivers/usb/host/xhci-omap.c
index e667810..912b2bd 100644
--- a/drivers/usb/host/xhci-omap.c
+++ b/drivers/usb/host/xhci-omap.c
@@ -98,6 +98,7 @@  static int omap_xhci_core_init(struct omap_xhci *omap)
 {
 	int ret = 0;
 
+	usb_phy_power(1);
 	omap_enable_phy(omap);
 
 	ret = dwc3_core_init(omap->dwc3_reg);