diff mbox

usb: disable OTG AUTOIDLE only with omap3430

Message ID 1242658456-5723-1-git-send-email-ext-niilo.1.minkkinen@nokia.com (mailing list archive)
State Awaiting Upstream, archived
Delegated to: Felipe Balbi
Headers show

Commit Message

Niilo Minkkinen May 18, 2009, 2:54 p.m. UTC
Omap3 MUSB AUTOIDLE functionality configured through OTG_SYSCONFIG
register prevents the device from going into retention.
This is a workaround (by Richard Woodruff/TI), as his comment :
> A new MUSB bug which is a match to data below was identified very
> recently (on hardware and in simulation).
> This bug is in 3430 and not 3630.
> As a priority test (and as new default) you should have engineers
> disable autoidle for MUSB block.
> This is the workaround which will show up in next errata.

Signed-off-by: Niilo Minkkinen <ext-niilo.1.minkkinen@nokia.com>
---
 drivers/usb/musb/omap2430.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

Comments

Woodruff, Richard May 18, 2009, 7:23 p.m. UTC | #1
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> owner@vger.kernel.org] On Behalf Of Niilo Minkkinen
> Sent: Monday, May 18, 2009 9:54 AM

> Omap3 MUSB AUTOIDLE functionality configured through OTG_SYSCONFIG
> register prevents the device from going into retention.
> This is a workaround (by Richard Woodruff/TI), as his comment :
> > A new MUSB bug which is a match to data below was identified very
> > recently (on hardware and in simulation).
> > This bug is in 3430 and not 3630.
> > As a priority test (and as new default) you should have engineers
> > disable autoidle for MUSB block.
> > This is the workaround which will show up in next errata.
>
> Signed-off-by: Niilo Minkkinen <ext-niilo.1.minkkinen@nokia.com>

Signed-off-by: Richard Woodruff <r-woodruff2@ti.com>

Yes this is needed for 34xx. Side note is this cost around 1mW of power during active mode of MUSB. When device is not active cost is not significant.  System impact depends on duty cycle of MUSB in usecase.

Regards,
Richard W.

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kevin Hilman May 19, 2009, 4:57 p.m. UTC | #2
"Woodruff, Richard" <r-woodruff2@ti.com> writes:

>> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
>> owner@vger.kernel.org] On Behalf Of Niilo Minkkinen
>> Sent: Monday, May 18, 2009 9:54 AM
>
>> Omap3 MUSB AUTOIDLE functionality configured through OTG_SYSCONFIG
>> register prevents the device from going into retention.
>> This is a workaround (by Richard Woodruff/TI), as his comment :
>> > A new MUSB bug which is a match to data below was identified very
>> > recently (on hardware and in simulation).
>> > This bug is in 3430 and not 3630.
>> > As a priority test (and as new default) you should have engineers
>> > disable autoidle for MUSB block.
>> > This is the workaround which will show up in next errata.
>>
>> Signed-off-by: Niilo Minkkinen <ext-niilo.1.minkkinen@nokia.com>
>
> Signed-off-by: Richard Woodruff <r-woodruff2@ti.com>
>
> Yes this is needed for 34xx. Side note is this cost around 1mW of power during active mode of MUSB. When device is not active cost is not significant.  System impact depends on duty cycle of MUSB in usecase.
>

While this makes its way upstream, I'll pull into PM branch.

Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Brownell June 19, 2009, 10:35 a.m. UTC | #3
On Monday 18 May 2009, Woodruff, Richard wrote:
> 
> > From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> > owner@vger.kernel.org] On Behalf Of Niilo Minkkinen
> > Sent: Monday, May 18, 2009 9:54 AM
> 
> > Omap3 MUSB AUTOIDLE functionality configured through OTG_SYSCONFIG
> > register prevents the device from going into retention.
> > This is a workaround (by Richard Woodruff/TI), as his comment :
> > > A new MUSB bug which is a match to data below was identified very
> > > recently (on hardware and in simulation).
> > > This bug is in 3430 and not 3630.
> > > As a priority test (and as new default) you should have engineers
> > > disable autoidle for MUSB block.
> > > This is the workaround which will show up in next errata.
> >
> > Signed-off-by: Niilo Minkkinen <ext-niilo.1.minkkinen@nokia.com>
> 
> Signed-off-by: Richard Woodruff <r-woodruff2@ti.com>
> 
> Yes this is needed for 34xx. Side note is this cost around 1mW of power
> during active mode of MUSB. When device is not active cost is not
> significant.  System impact depends on duty cycle of MUSB in usecase.  

There's also some initialization goofiness in that code ... it's supposed
to set initialize the transceiver with several distinct writes, of which
setting AUTOIDLE (to auto-gate the L3 clock) is ISTR the last step.

The goofiness shows up with OTG initialization, which is documented as
needing a slightly different sequence ... my notes have it as being
an extra write to set ENABLEFORCE.

- Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Niilo Minkkinen June 19, 2009, 4:45 p.m. UTC | #4
Things considering tranceiver suspend/wakeup are welcom, cause it
seems to be mysteric, how to operate with. Sometimes clock aren't
shutoff in suspend. Sometimes, wakeup is not succesfull.

On 6/19/09, David Brownell <david-b@pacbell.net> wrote:
> On Monday 18 May 2009, Woodruff, Richard wrote:
>>
>> > From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
>> > owner@vger.kernel.org] On Behalf Of Niilo Minkkinen
>> > Sent: Monday, May 18, 2009 9:54 AM
>>
>> > Omap3 MUSB AUTOIDLE functionality configured through OTG_SYSCONFIG
>> > register prevents the device from going into retention.
>> > This is a workaround (by Richard Woodruff/TI), as his comment :
>> > > A new MUSB bug which is a match to data below was identified very
>> > > recently (on hardware and in simulation).
>> > > This bug is in 3430 and not 3630.
>> > > As a priority test (and as new default) you should have engineers
>> > > disable autoidle for MUSB block.
>> > > This is the workaround which will show up in next errata.
>> >
>> > Signed-off-by: Niilo Minkkinen <ext-niilo.1.minkkinen@nokia.com>
>>
>> Signed-off-by: Richard Woodruff <r-woodruff2@ti.com>
>>
>> Yes this is needed for 34xx. Side note is this cost around 1mW of power
>> during active mode of MUSB. When device is not active cost is not
>> significant.  System impact depends on duty cycle of MUSB in usecase.
>
> There's also some initialization goofiness in that code ... it's supposed
> to set initialize the transceiver with several distinct writes, of which
> setting AUTOIDLE (to auto-gate the L3 clock) is ISTR the last step.
>
> The goofiness shows up with OTG initialization, which is documented as
> needing a slightly different sequence ... my notes have it as being
> an extra write to set ENABLEFORCE.
>
> - Dave
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
diff mbox

Patch

diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 901dffd..396fc6d 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -241,7 +241,12 @@  int __init musb_platform_init(struct musb *musb)
 	l &= ~AUTOIDLE;		/* disable auto idle */
 	l &= ~NOIDLE;		/* remove possible noidle */
 	l |= SMARTIDLE;		/* enable smart idle */
-	l |= AUTOIDLE;		/* enable auto idle */
+	/*
+	 * MUSB AUTOIDLE don't work in 3430.
+	 * Workaround by Richard Woodruff/TI
+	 */
+	if (!cpu_is_omap3430())
+		l |= AUTOIDLE;		/* enable auto idle */
 	omap_writel(l, OTG_SYSCONFIG);
 
 	l = omap_readl(OTG_INTERFSEL);