2011-04-11 09:39:07

by Dmitry Artamonow

[permalink] [raw]
Subject: [Regression?] Removed regulator support in ehci-omap

Hi, guys!

Can anyone explain why regulator support has been removed from ehci-omap
driver in commit 19403165 ("usb: host: omap: ehci and ohci simplification")[1]?
In 2.6.37/2.6.38 it was enough to apply simple patch[2] adding regulators
description to board file to make USB work on omap3evm board (because USB PHY
is powered via regulator). But now it won't work anymore in 2.6.39-rc2.
BTW, I suspect that this commit also broke USB on omap3pandora board, as it
defines "hsusb0" regulator supply in its board file:

[mad@madhouse linux-2.6]$ git grep hsusb arch/arm/mach-omap2/board*
arch/arm/mach-omap2/board-omap3pandora.c: REGULATOR_SUPPLY("hsusb0", "ehci

I can't find any clues in commit message on why regulators support was removed
and what should be used instead if this removal was intentional, so I'm a bit
puzzled about what to do now. Any help will be appreciated.

[1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=19403165c272cc4ed00c97973e7271714b009708
[2] http://arago-project.org/git/projects/?p=linux-omap3.git;a=commitdiff;h=2ec611981ad76256d5034ae36708d807142bed1c

--
Best regards,
Dmitry "MAD" Artamonow


2011-04-11 17:06:28

by Steve Calfee

[permalink] [raw]
Subject: Re: [Regression?] Removed regulator support in ehci-omap

On 04/11/11 02:32, Dmitry Artamonow wrote:
> Hi, guys!
>
> Can anyone explain why regulator support has been removed from ehci-omap
> driver in commit 19403165 ("usb: host: omap: ehci and ohci simplification")[1]?
> In 2.6.37/2.6.38 it was enough to apply simple patch[2] adding regulators
> description to board file to make USB work on omap3evm board (because USB PHY
> is powered via regulator). But now it won't work anymore in 2.6.39-rc2.
> BTW, I suspect that this commit also broke USB on omap3pandora board, as it
> defines "hsusb0" regulator supply in its board file:
>
Yes, And Beagleboard xm (and I suspect other beagleboard versions) has
been broken in 2.6.39rc1+.

Regards, Steve

2011-04-11 20:12:58

by Steve Sakoman

[permalink] [raw]
Subject: Re: [Regression?] Removed regulator support in ehci-omap

On Mon, Apr 11, 2011 at 10:06 AM, Steve Calfee <[email protected]> wrote:
> On 04/11/11 02:32, Dmitry Artamonow wrote:
>> Hi, guys!
>>
>> Can anyone explain why regulator support has been removed from ehci-omap
>> driver in commit 19403165 ("usb: host: omap: ehci and ohci simplification")[1]?
>> In 2.6.37/2.6.38 it was enough to apply simple patch[2] adding regulators
>> description to board file to make USB work on omap3evm board (because USB PHY
>> is powered via regulator). But now it won't work anymore in 2.6.39-rc2.
>> BTW, I suspect that this commit also broke USB on omap3pandora board, as it
>> defines "hsusb0" regulator supply in its board file:
>>
> Yes, And Beagleboard xm (and I suspect other beagleboard versions) has
> been broken in 2.6.39rc1+.

FWIW, EHCI is also broken on Overo in both rc1 and rc2.

Steve

2011-04-11 20:48:44

by Munegowda, Keshava

[permalink] [raw]
Subject: RE: [Regression?] Removed regulator support in ehci-omap

> -----Original Message-----
> From: Steve Sakoman [mailto:[email protected]]
> Sent: Tuesday, April 12, 2011 1:43 AM
> To: Steve Calfee
> Cc: Dmitry Artamonow; Keshava Munegowda; Felipe Balbi;
[email protected]; linux-
> [email protected]; [email protected]
> Subject: Re: [Regression?] Removed regulator support in ehci-omap
>
> On Mon, Apr 11, 2011 at 10:06 AM, Steve Calfee <[email protected]>
wrote:
> > On 04/11/11 02:32, Dmitry Artamonow wrote:
> >> Hi, guys!
> >>
> >> Can anyone explain why regulator support has been removed from
ehci-omap
> >> driver in commit 19403165 ("usb: host: omap: ehci and ohci
simplification")[1]?
> >> In 2.6.37/2.6.38 it was enough to apply simple patch[2] adding
regulators
> >> description to board file to make USB work on omap3evm board (because
USB PHY
> >> is powered via regulator). But now it won't work anymore in
2.6.39-rc2.
> >> BTW, I suspect that this commit also broke USB on omap3pandora board,
as it
> >> defines "hsusb0" regulator supply in its board file:
> >>
> > Yes, And Beagleboard xm (and I suspect other beagleboard versions) has
> > been broken in 2.6.39rc1+.
>
> FWIW, EHCI is also broken on Overo in both rc1 and rc2.
>
> Steve

Sorry guys! I will work on it coming week; currently I am in travel.

Well, regulator is not removed, its moved to usbhs core driver in
/driver/mfd/omap xx usb xxx host.c

Regards
Keshava Munegowda

2011-04-12 04:10:49

by Dmitry Artamonow

[permalink] [raw]
Subject: Re: [Regression?] Removed regulator support in ehci-omap

On 02:18 Tue 12 Apr , Keshava Munegowda wrote:
>
> Sorry guys! I will work on it coming week; currently I am in travel.
>
> Well, regulator is not removed, its moved to usbhs core driver in
> /driver/mfd/omap xx usb xxx host.c

Ah, so EHCI/OHCI common code was moved into drivers/mfd... Good.
But seems regulators support was lost somewhere during transition - the
only mentioning about regulators in omap-usb-host.c is "#include" :

mad@macmini:~/kernel-hack/linux-2.6(master)$ grep -i regulator drivers/mfd/omap-usb-host.c
#include <linux/regulator/consumer.h>
mad@macmini:~/kernel-hack/linux-2.6(master)$

--
Best regards,
Dmitry "MAD" Artamonow

2011-04-12 16:20:23

by Munegowda, Keshava

[permalink] [raw]
Subject: RE: [Regression?] Removed regulator support in ehci-omap

> -----Original Message-----
> From: Dmitry Artamonow [mailto:[email protected]]
> Sent: Tuesday, April 12, 2011 9:41 AM
> To: Keshava Munegowda
> Cc: Steve Sakoman; Steve Calfee; Felipe Balbi;
[email protected]; [email protected];
> [email protected]
> Subject: Re: [Regression?] Removed regulator support in ehci-omap
>
> On 02:18 Tue 12 Apr , Keshava Munegowda wrote:
> >
> > Sorry guys! I will work on it coming week; currently I am in travel.
> >
> > Well, regulator is not removed, its moved to usbhs core driver in
> > /driver/mfd/omap xx usb xxx host.c
>
> Ah, so EHCI/OHCI common code was moved into drivers/mfd... Good.
> But seems regulators support was lost somewhere during transition - the
> only mentioning about regulators in omap-usb-host.c is "#include" :
>
> mad@macmini:~/kernel-hack/linux-2.6(master)$ grep -i regulator
drivers/mfd/omap-usb-host.c
> #include <linux/regulator/consumer.h>
> mad@macmini:~/kernel-hack/linux-2.6(master)$
>
> --
> Best regards,
> Dmitry "MAD" Artamonow

Thanks ! I will add some time next week!

Keshava Munegowda

2011-04-22 01:10:40

by Alan Ott

[permalink] [raw]
Subject: Re: [Regression?] Removed regulator support in ehci-omap

On 04/12/2011 12:20 PM, Keshava Munegowda wrote:
>> Ah, so EHCI/OHCI common code was moved into drivers/mfd... Good.
>> But seems regulators support was lost somewhere during transition - the
>> only mentioning about regulators in omap-usb-host.c is "#include" :
>>
>> mad@macmini:~/kernel-hack/linux-2.6(master)$ grep -i regulator
> drivers/mfd/omap-usb-host.c
> Thanks ! I will add some time next week!

I have confirmed this on my BeagleBoard-xM. 2.6.38 works, but the
2.6.39-rc4+ head from yesterday did not. It seems that the regulator
does not turn the power on for the USB hub which the ethernet is
attached to.

I connected this issue to bug 33092 in bugzilla[1].

Alan.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=33092


Attachments:
signature.asc (554.00 B)
OpenPGP digital signature

2011-04-24 06:37:50

by Munegowda, Keshava

[permalink] [raw]
Subject: RE: [Regression?] Removed regulator support in ehci-omap

> -----Original Message-----
> From: Alan Ott [mailto:[email protected]]
> Sent: Friday, April 22, 2011 6:41 AM
> To: Keshava Munegowda
> Cc: Dmitry Artamonow; Steve Sakoman; Steve Calfee; Felipe Balbi;
[email protected]; linux-
> [email protected]; [email protected]
> Subject: Re: [Regression?] Removed regulator support in ehci-omap
>
> On 04/12/2011 12:20 PM, Keshava Munegowda wrote:
> >> Ah, so EHCI/OHCI common code was moved into drivers/mfd... Good.
> >> But seems regulators support was lost somewhere during transition -
the
> >> only mentioning about regulators in omap-usb-host.c is "#include" :
> >>
> >> mad@macmini:~/kernel-hack/linux-2.6(master)$ grep -i regulator
> > drivers/mfd/omap-usb-host.c
> > Thanks ! I will add some time next week!
>
> I have confirmed this on my BeagleBoard-xM. 2.6.38 works, but the
> 2.6.39-rc4+ head from yesterday did not. It seems that the regulator
> does not turn the power on for the USB hub which the ethernet is
> attached to.
>
> I connected this issue to bug 33092 in bugzilla[1].
>
> Alan.
>
> [1] https://bugzilla.kernel.org/show_bug.cgi?id=33092

I have posted the patches on April 22, 2011.
If possible I request you to test this.

Keshava Munegowda

2011-04-25 14:11:25

by Alan Ott

[permalink] [raw]
Subject: Re: [Regression?] Removed regulator support in ehci-omap

On 04/24/2011 02:37 AM, Keshava Munegowda wrote:
>> -----Original Message-----
>> From: Alan Ott [mailto:[email protected]]
>> Sent: Friday, April 22, 2011 6:41 AM
>> To: Keshava Munegowda
>> Cc: Dmitry Artamonow; Steve Sakoman; Steve Calfee; Felipe Balbi;
> [email protected]; linux-
>> [email protected]; [email protected]
>> Subject: Re: [Regression?] Removed regulator support in ehci-omap
>>
>> On 04/12/2011 12:20 PM, Keshava Munegowda wrote:
>>>> Ah, so EHCI/OHCI common code was moved into drivers/mfd... Good.
>>>> But seems regulators support was lost somewhere during transition -
> the
>>>> only mentioning about regulators in omap-usb-host.c is "#include" :
>>>>
>>>> mad@macmini:~/kernel-hack/linux-2.6(master)$ grep -i regulator
>>> drivers/mfd/omap-usb-host.c
>>> Thanks ! I will add some time next week!
>> I have confirmed this on my BeagleBoard-xM. 2.6.38 works, but the
>> 2.6.39-rc4+ head from yesterday did not. It seems that the regulator
>> does not turn the power on for the USB hub which the ethernet is
>> attached to.
>>
>> I connected this issue to bug 33092 in bugzilla[1].
>>
>> Alan.
>>
>> [1] https://bugzilla.kernel.org/show_bug.cgi?id=33092
> I have posted the patches on April 22, 2011.
> If possible I request you to test this.

Hi Keshava,

If you mean this patch[1], then I tested it against the head and it
didn't fix my problem. I couldn't convince myself that your patch was
supposed to be the whole fix to my problem (since it wasn't mentioned on
this thread) so I didn't reply with my findings. Sorry about that.

Thanks for taking a look,

Alan.

[1] http://www.spinics.net/lists/linux-usb/msg45618.html



Attachments:
signature.asc (554.00 B)
OpenPGP digital signature

2011-04-25 14:16:26

by Steve Sakoman

[permalink] [raw]
Subject: Re: [Regression?] Removed regulator support in ehci-omap

On Mon, Apr 25, 2011 at 7:11 AM, Alan Ott <[email protected]> wrote:
> On 04/24/2011 02:37 AM, Keshava Munegowda wrote:
>>> -----Original Message-----
>>> From: Alan Ott [mailto:[email protected]]
>>> Sent: Friday, April 22, 2011 6:41 AM
>>> To: Keshava Munegowda
>>> Cc: Dmitry Artamonow; Steve Sakoman; Steve Calfee; Felipe Balbi;
>> [email protected]; linux-
>>> [email protected]; [email protected]
>>> Subject: Re: [Regression?] Removed regulator support in ehci-omap
>>>
>>> On 04/12/2011 12:20 PM, Keshava Munegowda wrote:
>>>>> Ah, so EHCI/OHCI common code was moved into drivers/mfd... Good.
>>>>> But seems regulators support was lost somewhere during transition -
>> the
>>>>> only mentioning about regulators in omap-usb-host.c is "#include" :
>>>>>
>>>>> mad@macmini:~/kernel-hack/linux-2.6(master)$ grep -i regulator
>>>> drivers/mfd/omap-usb-host.c
>>>> Thanks ! I will add some time next week!
>>> I have confirmed this on my BeagleBoard-xM. 2.6.38 works, but the
>>> 2.6.39-rc4+ head from yesterday did not. It seems that the regulator
>>> does not turn the power on for the USB hub which the ethernet is
>>> attached to.
>>>
>>> I connected this issue to bug 33092 in bugzilla[1].
>>>
>>> Alan.
>>>
>>> [1] https://bugzilla.kernel.org/show_bug.cgi?id=33092
>> I have posted the patches on April 22, 2011.
>> If possible I request you to test this.
>
> Hi Keshava,
>
> If you mean this patch[1], then I tested it against the head and it
> didn't fix my problem. I couldn't convince myself that your patch was
> supposed to be the whole fix to my problem (since it wasn't mentioned on
> this thread) so I didn't reply with my findings. Sorry about that.

Same here. The real issue (at least for Overo) turned out to be:

https://lkml.org/lkml/2011/4/14/45

Steve

2011-04-25 16:43:12

by Munegowda, Keshava

[permalink] [raw]
Subject: RE: [Regression?] Removed regulator support in ehci-omap

> -----Original Message-----
> From: Steve Sakoman [mailto:[email protected]]
> Sent: Monday, April 25, 2011 7:46 PM
> To: Alan Ott
> Cc: Keshava Munegowda; Dmitry Artamonow; Steve Calfee; Felipe Balbi;
[email protected];
> [email protected]; [email protected]
> Subject: Re: [Regression?] Removed regulator support in ehci-omap
>
> On Mon, Apr 25, 2011 at 7:11 AM, Alan Ott <[email protected]> wrote:
> > On 04/24/2011 02:37 AM, Keshava Munegowda wrote:
> >>> -----Original Message-----
> >>> From: Alan Ott [mailto:[email protected]]
> >>> Sent: Friday, April 22, 2011 6:41 AM
> >>> To: Keshava Munegowda
> >>> Cc: Dmitry Artamonow; Steve Sakoman; Steve Calfee; Felipe Balbi;
> >> [email protected]; linux-
> >>> [email protected]; [email protected]
> >>> Subject: Re: [Regression?] Removed regulator support in ehci-omap
> >>>
> >>> On 04/12/2011 12:20 PM, Keshava Munegowda wrote:
> >>>>> Ah, so EHCI/OHCI common code was moved into drivers/mfd... Good.
> >>>>> But seems regulators support was lost somewhere during transition
-
> >> the
> >>>>> only mentioning about regulators in omap-usb-host.c is "#include"
:
> >>>>>
> >>>>> mad@macmini:~/kernel-hack/linux-2.6(master)$ grep -i regulator
> >>>> drivers/mfd/omap-usb-host.c
> >>>> Thanks ! I will add some time next week!
> >>> I have confirmed this on my BeagleBoard-xM. 2.6.38 works, but the
> >>> 2.6.39-rc4+ head from yesterday did not. It seems that the regulator
> >>> does not turn the power on for the USB hub which the ethernet is
> >>> attached to.
> >>>
> >>> I connected this issue to bug 33092 in bugzilla[1].
> >>>
> >>> Alan.
> >>>
> >>> [1] https://bugzilla.kernel.org/show_bug.cgi?id=33092
> >> I have posted the patches on April 22, 2011.
> >> If possible I request you to test this.
> >
> > Hi Keshava,
> >
> > If you mean this patch[1], then I tested it against the head and it
> > didn't fix my problem. I couldn't convince myself that your patch was
> > supposed to be the whole fix to my problem (since it wasn't mentioned
on
> > this thread) so I didn't reply with my findings. Sorry about that.
>
> Same here. The real issue (at least for Overo) turned out to be:
>
> https://lkml.org/lkml/2011/4/14/45
>
> Steve

But, I was not aware of the fix of the link:
https://lkml.org/lkml/2011/4/14/45
Sorry for this.
Same fix works for beagle-XM and I have tested this.

2011-04-27 11:51:39

by Dmitry Artamonow

[permalink] [raw]
Subject: Re: [Regression?] Removed regulator support in ehci-omap

On 12:07 Sun 24 Apr , Keshava Munegowda wrote:
> I have posted the patches on April 22, 2011.
> If possible I request you to test this.

Hi, Keshava!

Sorry for delay - it took some time to find _where_ exactly you have posted
the patch (thanks to Alan for giving the link). Anyway, it[1] seems to work
as advertised (I also applied GPIO polarity fix [2] and board file patch[3],
all on top of 2.6.39-rc4) - at least stuff in /sys/class/regulator looks right,
and USB devices are detected. There's probably something still missing in the
board file, as USB detection starts to work only if I booted TI's kernel
(that came with board) before trying patched 2.6.39-rc4, but I hope that
this isn't connected to this regulators issue.

[1] http://www.spinics.net/lists/linux-usb/msg45618.html
[2] https://lkml.org/lkml/2011/4/14/45
[3] http://arago-project.org/git/projects/?p=linux-omap3.git;a=commitdiff;h=2ec611981ad76256d5034ae36708d807142bed1c

--
Best regards,
Dmitry "MAD" Artamonow

2011-04-27 14:53:17

by Munegowda, Keshava

[permalink] [raw]
Subject: Re: [Regression?] Removed regulator support in ehci-omap

On Wed, Apr 27, 2011 at 5:21 PM, Dmitry Artamonow <[email protected]> wrote:
> On 12:07 Sun 24 Apr ? ? , Keshava Munegowda wrote:
>> I have posted the patches on April 22, 2011.
>> If possible I request you to test this.
>
> Hi, Keshava!
>
> Sorry for delay - it took some time to find _where_ exactly you have posted
> the patch (thanks to Alan for giving the link). Anyway, it[1] seems to work
> as advertised (I also applied GPIO polarity fix [2] and board file patch[3],
> all on top of 2.6.39-rc4) - at least stuff in /sys/class/regulator looks right,
> and USB devices are detected. There's probably something still missing in the
> board file, as USB detection starts to work only if I booted TI's kernel
> (that came with board) before trying patched 2.6.39-rc4, but I hope that
> this isn't connected to this regulators issue.
>
> [1] http://www.spinics.net/lists/linux-usb/msg45618.html
> [2] https://lkml.org/lkml/2011/4/14/45
> [3] http://arago-project.org/git/projects/?p=linux-omap3.git;a=commitdiff;h=2ec611981ad76256d5034ae36708d807142bed1c
>> --
> Best regards,
> Dmitry "MAD" Artamonow

I think I am missing something here! In which platform are you testing?
keshava munegowda

>
>