imx6D uboot usb read issue

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

imx6D uboot usb read issue

3,797 次查看
jiujinhong
Contributor IV

Hi,

I met issue with USB R/W in bootloader. the program try to read 512M each, sometime it will fail with EHCI timeout, sometime it will success. I want to know if BSP pass USB large file R/W test or not.

If you can give some advice, please let me know, thanks.

U-Boot 2015.04-g45172a2 (Apr 18 2018 - 13:58:32)f

CPU:   Freescale i.MX6D rev1.5 at 792 MHz
CPU:   Temperature 54 C
Reset cause: POR
Board: MX6-SabreSD
I2C:   ready
DRAM:  2 GiB
PMIC:  PFUZE100 ID=0x10
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
*** Warning - bad CRC, using default environment

No panel detected: default to Hannstar-XGA
Display: Hannstar-XGA (1024x768)
In:    serial
Out:   serial
Err:   serial
flash target is MMC:2
Fastboot: Normal
Net:   Phy 1 not found
FEC [PRIME]
Error: FEC address not set.

starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
reading IMX6.bin
512 bytes read in 48 ms (9.8 KiB/s)
[UBOOT],200,77c00
[BOOTIMG],77e00,9c3800
[RECOVERY],a3b600,c26800
[SYSTEM],1661e00,1fc7b8b0
[VENDOR],212dd800,b6cb544
download uboot...
switch to partitions #1, OK
mmc2(part 1) is current device

MMC read: dev # 2, block # 0, count 2 ... 2 blocks read: OK
reading IMX6.bin
490496 bytes read in 92 ms (5.1 MiB/s)

MMC erase: dev # 2, block # 0, count 1024 ... 1024 blocks erased: OK

MMC write: dev # 2, block # 0, count 1024 ... 1024 blocks written: OK
download uboot success
switch to partitions #0, OK
mmc2(part 0) is current device

Partition Map for MMC device 2  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     16384           65536           00000000-01     83
  2     81920           65536           00000000-02     83
  3     147456          7024640         00000000-03     05 Extd
  4     7172096         53899264        00000000-04     83
  5     147457          3760127         00000000-05     83
  6     3907585         1048575         00000000-06     83
  7     4956161         16383           00000000-07     83
  8     4972545         8191            00000000-08     83
  9     4980737         4095            00000000-09     83
 10     4984833         4095            00000000-0a     83
 11     4988929         2047            00000000-0b     83
 12     4990977         2047            00000000-0c     83
 13     4993025         2097151         00000000-0d     83
download boot...
reading IMX6.bin
10237952 bytes read in 375 ms (26 MiB/s)

MMC erase: dev # 2, block # 16384, count 65536 ... 65536 blocks erased: OK

MMC write: dev # 2, block # 16384, count 65536 ... 65536 blocks written: OK
download boot success
download recovery...
reading IMX6.bin
12740608 bytes read in 462 ms (26.3 MiB/s)

MMC erase: dev # 2, block # 81920, count 65536 ... 65536 blocks erased: OK

MMC write: dev # 2, block # 81920, count 65536 ... 65536 blocks written: OK
download recovery success
download system...

MMC read: dev # 2, block # 147456, count 1 ... 1 blocks read: OK

MMC erase: dev # 2, block # 147456, count 3760128 ... 3760128 blocks erased: OK

MMC write: dev # 2, block # 147456, count 1 ... 1 blocks written: OK
download ...6%
reading IMX6.bin
EHCI timed out on TD - token=0x2c008d80
EHCI timed out on TD - token=0x2c008d80
EHCI timed out on TD - token=0x9c008d80
EHCI timed out on TD - token=0x128d80
EHCI timed out on TD - token=0xce008d80
EHCI timed out on TD - token=0x128d80
EHCI timed out on TD - token=0xcc008d80
EHCI timed out on TD - token=0x128d80
EHCI timed out on TD - token=0xbc008d80
EHCI timed out on TD - token=0x128d80
EHCI timed out on TD - token=0xbc008d80
EHCI timed out on TD - token=0x128d80
EHCI timed out on TD - token=0xbc008d80
EHCI timed out on TD - token=0x128d80
EHCI timed out on TD - token=0xbc008d80
EHCI timed out on TD - token=0x128d80
Error reading cluster
** Unable to read file IMX6.bin **
fatload usb 0 reserved system img failed
download vendor...

MMC read: dev # 2, block # 4993024, count 1 ... 1 blocks read: OK

MMC erase: dev # 2, block # 4993024, count 2097152 ... 2097152 blocks erased: OK

MMC write: dev # 2, block # 4993024, count 1 ... 1 blocks written: OK
download ...65%
EHCI timed out on TD - token=0x2008d80
EHCI timed out on TD - token=0x128d80
EHCI timed out on TD - token=0x2008d80
EHCI timed out on TD - token=0x128d80
EHCI timed out on TD - token=0x2008d80
EHCI timed out on TD - token=0x128d80
** Can't read partition table on 0:0 **
** Invalid partition 1 **
fatload usb 0 reserved vendor img failed
download ...100%
Please plug out usb mass strorage, and reset the board
8

U-Boot 2015.04-g45172a2 (Apr 18 2018 - 13:58:32)

