* S3C6410 board (SmartQ 7) USB host issues
@ 2009-10-30 0:24 Maurus Cuelenaere
2009-10-30 0:36 ` Ben Dooks
0 siblings, 1 reply; 5+ messages in thread
From: Maurus Cuelenaere @ 2009-10-30 0:24 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
I'm working on getting mainline Linux working on the SmartQ 7, a Samsung
S3C6410 board.
I'm having issues getting USB host to work, when I try to attach a
device (Logitech mouse in this case) to it I get "device descriptor
read/64, error -62" errors. Then it gets a new address assigned and gets
back to the same error (this loops around 4 times, then Linux seems to
give up).
This board doesn't have a separate 48M clock source, so I'm currently
changing the USB host clock source to EPLL in my board config like this:
struct clk * usb_clock, * mout_epll;
usb_clock = clk_get(NULL, "usb-bus-host");
if(usb_clock == NULL) {
pr_err("%s: failed to get usb-bus-host clock\n", __func__);
return -ENXIO;
}
mout_epll = clk_get(NULL, "mout_epll");
if(mout_epll == NULL) {
pr_err("%s: failed to get mout_epll clock\n", __func__);
clk_put(usb_clock);
return -ENXIO;
}
/* setup clock */
clk_set_parent(usb_clock, mout_epll);
clk_set_rate(usb_clock, 48000000);
clk_put(usb_clock);
clk_put(mout_epll);
Any ideas what I could be doing wrong?
Thanks,
Maurus Cuelenaere
^ permalink raw reply [flat|nested] 5+ messages in thread
* S3C6410 board (SmartQ 7) USB host issues
2009-10-30 0:24 S3C6410 board (SmartQ 7) USB host issues Maurus Cuelenaere
@ 2009-10-30 0:36 ` Ben Dooks
2009-10-30 1:40 ` Maurus Cuelenaere
2009-10-30 2:25 ` jassi brar
0 siblings, 2 replies; 5+ messages in thread
From: Ben Dooks @ 2009-10-30 0:36 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Oct 30, 2009 at 01:24:32AM +0100, Maurus Cuelenaere wrote:
> Hi,
>
> I'm working on getting mainline Linux working on the SmartQ 7, a Samsung
> S3C6410 board.
>
> I'm having issues getting USB host to work, when I try to attach a
> device (Logitech mouse in this case) to it I get "device descriptor
> read/64, error -62" errors. Then it gets a new address assigned and gets
> back to the same error (this loops around 4 times, then Linux seems to
> give up).
That could be due to a number of things, such as:
1) Unstable clock (need to verify the clock below is happening)
2) Interface problems - does the board have the correct pull ups
3) Does the interface have power control that needs to be set?
> This board doesn't have a separate 48M clock source, so I'm currently
> changing the USB host clock source to EPLL in my board config like this:
What is the current EPLL rate?
> struct clk * usb_clock, * mout_epll;
>
> usb_clock = clk_get(NULL, "usb-bus-host");
> if(usb_clock == NULL) {
> pr_err("%s: failed to get usb-bus-host clock\n", __func__);
> return -ENXIO;
> }
> mout_epll = clk_get(NULL, "mout_epll");
> if(mout_epll == NULL) {
> pr_err("%s: failed to get mout_epll clock\n", __func__);
> clk_put(usb_clock);
> return -ENXIO;
> }
>
> /* setup clock */
> clk_set_parent(usb_clock, mout_epll);
> clk_set_rate(usb_clock, 48000000);
does clk_get_rate() here show 48MHz, or something 'close' ?
currently we do not have support for setting the EPLL, so you
may be getting a best-effort value from the divider chain.
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
^ permalink raw reply [flat|nested] 5+ messages in thread
* S3C6410 board (SmartQ 7) USB host issues
2009-10-30 0:36 ` Ben Dooks
@ 2009-10-30 1:40 ` Maurus Cuelenaere
2009-10-30 1:43 ` Ben Dooks
2009-10-30 2:25 ` jassi brar
1 sibling, 1 reply; 5+ messages in thread
From: Maurus Cuelenaere @ 2009-10-30 1:40 UTC (permalink / raw)
To: linux-arm-kernel
Op 30-10-09 01:36, Ben Dooks schreef:
> On Fri, Oct 30, 2009 at 01:24:32AM +0100, Maurus Cuelenaere wrote:
>
>> Hi,
>>
>> I'm working on getting mainline Linux working on the SmartQ 7, a Samsung
>> S3C6410 board.
>>
>> I'm having issues getting USB host to work, when I try to attach a
>> device (Logitech mouse in this case) to it I get "device descriptor
>> read/64, error -62" errors. Then it gets a new address assigned and gets
>> back to the same error (this loops around 4 times, then Linux seems to
>> give up).
>>
> That could be due to a number of things, such as:
>
> 1) Unstable clock (need to verify the clock below is happening)
> 2) Interface problems - does the board have the correct pull ups
> 3) Does the interface have power control that needs to be set?
>
It does, but I'm already enabling that.
>> This board doesn't have a separate 48M clock source, so I'm currently
>> changing the USB host clock source to EPLL in my board config like this:
>>
> What is the current EPLL rate?
>
>
>> struct clk * usb_clock, * mout_epll;
>>
>> usb_clock = clk_get(NULL, "usb-bus-host");
>> if(usb_clock == NULL) {
>> pr_err("%s: failed to get usb-bus-host clock\n", __func__);
>> return -ENXIO;
>> }
>> mout_epll = clk_get(NULL, "mout_epll");
>> if(mout_epll == NULL) {
>> pr_err("%s: failed to get mout_epll clock\n", __func__);
>> clk_put(usb_clock);
>> return -ENXIO;
>> }
>>
>> /* setup clock */
>> clk_set_parent(usb_clock, mout_epll);
>> clk_set_rate(usb_clock, 48000000);
>>
> does clk_get_rate() here show 48MHz, or something 'close' ?
>
> currently we do not have support for setting the EPLL, so you
> may be getting a best-effort value from the divider chain.
>
Looks like EPLL runs at 24Mhz, so I probably need to look into modifying
my bootloader to run it higher (the original firmware seems to run it at
192Mhz).
Also what's the preferred way of setting the USB host clock source:
doing this in the bootloader or in the Linux mach file?
Regards,
Maurus Cuelenaere
^ permalink raw reply [flat|nested] 5+ messages in thread
* S3C6410 board (SmartQ 7) USB host issues
2009-10-30 1:40 ` Maurus Cuelenaere
@ 2009-10-30 1:43 ` Ben Dooks
0 siblings, 0 replies; 5+ messages in thread
From: Ben Dooks @ 2009-10-30 1:43 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Oct 30, 2009 at 02:40:32AM +0100, Maurus Cuelenaere wrote:
> Op 30-10-09 01:36, Ben Dooks schreef:
> >On Fri, Oct 30, 2009 at 01:24:32AM +0100, Maurus Cuelenaere wrote:
> >
> >>Hi,
> >>
> >>I'm working on getting mainline Linux working on the SmartQ 7, a Samsung
> >>S3C6410 board.
> >>
> >>I'm having issues getting USB host to work, when I try to attach a
> >>device (Logitech mouse in this case) to it I get "device descriptor
> >>read/64, error -62" errors. Then it gets a new address assigned and gets
> >>back to the same error (this loops around 4 times, then Linux seems to
> >>give up).
> >>
> >That could be due to a number of things, such as:
> >
> >1) Unstable clock (need to verify the clock below is happening)
> >2) Interface problems - does the board have the correct pull ups
> >3) Does the interface have power control that needs to be set?
> >
>
> It does, but I'm already enabling that.
>
> >>This board doesn't have a separate 48M clock source, so I'm currently
> >>changing the USB host clock source to EPLL in my board config like this:
> >>
> >What is the current EPLL rate?
> >
> >
> >>struct clk * usb_clock, * mout_epll;
> >>
> >>usb_clock = clk_get(NULL, "usb-bus-host");
> >>if(usb_clock == NULL) {
> >> pr_err("%s: failed to get usb-bus-host clock\n", __func__);
> >> return -ENXIO;
> >>}
> >>mout_epll = clk_get(NULL, "mout_epll");
> >>if(mout_epll == NULL) {
> >> pr_err("%s: failed to get mout_epll clock\n", __func__);
> >> clk_put(usb_clock);
> >> return -ENXIO;
> >>}
> >>
> >>/* setup clock */
> >>clk_set_parent(usb_clock, mout_epll);
> >>clk_set_rate(usb_clock, 48000000);
> >>
> >does clk_get_rate() here show 48MHz, or something 'close' ?
> >
> >currently we do not have support for setting the EPLL, so you
> >may be getting a best-effort value from the divider chain.
> >
>
> Looks like EPLL runs at 24Mhz, so I probably need to look into modifying
> my bootloader to run it higher (the original firmware seems to run it at
> 192Mhz).
>
> Also what's the preferred way of setting the USB host clock source:
> doing this in the bootloader or in the Linux mach file?
I'm ok with either the bootloader or the machine init file doing it.
I'd say for the moment, look at getting the EPLL setup in the bootloader
and have it running at (say 192MHz) and then just ensure in mach-xxx.c
that the clocks are correct.
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
^ permalink raw reply [flat|nested] 5+ messages in thread
* S3C6410 board (SmartQ 7) USB host issues
2009-10-30 0:36 ` Ben Dooks
2009-10-30 1:40 ` Maurus Cuelenaere
@ 2009-10-30 2:25 ` jassi brar
1 sibling, 0 replies; 5+ messages in thread
From: jassi brar @ 2009-10-30 2:25 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Oct 30, 2009 at 9:36 AM, Ben Dooks <ben-linux@fluff.org> wrote:
> currently we do not have support for setting the EPLL, so you
> may be getting a best-effort value from the divider chain.
I did submit one patch for that.
http://lists.infradead.org/pipermail/linux-arm-kernel/2009-September/000806.html
Could someone please review it?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-10-30 2:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-30 0:24 S3C6410 board (SmartQ 7) USB host issues Maurus Cuelenaere
2009-10-30 0:36 ` Ben Dooks
2009-10-30 1:40 ` Maurus Cuelenaere
2009-10-30 1:43 ` Ben Dooks
2009-10-30 2:25 ` jassi brar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).