[U-Boot] R: R: USB EHCI driver

Mike Timmons michael.joseph.timmons at gmail.com
Sun Aug 16 21:51:31 CEST 2009


All,
I'm having trouble resetting my USB (virtual) root port hub following high
speed handshake on the 5121e using USB0+UTMI on the mpc5121e. If anyone has
any idea why root port hub reset typically fails, please advise. Thanks!

Francesco,

Thank you for your efforts on usb for the 5121e! I took your patch last week
and applied it to u-boot-2009.06 the patch wasn't a perfect fit for some
reason, but it was easy enough for me to extract the code from your patch
file. What version did you intend the patch for, if not u-boot-2009.06?

Regardless, I'm using a custom board based off the the ADS512101 board. I
complete your initialization step and it appears I get the 5121e registers
mapped correctly. "USB start" looks for devices, and I do see debug output
to the console when I have a USB memory stick plugged in.

I also have a USB analyzer, so I can see some action on the bus. However...

It appears I am failing to reset the root port hub after the high-speed
handshake between host and device (memory stick).

My degree of USB ignorance is a painful limitation at this point. I'm
tripping-through specs, the register set, and getting somewhat familiar with
the sequencing, but I'm grinding my gears at this point.

I attach a console log dump. A snippet of the log appears below, showing
where/why the reset fails. I also attach a screen snap of my USB analyzer
showing that some action is occurring on the wire between the host and the
device (memory stick).

This root port hub reset issue appears to be killing any subsequent device
discovery efforts. I DID try the hack of ignoring the reset failure to see
what happens. In this case I do see "2 devices" detected in the console log
(root hub plus my stick I presume), but I see no additional bus traffic on
the analyzer so I figure the reset failure is my smoking gun.


Any ideas?




console log snippet (see attached full console log dump)

hub_port_reset: resetting port 0...
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x1 length
0x0
req=3 (0x3), type=35 (0x23), value=4, index=1
Len is 0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length
0x4
req=0 (0x0), type=163 (0xa3), value=0, index=1
portstatus 101, change 13, 12 Mb/s
STAT_C_CONNECTION = 1 STAT_CONNECTION = 1  USB_PORT_STAT_ENABLE 0
cannot reset port 1!?
port 1 reset change
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x14 index 0x1
length 0x
0
req=1 (0x1), type=35 (0x23), value=20, index=1
Len is 0
1 USB Device(s) found
       scanning bus for storage devices... i=0
i=1
0 Storage Device(s) found
=>

FULL LOG...

usb start
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... New Device 0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0
length 0
x8
req=6 (0x6), type=128 (0x80), value=256, index=0
USB_DT_DEVICE request
set address 1
usb_control_msg: request: 0x5, requesttype: 0x0, value 0x1 index 0x0 length
0x0
req=5 (0x5), type=0 (0x0), value=1, index=0
USB_REQ_SET_ADDRESS
Len is 0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0
length 0
x12
req=6 (0x6), type=128 (0x80), value=256, index=0
USB_DT_DEVICE request
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0
length 0
x9
req=6 (0x6), type=128 (0x80), value=512, index=0
USB_DT_CONFIG config
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0
length 0
x19
req=6 (0x6), type=128 (0x80), value=512, index=0
USB_DT_CONFIG config
get_conf_no 0 Result 25, wLength 25
if 0, ep 0
##EP epmaxpacketin[1] = 2048
set configuration 1
usb_control_msg: request: 0x9, requesttype: 0x0, value 0x1 index 0x0 length
0x0
req=9 (0x9), type=0 (0x0), value=1, index=0
USB_REQ_SET_CONFIGURATION
Len is 0
new device strings: Mfr=1, Product=2, SerialNumber=0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x300 index 0x0
length 0
xFF
req=6 (0x6), type=128 (0x80), value=768, index=0
USB_DT_STRING config
USB device number 1 default language ID 0x1
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x301 index 0x1
length 0
xFF
req=6 (0x6), type=128 (0x80), value=769, index=1
USB_DT_STRING config
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x302 index 0x1
length 0
xFF
req=6 (0x6), type=128 (0x80), value=770, index=1
USB_DT_STRING config
Manufacturer u-boot
Product      EHCI Host Controller
SerialNumber
USB hub found
usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0
length
0x4
req=6 (0x6), type=160 (0xa0), value=10496, index=0
USB_DT_HUB config
usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0
length
0x8
req=6 (0x6), type=160 (0xa0), value=10496, index=0
USB_DT_HUB config
1 ports detected
ganged power switching
standalone hub
global over-current protection
power on to power good time: 510ms
hub controller current requirement: 0mA
port 1 is removable
usb_control_msg: request: 0x0, requesttype: 0xA0, value 0x0 index 0x0 length
0x4
req=0 (0x0), type=160 (0xa0), value=0, index=0
get_hub_status returned status 1, change 1
local power source is lost (inactive)
no over-current condition exists
enabling power on all ports
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x8 index 0x1 length
0x0
req=3 (0x3), type=35 (0x23), value=8, index=1
Len is 0
port 1 returns 0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length
0x4
req=0 (0x0), type=163 (0xa3), value=0, index=1
Port 1 Status 101 Change 11
port 1 connection change
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length
0x4
req=0 (0x0), type=163 (0xa3), value=0, index=1
portstatus 101, change 11, 12 Mb/s
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x10 index 0x1
length 0x
0
req=1 (0x1), type=35 (0x23), value=16, index=1
Len is 0
hub_port_reset: resetting port 0...
usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x1 length
0x0
req=3 (0x3), type=35 (0x23), value=4, index=1
Len is 0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1 length
0x4
req=0 (0x0), type=163 (0xa3), value=0, index=1
portstatus 101, change 13, 12 Mb/s
STAT_C_CONNECTION = 1 STAT_CONNECTION = 1  USB_PORT_STAT_ENABLE 0
cannot reset port 1!?
port 1 reset change
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x14 index 0x1
length 0x
0
req=1 (0x1), type=35 (0x23), value=20, index=1
Len is 0
1 USB Device(s) found
       scanning bus for storage devices... i=0
i=1
0 Storage Device(s) found
=>











On Wed, Jun 24, 2009 at 4:08 AM, Rendine Francesco <
Francesco.Rendine at valueteam.com> wrote:

> Hi,
>
> thanks for your compliments, but I think that there is some work to do
> about this driver to support OTG mode and gadget mode.
> For now I enabled support to host mode, and from my test does it work.
>
> I'm preparing the patch, and this will carry away some days because usb
> u-boot source code is been re-organized..
> I developed my patch on u-boot 2009.03, so I have to port my job on last
> u-boot version.
>
> Regards,
> Francesco
>
> -----Messaggio originale-----
> Da: Detlev Zundel [mailto:dzu at denx.de]
> Inviato: mer 6/24/2009 10:51
> A: Rendine Francesco
> Cc: Michael Trimarchi; Gupta Maneesh-B18878; u-boot at lists.denx.de
> Oggetto: Re: [U-Boot] R:  USB EHCI driver
>
> Hi Francesco,
>
> > I'm successful in provide a preliminary support to EHCI USB Freescale
> > controller integrated on ADS5121 platform.  I'm preparing a patch to
> > submit to u-boot mailing list.
>
> Congratulations - I'm also looking forward to see and test the patch on
> our ads5121.
>
> Cheers
>  Detlev
>
> --
> More than any other time in history, mankind faces a crossroads.  One
> path leads  to despair  and utter  hopelessness.   The other to total
> extinction.  Let us pray, we have the wisdom to choose correctly.
>                                        -- Woody Allen
> --
> DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
>


More information about the U-Boot mailing list