Hi, NXP Experts
Recently, We found some strange behaviors on our custom imx6ull board(based L5.4.70-2.3.0, U-Boot 2020.04) when accessing FAT32 U-disk in u-boot. Strange behaviors are that some U-disk acceesed ok while little some accessed fail, even in the same brand and some type. But those U-disk fail to access in u-boot can success to access when boot into linux.
In the following context we call those U-disk fail to access in u-boot as "bad U-disk".
With "bad U-disk" under u-boot, sometimes fail in enumerate stage like:
Bus usb@2184000: Port not available.
Bus usb@2184200: USB EHCI 1.00
scanning bus usb@2184200 for devices...
USB device not accepting new address (error=22)
1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
USB device tree:
1 Hub (480 Mb/s, 0mA)
u-boot EHCI Host Controller
sometimes fail in enumerate atage like:
Bus usb@2184000: Port not available.
Bus usb@2184200: USB EHCI 1.00
scanning bus usb@2184200 for devices... EHCI timed out on TD - token=0x1f8c80
EHCI timed out on TD - token=0x248d80
EHCI timed out on TD - token=0xd8d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x1f8c80
EHCI timed out on TD - token=0x248d80
EHCI timed out on TD - token=0xd8d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x1f8c80
EHCI timed out on TD - token=0x248d80
EHCI timed out on TD - token=0xd8d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x1f8c80
EHCI timed out on TD - token=0x248d80
EHCI timed out on TD - token=0xd8d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x1f8c80
EHCI timed out on TD - token=0x248d80
EHCI timed out on TD - token=0xd8d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
error in inquiry
2 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
USB device tree:
1 Hub (480 Mb/s, 0mA)
| u-boot EHCI Host Controller
|
+-2 Mass Storage (480 Mb/s, 300mA)
Kingston DataTraveler 3.0 E0D55E6CE776F4C158490B4F
and sometimes fail in access stage like:
resetting USB...
Bus usb@2184000: Port not available.
Bus usb@2184200: USB EHCI 1.00
scanning bus usb@2184200 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
USB device tree:
1 Hub (480 Mb/s, 0mA)
| u-boot EHCI Host Controller
|
+-2 Mass Storage (480 Mb/s, 300mA)
Kingston DataTraveler 3.0 E0D55E6CE776F4C158490B4F
6344536 bytes read in 237 ms (25.5 MiB/s)
45139 bytes read in 7 ms (6.1 MiB/s)
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x1f8c80
EHCI timed out on TD - token=0x128d80
EHCI timed out on TD - token=0xd8d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x1f8c80
EHCI timed out on TD - token=0xc008d80
EHCI timed out on TD - token=0xd8d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
It's rare to succeed with those "bad U-disk" under u-boot.
And We can reproduce the same issue in offical i.MX6ULL-EVK board also, and i have tried multiple reversion images included L5.4.70-2.3.0_images_MX6UL7D/LF_v5.15.71-2.2.0_images_IMX6UL7D/LF_v6.1.1_1.0.0_images_IMX6UL7D downloaded form offical website Here, all of those have the same issue.
Today i find a stable way to make the above "bad U-disk" be accessed stablely under u-boot. The way is as quickly as possible to stop u-boot count-down an run my udisk access command. But if i add "sleep 3" befoce my command U-disk can't be accessed.
Below are the steps on i.MX6ULL-EVK board with "bad U-disk" to reproduce the issue:
1. Connect debug console and prepare two command Button in SecureCRT. One of following command strings will be run when click a Button.
Button "fast-exec-sucess" command string is: \rusb reset && usb tree && fatload usb 0 80800000 vmlinuz && fatload usb 0 83000000 imx6ull.dtb && fatload usb 0 83800000 initrd.img\r
Button "delay-exec-fail" command string is: \rsleep 3 && usb reset && usb tree && fatload usb 0 80800000 vmlinuz && fatload usb 0 83000000 imx6ull.dtb && fatload usb 0 83800000 initrd.img\r
(the two command string almost the same except "sleep 3" ahead)

