Firefly Open Source Community

Title: USB is not working in U-BOOT [Print This Page]

Author: v.redin    Time: 8/23/2022 16:29
Title: USB is not working in U-BOOT
I met a problem with USB BOOT in U-BOOT. The screenshot shows that even according to the default defconfig, USB storages should work correctly on the board. USB SCAN shows that it sees keyboards and mice, but USB STORAGE DEVICE is always 0. I have a flash drive with a power diode and I see that it is not even powered. In Linux, all flash drives are visible. Tried different flash drives. It is in u-boot that flash drives do not work and I cannot understand why. I need USB BOOT and now I can't figure out how to provide it?
file:///home/firefly/Pictures/Screenshot%20from%202022-08-23%2011-07-49.png

Screenshot from 2022-08-23 11-07-49.png (82.4 KB, Down times: 71)

Screenshot from 2022-08-23 11-07-49.png

Author: v.redin    Time: 8/30/2022 19:35
Please, help us - I tried everything I could - USB is not working in u-boot completely. 3 devices that it found with USB start command - is not my devices. U-BOOT cannot find no one USB device.
Author: neutionwei    Time: 9/1/2022 10:08
Hi, You mean USB SCAN cannot find no one USB storage device?
Author: neutionwei    Time: 9/1/2022 10:13
  1. => usb stop
  2. stopping USB..
  3. => usb start
  4. starting USB...
  5. Bus usb@fc000000: usb maximum-speed not found
  6. Register 2000140 NbrPorts 2
  7. Starting the controller
  8. USB XHCI 1.10
  9. Bus usb@fc800000: USB EHCI 1.00
  10. Bus usb@fc840000: USB OHCI 1.0
  11. Bus usb@fc880000: USB EHCI 1.00
  12. Bus usb@fc8c0000: USB OHCI 1.0
  13. Bus usb@fc400000: usb maximum-speed not found
  14. Register 2000140 NbrPorts 2
  15. Starting the controller
  16. USB XHCI 1.10
  17. scanning bus usb@fc000000 for devices... 1 USB Device(s) found
  18. scanning bus usb@fc800000 for devices... GUID Partition Table Header signature is wrong: 0x988200009881 != 0x5452415020494645
  19. 2 USB Device(s) found
  20. scanning bus usb@fc840000 for devices... 1 USB Device(s) found
  21. scanning bus usb@fc880000 for devices... WARN: interface 0 has 2 endpoint descriptor, different from the interface descriptor's value: 1
  22. 2 USB Device(s) found
  23. scanning bus usb@fc8c0000 for devices... 1 USB Device(s) found
  24. scanning bus usb@fc400000 for devices... WARN: interface 0 has 2 endpoint descriptor, different from the interface descriptor's value: 1
  25. 5 USB Device(s) found
  26.        scanning usb for storage devices... 1 Storage Device(s) found
  27. =>
  28. => usb tree
  29. USB device tree:
  30.   1  Hub (5 Gb/s, 0mA)
  31.      U-Boot XHCI Host Controller
  32.    
  33.   1  Hub (480 Mb/s, 0mA)
  34.   |  u-boot EHCI Host Controller
  35.   |
  36.   +-2  Mass Storage (480 Mb/s, 100mA)
  37.        AI210 Mass Storage
  38.      
  39.   1  Hub (12 Mb/s, 0mA)
  40.       U-Boot Root Hub
  41.    
  42.   1  Hub (480 Mb/s, 0mA)
  43.   |  u-boot EHCI Host Controller
  44.   |
  45.   +-2  Hub (480 Mb/s, 100mA)
  46.         USB 2.0 Hub [MTT]
  47.      
  48.   1  Hub (12 Mb/s, 0mA)
  49.       U-Boot Root Hub
  50.    
  51.   1  Hub (5 Gb/s, 0mA)
  52.   |  U-Boot XHCI Host Controller
  53.   |
  54.   +-2  Hub (480 Mb/s, 0mA)
  55.   | |  GenesysLogic USB2.1 Hub
  56.   | |
  57.   | +-4  Human Interface (1.5 Mb/s, 100mA)
  58.   | |      USB Keyboard
  59.   | |  
  60.   | +-5  Human Interface (1.5 Mb/s, 100mA)
  61.   |      PixArt USB Optical Mouse
  62.   |   
  63.   +-3  Hub (5 Gb/s, 0mA)
  64.        GenesysLogic USB3.2 Hub
  65.      
  66. =>
Copy the code

Author: v.redin    Time: 9/1/2022 15:19
Hmm, strange. On my board USB cannot find anything - no one device.
I'll try on SDK 1.0.1b, but is not compiling because of u-boot sector exceed approved size. I can fix it with defconfig and parameter.txt fixing but i afraid that it could brake some needed hardcoded addresses - that is why I only talk it to you.
I tried to fix it in my SDK but meet another problem - if I flash only u-boot on my sdcard - there is no one SCAN is working. And I can't find why? Maybe there is something needed for u-boot but missing in u-boot partition?
What should I flash on sdcard to get full working u-boot?
Author: v.redin    Time: 9/1/2022 16:30
Last edited by v.redin In 9/1/2022 17:07 Editor

I tried to flash MISC too but it was not helped...

Author: neutionwei    Time: 9/1/2022 20:36
how to flash u-boot on my sdcard? use rockusb cmd?
Author: neutionwei    Time: 9/1/2022 20:42
your sdcard
Author: v.redin    Time: 9/1/2022 22:53
No, I'm using dd
Author: v.redin    Time: 9/1/2022 22:54
And I can't understand where should I provide DTB for u-boot to see it
Author: neutionwei    Time: 9/2/2022 09:09
dd£żI have not tried this method, generally I use "rockusb 0 mmc 0", and then use linux upgrade_tool to flash uboot.img.
Author: v.redin    Time: 9/2/2022 17:20
Thank you - I will try!
Author: v.redin    Time: 9/2/2022 17:45
Can you tell me, do rockusb upgrade only emmc, or I can use it to upgrade u-boot in SD card too?
On my plate now I must not touch EMMC, because of production is here... I afraid to brake it... Linux upgrade tool docs are in Chinese and I can't read this.
Author: v.redin    Time: 9/5/2022 17:20
We clearly see that there is no power to devices connected via USB, and if you power the USB device from the outside, it is seen in U-BOOT. In Linux power works fine. Tested on revision boards 1.0 and 1.1 and on different versions of SDK - 1.0.0 and 1.0.1.
Author: v.redin    Time: 9/6/2022 19:07
NVME is not working in U-BOOT too (n o power. I tried to compare linux DTS and u-boot DTS and found that there is no powers applied for USB or NVME. Now I try to enable power due to kernel DTS, but it is not working now




Welcome Firefly Open Source Community (https://bbs.t-firefly.com/) Powered by Discuz! X3.1