[U-Boot] am335x: musb: mass storage device issue

Jonathan Gray jsg at jsg.id.au
Tue Feb 14 02:30:21 UTC 2017


On Mon, Feb 13, 2017 at 04:02:31PM +0100, Yegor Yefremov wrote:
> On Mon, Feb 13, 2017 at 3:17 PM, Belisko Marek <marek.belisko at gmail.com> wrote:
> > Hi Yegor,
> >
> > On Mon, Feb 13, 2017 at 12:57 PM, Yegor Yefremov
> > <yegorslists at googlemail.com> wrote:
> >>
> >> My am335x based board doesn't detect USB sticks:
> >>
> >> U-Boot 2017.03-rc1 (Feb 13 2017 - 12:46:54 +0100)
> >>
> >> CPU  : AM335X-GP rev 2.1
> >> I2C:   ready
> >> DRAM:  256 MiB
> >> NAND:  256 MiB
> >> MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
> >> Using default environment
> >>
> >> Net:   <ethaddr> not set. Validating first E-fuse MAC
> >> cpsw
> >> Hit any key to stop autoboot:  0
> >> => usb reset
> >> resetting USB...
> >> USB0:   scanning bus 0 for devices... 2 USB Device(s) found
> >>        scanning usb for storage devices... 0 Storage Device(s) found
> >>
> >>
> >> => usb tree
> >> USB device tree:
> >>   1  Hub (480 Mb/s, 100mA)
> >>   |   USB2.0 Hub
> >>   |
> >>   +-2  Vendor specific (480 Mb/s, 500mA)
> >>        Quectel, Incorporated UMTS/HSPA Module
> >>
> >> U-Boot finds a hub and a 3g modem attached to it, but the USB drive,
> >> that is also attached to this hub won't be detected.
> >
> >  maybe stupid reply but did you test on other board or with other usb
> > device? I can check on BBB in the evening
> > and post findings.
> 
> And please provide your u-boot version.
> 
> >> So far I haven't tried to bisect the issue (have to find a working
> >> commit including my board), but the same setup is working for 2014.07
> >> u-boot. Am I the only one or are other am335x based also affected?
> 
> Bisect result:
> 
> 2ef117fe4fce4e1af282ac2bbb0be36c41d15e2b is the first bad commit
> commit 2ef117fe4fce4e1af282ac2bbb0be36c41d15e2b
> Author: Stefan Roese <sr at denx.de>
> Date:   Tue Mar 15 13:59:13 2016 +0100
> 
>     usb: Remove 200 ms delay in usb_hub_port_connect_change()

I had hoped that reverting this patch would allow u-boot to work with
more usb flash drives on the raspberry pi 3 (with dwc2), but it still
seems to have trouble with devices that are recognised by the OpenBSD
kernel when plugged in after boot.

One such drive works on some boots and not others.

U-Boot 2017.03-rc2-00003-g920fd97b26-dirty (Feb 14 2017 - 13:09:05 +1100)

DRAM:  944 MiB
RPI 3 Model B (0xa02082)
MMC:   bcm2835_sdhci: 0
reading uboot.env

** Unable to read "uboot.env" from mmc0:1 **
Using default environment

In:    serial
Out:   lcd
Err:   lcd
Net:   Net Initialization Skipped
No ethernet found.
starting USB...
USB0:   Core Release: 2.80a
scanning bus 0 for devices... 4 USB Device(s) found
       scanning usb for storage devices... Device NOT ready
   Request Sense returned 00 00 00
1 Storage Device(s) found
       scanning usb for ethernet devices...
Warning: sms0 failed to set MAC address
Warning: failed to set MAC address
1 Ethernet Device(s) found
Hit any key to stop autoboot:  0
U-Boot> usb storage
  Device 0: Vendor:          Rev: PMAP Prod: USB DISK 2.0
            Type: Removable Hard Disk
            Capacity: not available
U-Boot> usb info
1: Hub,  USB Revision 1.10
 -  U-Boot Root Hub
 - Class: Hub
 - PacketSize: 8  Configurations: 1
 - Vendor: 0x0000  Product 0x0000 Version 0.0
   Configuration: 1
   - Interfaces: 1 Self Powered 0mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 1
     - Class Hub
     - Endpoint 1 In Interrupt MaxPacket 2 Interval 255ms

2: Hub,  USB Revision 2.0
 - Class: Hub
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x0424  Product 0x9514 Version 2.0
   Configuration: 1
   - Interfaces: 1 Self Powered Remote Wakeup 2mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 1
     - Class Hub
     - Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms
     - Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

3: Vendor specific,  USB Revision 2.0
 - Class: Vendor specific
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x0424  Product 0xec00 Version 2.0
   Configuration: 1
   - Interfaces: 1 Self Powered Remote Wakeup 2mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 3
     - Class Vendor specific
     - Endpoint 1 In Bulk MaxPacket 512
     - Endpoint 2 Out Bulk MaxPacket 512
     - Endpoint 3 In Interrupt MaxPacket 16 Interval 4ms

4: Mass Storage,  USB Revision 2.0
 -          USB DISK 2.0 07951F00AFAE0166
 - Class: (from Interface) Mass Storage
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x13fe  Product 0x3200 Version 1.16
   Configuration: 1
   - Interfaces: 1 Bus Powered 200mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 2
     - Class Mass Storage, Transp. SCSI, Bulk only
     - Endpoint 1 In Bulk MaxPacket 512
     - Endpoint 2 Out Bulk MaxPacket 512

U-Boot> usb tree
USB device tree:
  1  Hub (480 Mb/s, 0mA)
  |   U-Boot Root Hub 
  |
  +-2  Hub (480 Mb/s, 2mA)
    |
    +-3  Vendor specific (480 Mb/s, 2mA)
    |  
    +-4  Mass Storage (480 Mb/s, 200mA)
                  USB DISK 2.0 07951F00AFAE0166


More information about the U-Boot mailing list