CPU:   Freescale i.MX6D rev1.5 at 792 MHz
CPU:   Temperature 54 C
Reset cause: POR
Board: MX6-SabreSD
I2C:   ready
DRAM:  2 GiB
PMIC:  PFUZE100 ID=0x10
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
*** Warning - bad CRC, using default environment

No panel detected: default to Hannstar-XGA
Display: Hannstar-XGA (1024x768)
In:    serial
Out:   serial
Err:   serial
flash target is MMC:2
Fastboot: Normal
Net:   Phy 1 not found
FEC [PRIME]
Error: FEC address not set.

starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
reading IMX6.bin
512 bytes read in 48 ms (9.8 KiB/s)
[UBOOT],200,77c00
[BOOTIMG],77e00,9c3800
[RECOVERY],a3b600,c26800
[SYSTEM],1661e00,1fc7b8b0
download uboot...
switch to partitions #1, OK
mmc2(part 1) is current device

MMC read: dev # 2, block # 0, count 2 ... 2 blocks read: OK
reading IMX6.bin
490496 bytes read in 93 ms (5 MiB/s)

MMC erase: dev # 2, block # 0, count 1024 ... 1024 blocks erased: OK

MMC write: dev # 2, block # 0, count 1024 ... 1024 blocks written: OK
download uboot success
switch to partitions #0, OK
mmc2(part 0) is current device

Partition Map for MMC device 2  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     16384           65536           00000000-01     83
  2     81920           65536           00000000-02     83
  3     147456          7024640         00000000-03     05 Extd
  4     7172096         53899264        00000000-04     83
  5     147457          3760127         00000000-05     83
  6     3907585         1048575         00000000-06     83
  7     4956161         16383           00000000-07     83
  8     4972545         8191            00000000-08     83
  9     4980737         4095            00000000-09     83
 10     4984833         4095            00000000-0a     83
 11     4988929         2047            00000000-0b     83
 12     4990977         2047            00000000-0c     83
 13     4993025         2097151         00000000-0d     83
download boot...
reading IMX6.bin
10237952 bytes read in 390 ms (25 MiB/s)

MMC erase: dev # 2, block # 16384, count 65536 ... 65536 blocks erased: OK

MMC write: dev # 2, block # 16384, count 65536 ... 65536 blocks written: OK
download boot success
download recovery...
reading IMX6.bin
12740608 bytes read in 478 ms (25.4 MiB/s)

MMC erase: dev # 2, block # 81920, count 65536 ... 65536 blocks erased: OK

MMC write: dev # 2, block # 81920, count 65536 ... 65536 blocks written: OK
download recovery success
download system...

MMC read: dev # 2, block # 147456, count 1 ... 1 blocks read: OK

MMC erase: dev # 2, block # 147456, count 3760128 ... 3760128 blocks erased: OK

MMC write: dev # 2, block # 147456, count 1 ... 1 blocks written: OK
download ...6%
reading IMX6.bin
533182640 bytes read in 16436 ms (30.9 MiB/s)

MMC write: dev # 2, block # 147457, count 1041372 ... 1041372 blocks written: OK
download ...60%
download vendor...
vendor img is not exist to be download
download ...100%
Please plug out usb mass strorage, and reset the board

标签 (4)
0 项奖励
回复
6 回复数

2,919 次查看
jiujinhong
Contributor IV
0 项奖励
回复

2,919 次查看
igorpadykov
NXP Employee
NXP Employee

Hi jiu

issue may be caused by communications problems due to

noise or weak signal. One can try tests described in I.MX6/7 Series USB Certification Guide

http://www.nxp.com/assets/documents/data/en/user-guides/IMXUSBCGUG.pdf 

USB layout in sect.3.12 USB recommendations i.MX6 System Development User’s Guide

https://www.nxp.com/docs/en/user-guide/IMX6DQ6SDLHDG.pdf

Best regards
igor

0 项奖励
回复

2,919 次查看
jiujinhong
Contributor IV

Hi igor, i have imx6d/6q/6dl boards and made test in 6dl board, it is very stable. So, can you give some good advice?

0 项奖励
回复

2,919 次查看
jiujinhong
Contributor IV

Hi Igor, this issue generated by U-boot otg driver, Linux OTG driver is very stable. I am very sure that fsl U-Boot 2015.04 BSP didn't test some large file READ/WRITE through usb otg.

0 项奖励
回复

2,919 次查看
jiujinhong
Contributor IV

We are sure that fsl bsp has some issue to support USB R/W with large files.  In the beginning, we found that EHCI will timeout if read 64MB/128MB file. later, we applied patch from google, it can R/W successfully in most of time.

0 项奖励
回复

2,919 次查看
jiujinhong
Contributor IV

Hi Sir,

I need to suggestion for SW, not some others. It seems that this issue can be easily caused by some disk. Some udisk seems stable.

my usbdisk info:


=> usb reset
resetting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
=> 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.10
 - SanDisk Ultra USB 3.0 4C530001271225121470
 - Class: (from Interface) Mass Storage
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x0781  Product 0x5591 Version 1.0
   Configuration: 1
   - Interfaces: 1 Bus Powered 224mA
     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

0 项奖励
回复