[U-Boot-Users] USB Storage Device(s) not found

Hello,
I'm just working on USB support for mips au1100 based board.
The problem is that when I do:
WWPC # usb start
I get:
... DEBUG: RET(rh) URB:[ 0] dev: 1,ep: 0-I,type:CTRL,len:4/4 stat:0x0 au1x00_usb_ohci.c: cmd(8): a3 00 00 00 02 00 04 00 au1x00_usb_ohci.c: data(4/4): 01 01 12 00 cannot reset port 2!? 1 USB Device(s) found scanning bus for storage devices... 0 Storage Device(s) found
An USB pen is into the USB host port and if I do:
WWPC # usb tree
I get:
Device Tree: 1 Hub (12MBit/s, 0mA) OHCI Root Hub
Since I have an au1100 I also modified the initialization code as follow:
diff --git a/cpu/mips/au1x00_usb_ohci.c b/cpu/mips/au1x00_usb_ohci.c index dbf72dc..97c5091 100644 --- a/cpu/mips/au1x00_usb_ohci.c +++ b/cpu/mips/au1x00_usb_ohci.c @@ -1581,6 +1582,7 @@ int usb_lowlevel_init(void) au_writel(sys_freqctrl, SYS_FREQCTRL0);
/* zero and disable USBH/USBD clocks */ +#if 0 sys_clksrc = au_readl(SYS_CLKSRC); sys_clksrc &= ~0x00007FE0; au_writel(sys_clksrc, SYS_CLKSRC); @@ -1590,6 +1592,17 @@ int usb_lowlevel_init(void)
sys_clksrc = au_readl(SYS_CLKSRC); sys_clksrc &= ~0x00007FE0; +#else + sys_clksrc = au_readl(SYS_CLKSRC); + sys_clksrc &= ~0x0000001F; + au_writel(sys_clksrc, SYS_CLKSRC); + + sys_freqctrl = au_readl(SYS_FREQCTRL0); + sys_freqctrl &= ~0xFFF00000; + + sys_clksrc = au_readl(SYS_CLKSRC); + sys_clksrc &= ~0x0000001F; +#endif
switch (prid & 0x000000FF) { case 0x00: /* DA */ @@ -1621,6 +1634,7 @@ int usb_lowlevel_init(void) /* * Route 48MHz FREQ2 into USB Host and/or Device */ +#if 0 sys_clksrc |= ((4<<12) | (0<<11) | (0<<10)); au_writel(sys_clksrc, SYS_CLKSRC);
@@ -1630,6 +1644,15 @@ int usb_lowlevel_init(void) au_writel(pin_func, SYS_PINFUNC); au_writel(0x2800, SYS_TRIOUTCLR); au_writel(0x0030, SYS_OUTPUTCLR); +#else + sys_clksrc |= ((4<<2) | (0<<1) | 0 ); + au_writel(sys_clksrc, SYS_CLKSRC); + + /* Set USB functionality pin state as device */ + pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8000); + pin_func &= ~0x8000; + au_writel(pin_func, SYS_PINFUNC); +#endif
dbg("OHCI board setup complete\n");
This code is the same that I use into Linux and it works correctly!
Someone have some suggestions? Have someone already used the USB support for mips boards? :-o
Thanks in advance,
Rodolfo

On Tue, Apr 11, 2006 at 04:51:09PM +0200, Rodolfo Giometti wrote:
I'm just working on USB support for mips au1100 based board.
After looking better at the code I found that file "cpu/mips/au1x00_usb_ohci.c" is derived from "cpu/arm920t/at91rm9200/usb_ohci.c". The differences are very minimal so I think the problem is during USB controller setup...
Doing:
(Re)start USB... USB: scanning bus for devices... USB device not responding, giving up (status=20) 2 USB Device(s) found scanning bus for storage devices... 0 Storage Device(s) found
so I think that the system found the USB key but cannot connect with it. In fact removing the USB pen the system say "1 USB Device(s) found".
May someone help me in understanding why this happens? I'm not a OpenHCI guru :) and perhaps some good suggestions may help me in finding the solution!
Thanks in advance,
Rodolfo
participants (1)
-
Rodolfo Giometti