diff mbox

[4/5] ARM: tegra: paz00: add clocks required for usb operation

Message ID 76f31183766f1edce1230a925ced1c986dbdf028.1312742856.git.marvin24@gmx.de (mailing list archive)
State New, archived
Headers show

Commit Message

Marc Dietrich Aug. 7, 2011, 7 p.m. UTC
These clocks are required for usb operation.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
---
 arch/arm/mach-tegra/board-paz00.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Comments

Stephen Warren Aug. 8, 2011, 4:57 p.m. UTC | #1
Marc Dietrich wrote at Sunday, August 07, 2011 1:01 PM:
> These clocks are required for usb operation.
...
> diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
...
> @@ -145,6 +145,11 @@ static __initdata struct tegra_clk_init_table paz00_clk_init_table[] = {
>  	/* name		parent		rate		enabled */
>  	{ "uarta",	"pll_p",	216000000,	true },
>  	{ "uartd",	"pll_p",	216000000,	true },
> +
> +	{ "pll_a",      "pll_p_out1",   56448000,       true },
> +	{ "pll_a_out0", "pll_a",        11289600,       true },

Are you sure those two are required for USB operation; they're typically
used for audio. Of course, this might just be a bug in the commit
description:-) Although, if you are attempting to enable audio, there's
a bunch more stuff that'd need to be done, including some more clock
setup.
Marc Dietrich Aug. 8, 2011, 5:18 p.m. UTC | #2
Hi Stephen,

On Monday 08 August 2011 18:57:52 Stephen Warren wrote:
> Marc Dietrich wrote at Sunday, August 07, 2011 1:01 PM:
> > These clocks are required for usb operation.
> 
> ...
> 
> > diff --git a/arch/arm/mach-tegra/board-paz00.c
> > b/arch/arm/mach-tegra/board-paz00.c
> 
> ...
> 
> > @@ -145,6 +145,11 @@ static __initdata struct tegra_clk_init_table
> > paz00_clk_init_table[] = {
> > 
> >  	/* name		parent		rate		enabled */
> >  	{ "uarta",	"pll_p",	216000000,	true },
> >  	{ "uartd",	"pll_p",	216000000,	true },
> > 
> > +
> > +	{ "pll_a",      "pll_p_out1",   56448000,       true },
> > +	{ "pll_a_out0", "pll_a",        11289600,       true },
> 
> Are you sure those two are required for USB operation; they're typically
> used for audio. Of course, this might just be a bug in the commit
> description:-) Although, if you are attempting to enable audio, there's
> a bunch more stuff that'd need to be done, including some more clock
> setup.

Sorry, no audio yet :-( 

But yes, you are right. I just found them by trial-and-error method, so somehow 
these creeped in. So I guess that the *_a* stands for audio?

Corrected patch coming soon.

Thanks

Marc
Stephen Warren Aug. 8, 2011, 5:38 p.m. UTC | #3
Marc Dietrich wrote at Monday, August 08, 2011 11:19 AM:
> Hi Stephen,
> 
> On Monday 08 August 2011 18:57:52 Stephen Warren wrote:
> > Marc Dietrich wrote at Sunday, August 07, 2011 1:01 PM:
> > > These clocks are required for usb operation.
> >
> > ...
> >
> > > diff --git a/arch/arm/mach-tegra/board-paz00.c
> > > b/arch/arm/mach-tegra/board-paz00.c
> >
> > ...
> >
> > > @@ -145,6 +145,11 @@ static __initdata struct tegra_clk_init_table
> > > paz00_clk_init_table[] = {
> > >
> > >  	/* name		parent		rate		enabled */
> > >  	{ "uarta",	"pll_p",	216000000,	true },
> > >  	{ "uartd",	"pll_p",	216000000,	true },
> > >
> > > +
> > > +	{ "pll_a",      "pll_p_out1",   56448000,       true },
> > > +	{ "pll_a_out0", "pll_a",        11289600,       true },
> >
> > Are you sure those two are required for USB operation; they're typically
> > used for audio. Of course, this might just be a bug in the commit
> > description:-) Although, if you are attempting to enable audio, there's
> > a bunch more stuff that'd need to be done, including some more clock
> > setup.
> 
> Sorry, no audio yet :-(
> 
> But yes, you are right. I just found them by trial-and-error method, so somehow
> these creeped in. So I guess that the *_a* stands for audio?

Yes, that's the typical use of pll_a.

> Corrected patch coming soon.

+	{ "pll_p_out4", "pll_p",        24000000,       true },

Oh, and looking at the patches I recently posted to add USB support to
Harmony and Seaboard, which have been in the ChromeOS kernel for a while,
the USB clocks entries are typically e.g.:

        { "usbd",       "clk_m",        12000000,       true},
        { "usb3",       "clk_m",        12000000,       true},

Our internal Android kernel uses the same parent/rate setup for Harmony
too.

(there's a "usb2" too if you need; one per controller, so it depends which
are used on the AC100)
Marc Dietrich Aug. 8, 2011, 9:15 p.m. UTC | #4
Am Montag 08 August 2011, 19:38:25 schrieb Stephen Warren:
> Marc Dietrich wrote at Monday, August 08, 2011 11:19 AM:
> > On Monday 08 August 2011 18:57:52 Stephen Warren wrote:
> 
> +	{ "pll_p_out4", "pll_p",        24000000,       true },
> 
> Oh, and looking at the patches I recently posted to add USB support to
> Harmony and Seaboard, which have been in the ChromeOS kernel for a while,
> the USB clocks entries are typically e.g.:
> 
>         { "usbd",       "clk_m",        12000000,       true},
>         { "usb3",       "clk_m",        12000000,       true},
> 
> Our internal Android kernel uses the same parent/rate setup for Harmony
> too.
> 
> (there's a "usb2" too if you need; one per controller, so it depends which
> are used on the AC100)

Seems we are using all three ports (including fsl_udc for debugging). I left 
them out because they seem to be switched on automaticly (either via the 
bootloader or via the tegra-ehci driver).

On the other hand, we want to move to u-boot sooner or later so I think it's 
better to enable them now.

Marc
diff mbox

Patch

diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index 45111f6..8a2d1ce 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -145,6 +145,11 @@  static __initdata struct tegra_clk_init_table paz00_clk_init_table[] = {
 	/* name		parent		rate		enabled */
 	{ "uarta",	"pll_p",	216000000,	true },
 	{ "uartd",	"pll_p",	216000000,	true },
+
+	{ "pll_a",      "pll_p_out1",   56448000,       true },
+	{ "pll_a_out0", "pll_a",        11289600,       true },
+	{ "pll_p_out4", "pll_p",        24000000,       true },
+
 	{ NULL,		NULL,		0,		0},
 };