2. Prepare three files named vmlinuz(6.3MB)/imx6ull.dtb(45KB)/initrd.img(8MB)(files size may not need the same), and place under the root directory of U-disk;
3. Power the EVK board, and if click the Button "fast-exec-sucess" when u-boot count-down, and you can see sucess to access the U-disk each time, log like:
U-Boot 2020.04-5.4.70-2.3.0+ge42dee801e (Dec 04 2020 - 00:49:03 +0000)
CPU: i.MX6ULL rev1.1 792 MHz (running at 396 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 49C
Reset cause: POR
Model: i.MX6 ULL 14x14 EVK Board
Board: MX6ULL 14x14 EVK
DRAM: 512 MiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment
[*]-Video Link 0 (480 x 272)
[0] lcdif@21c8000, video
In: serial
Out: serial
Err: serial
switch to partitions #0, OK
mmc1 is current device
flash target is MMC:1
Net:
Error: ethernet@20b4000 address not set.
Error: ethernet@20b4000 address not set.
Error: ethernet@20b4000 address not set.
FEC: can't find phy-handle
Error: ethernet@20b4000 address not set.
Could not get PHY for FEC0: addr 2
Error: ethernet@20b4000 address not set.
FEC: can't find phy-handle
Error: ethernet@20b4000 address not set.
Could not get PHY for FEC0: addr 2
No ethernet found.
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 0
=> usb reset && usb tree && fatload usb 0 80800000 vmlinuz && fatload usb 0 83000000 imx6ull.dtb && fatload usb 0 83800000 initrd.img
resetting USB...
Bus usb@2184000: Port not available.
Bus usb@2184200: USB EHCI 1.00
scanning bus usb@2184200 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
USB device tree:
1 Hub (480 Mb/s, 0mA)
| u-boot EHCI Host Controller
|
+-2 Mass Storage (480 Mb/s, 300mA)
Kingston DataTraveler 3.0 E0D55E6CE776F4C158490B4F
6344536 bytes read in 226 ms (26.8 MiB/s)
45139 bytes read in 6 ms (7.2 MiB/s)
7939178 bytes read in 271 ms (27.9 MiB/s)
4. Power the EVK board, and if click the Button "delay-exec-fail" when u-boot count-down, and you can see fail to access the U-disk each time, log like:
U-Boot 2020.04-5.4.70-2.3.0+ge42dee801e (Dec 04 2020 - 00:49:03 +0000)
CPU: i.MX6ULL rev1.1 792 MHz (running at 396 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 50C
Reset cause: POR
Model: i.MX6 ULL 14x14 EVK Board
Board: MX6ULL 14x14 EVK
DRAM: 512 MiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment
[*]-Video Link 0 (480 x 272)
[0] lcdif@21c8000, video
In: serial
Out: serial
Err: serial
switch to partitions #0, OK
mmc1 is current device
flash target is MMC:1
Net:
Error: ethernet@20b4000 address not set.
Error: ethernet@20b4000 address not set.
Error: ethernet@20b4000 address not set.
FEC: can't find phy-handle
Error: ethernet@20b4000 address not set.
Could not get PHY for FEC0: addr 2
Error: ethernet@20b4000 address not set.
FEC: can't find phy-handle
Error: ethernet@20b4000 address not set.
Could not get PHY for FEC0: addr 2
No ethernet found.
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 0
=> sleep 3 && usb reset && usb tree && fatload usb 0 80800000 vmlinuz && fatload usb 0 83000000 imx6ull.dtb && fatload usb 0 83800000 initrd.img
resetting USB...
Bus usb@2184000: Port not available.
Bus usb@2184200: USB EHCI 1.00
scanning bus usb@2184200 for devices...
USB device not accepting new address (error=22)
1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
USB device tree:
1 Hub (480 Mb/s, 0mA)
u-boot EHCI Host Controller
=>
So i think there may be a bug in NXP u-boot and something related to USB of i.MX6ULL is changed after "sleep 3" second.
NXP Experts please check and fix it for us.
Thank you very much.