[U-Boot] USB port detection problem1

Balaji N balajinpmeet at gmail.com
Mon Nov 24 11:12:50 CET 2014


Hi All,

In board, we have 2 USB controllers and the first port with USB Mass
storage is detected without any problem
and 2nd Controller with USB Mass storage is not detected properly.
Sometimes it is detecting and sometimes, it is not detecting.

In U-Boot version U-Boot 2011.12, When detect the USB, got the below errors:

U-Boot>> usb start
(Re)start USB...
USB:   Active port:     1
Register 10011 NbrPorts 1
USB EHCI 1.00
*scanning bus for devices... port(0) reset error*
*port(0) reset error*
*port(0) reset error*
*port(0) reset error*
*port(0) reset error*
*cannot reset port 1!?*
1 USB Device(s) found
       scanning bus for storage devices... 0 Storage Device(s) found

When USB works, the output is:

U-Boot>> usb start
(Re)start USB...
USB:   Active port:     1
Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 2 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
U-Boot>> usb info
1: Hub,  USB Revision 2.0
 - u-boot EHCI Host Controller
 - Class: Hub
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x0000  Product 0x0000 Version 1.0
   Configuration: 1
   - Interfaces: 1 Self Powered 0mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 1
     - Class Hub
     - Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Mass Storage,  USB Revision 2.0
 - JetFlash Mass Storage Device K5Z75Z3O
 - Class: (from Interface) Mass Storage
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x8564  Product 0x1000 Version 1.0
   Configuration: 1
   - Interfaces: 1 Bus Powered 200mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 2
     - Class Mass Storage, Transp. SCSI, Bulk only
     - Endpoint 1 Out Bulk MaxPacket 512
     - Endpoint 2 In Bulk MaxPacket 512

Please help on this.

When enable the debug printf(), then the error messages is:

U-Boot>> usb start
(Re)start USB...
USB:   Active port:     1
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 0x40
set address 1
usb_control_msg: request: 0x5, requesttype: 0x0, value 0x1 index 0x0 length
0x0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0
length 0x12
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0
length 0x9
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x200 index 0x0
length 0x19
get_conf_no 0 Result 25, wLength 25
if 0, ep 0
##EP epmaxpacketin[1] = 8
set configuration 1
usb_control_msg: request: 0x9, requesttype: 0x0, value 0x1 index 0x0 length
0x0
new device strings: Mfr=1, Product=2, SerialNumber=0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x300 index 0x0
length 0xFF
USB device number 1 default language ID 0x1
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x301 index 0x1
length 0xFF
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x302 index 0x1
length 0xFF
Manufacturer u-boot
Product      EHCI Host Controller
SerialNumber
USB hub found
usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0
length 0x4
usb_control_msg: request: 0x6, requesttype: 0xA0, value 0x2900 index 0x0
length 0x8
1 ports detected
individual port power switching
standalone hub
global over-current protection
power on to power good time: 20ms
hub controller current requirement: 0mA
port 1 is removable
usb_control_msg: request: 0x0, requesttype: 0xA0, value 0x0 index 0x0
length 0x4
get_hub_status returned status 1, change 8101
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
port 1 returns 0
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1
length 0x4
Port 1 Status 101 Change 1
port 1 connection change
usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1
length 0x4
portstatus 101, change 1, 12 Mb/s
usb_control_msg: request: 0x1, requesttype: 0x23, value 0x10 index 0x1
length 0x0
*hub_port_reset: resetting port 0...*
*usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x1
length 0x0*
*port(0) reset error*
*usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1
length 0x4*
*portstatus 111, change 0, 12 Mb/s*
*STAT_C_CONNECTION = 0 STAT_CONNECTION = 1  USB_PORT_STAT_ENABLE 0*
*usb_control_msg: request: 0x3, requesttype: 0x23, value 0x4 index 0x1
length 0x0*
*usb_control_msg: request: 0x0, requesttype: 0xA3, value 0x0 index 0x1
length 0x4*
*portstatus 101, change 13, 12 Mb/s*
*STAT_C_CONNECTION = 1 STAT_CONNECTION = 1  USB_PORT_STAT_ENABLE 0*
*cannot reset port 1!?*
1 USB Device(s) found
scan end
       scanning bus for storage devices... 0 Storage Device(s) found

In 2nd Controller, USB Mass storage detection is inconsistent.  Need to
test this in U-Boot version U-Boot 2011.12.

-Thanks,
Balaji N


More information about the U-Boot mailing list