[U-Boot] am335x: musb: mass storage device issue
Stefan Roese
sr at denx.de
Tue Feb 14 06:57:22 UTC 2017
Hi Yegor,
On 13.02.2017 16:02, 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()
>
> This patch removes 2 mdelay(200) calls from usb_hub_port_connect_change().
> These delays don't seem to be necessary. At least not in my tests. Here
> the number for a custom x86 Bay Trail board (not in mainline yet) with
> a quite large and complex USB hub infrastructure.
>
> Without this patch:
> starting USB...
> USB0: USB EHCI 1.00
> scanning bus 0 for devices... 9 USB Device(s) found
>
> time: 28.415 seconds
>
> With this patch:
> starting USB...
> USB0: USB EHCI 1.00
> scanning bus 0 for devices... 9 USB Device(s) found
>
> time: 24.003 seconds
>
> So ~4.5 seconds of USB scanning time reduction.
>
> Signed-off-by: Stefan Roese <sr at denx.de>
> Cc: Simon Glass <sjg at chromium.org>
> Acked-by: Hans de Goede <hdegoede at redhat.com>
> Tested-by: Stephen Warren <swarren at nvidia.com>
> Cc: Marek Vasut <marex at denx.de>
Might be that an initial delay is missing for your specific host
controller. IIRC, we had a similar issue with the SoCPFGA also
not detecting all USB sticks with my USB scanning patches applied.
Please take a look at this patch:
2bf352f0 [usb: dwc2: Add delay to fix the USB detection problem
on SoCFPGA]
Perhaps you can do some tests with some initial delays as well?
Thanks,
Stefan
More information about the U-Boot
mailing list