need help booting off USB 3.0 HDD/SSD
#1
Exclamation 
For the past week I've been trying to get this board to actually boot off a usb attached drive. Here's where I am:

- compiled my own u-boot following instructions here: https://forum.pine64.org/showthread.php?...9#pid55839
- tried so many ayufan and other u-boot (like https://forum.pine64.org/showthread.php?...+usb+3+3.0) I can't keep track anymore
- I have a seagate backup drive + usb 3.0 to sata interface, a JMS578/567 (sold officially by pine too?), and another weird Toshiba (Bus 002 Device 015: ID 0480:a00c Toshiba America Inc) usb 3.0 to sata interface
- upgraded firmware on the JMS578/567 from another SBC forum

There is no common theme among u-boot versions:
- some will power-cycle the usb 2.0 drive to death, some will only do it 2-3 times.
- Some will detect my seagate (external power) usb to sata interface, some won't.
- USB 2.0 is more likely to detect something connected to it, but it doesn't boot. It's just stuck before the point where it should say "Starting kernel...". While using Toshiba interface, the hard drive powers off after the kernel selection prompt.

Now here's the nut-kicker:
- I have a sandisk extreme usb 3.0 thumbdrive which *DOES* boot off of usb 3.0 with *some* u-boot versions. So that confirms usb 3.0 port is fine, and the image I'm trying to boot is also fine.

What I believe I ruled out:
- damaged HDD/SSD
- non-working usb to sata interfaces
- inadequate power supply to rockpro64: I can duplicate all of the above with a 12V 1.5A as well as a 12V 3.5A brick. I'm sure I can rig up a 12V 25A from a desktop power supply if that's going to make some of you obsessed people happy (IRC people kept pestering me about this being power related). On top of that, on a fully booted system (from sd card), anything I throw in the usb ports gets adequate power and works
- shit linux images; I'm able to boot the same image(s) off of the usb thumbdrive connected to usb 3.0
- usb port damage (I can see all devices connected to usb 3.0 A, both usb 2.0 ports, cannot test usb-c, no dongle/device)

I also tried a sata_sil24 compatible card; u-boot sees it but it doesn't go any further than that. Drives connected to the PCIe eSATA (Sonnet Tempo SATA E2P) do not power on while in u-boot, but they will power on and get discovered once a linux kernel is booted. I'm guessing u-boot inadequate sata_sil24 drivers?

I don't know much about grub, or uboot, or compiling my own kernels but I can follow directions.


Code:
# This is u-boot from this dude: https://forum.pine64.org/showthread.php?tid=8685&highlight=boot+usb+3+3.0
# but not the official release, the latest compiled stuff

U-Boot SPL 2020.10-07965-g0ce9b07852 (Oct 12 2020 - 21:45:42 +0000)
Trying to boot from SPI
NOTICE:  BL31: v2.3(release):v2.3-797-g7ad39818b
NOTICE:  BL31: Built : 21:43:53, Oct 12 2020


U-Boot 2020.10-07965-g0ce9b07852 (Oct 12 2020 - 21:45:42 +0000)

SoC: Rockchip rk3399
Reset cause: POR
Model: Pine64 RockPro64 v2.1
DRAM:  3.9 GiB
PMIC:  RK808
MMC:   mmc@fe310000: 2, mmc@fe320000: 1, sdhci@fe330000: 0
Loading Environment from SPIFlash... SF: Detected gd25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   vidconsole
Err:   vidconsole
Model: Pine64 RockPro64 v2.1
Net:   eth0: ethernet@fe300000
starting USB...
Bus usb@fe380000: USB EHCI 1.00
Bus usb@fe3a0000: USB OHCI 1.0
Bus usb@fe3c0000: USB EHCI 1.00
Bus usb@fe3e0000: USB OHCI 1.0
Bus dwc3: usb maximum-speed not found
Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@fe380000 for devices... 1 USB Device(s) found
scanning bus usb@fe3a0000 for devices... 1 USB Device(s) found
scanning bus usb@fe3c0000 for devices... 1 USB Device(s) found
scanning bus usb@fe3e0000 for devices... 2 USB Device(s) found
scanning bus dwc3 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
Hit any key to stop autoboot:  0
Card did not respond to voltage select!
Card did not respond to voltage select!
PCIe link training gen1 timeout!

Device 0: unknown device
failed to find ep-gpios property
scanning bus for devices...

Device 0: unknown device

Device 0: Vendor: TOSHIBA Rev: 5438 Prod: External USB 3.0
            Type: Hard Disk
            Capacity: 476940.0 MB = 465.7 GB (976773164 x 512)
... is now current device
Scanning usb 0:7...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
1055 bytes read in 45 ms (22.5 KiB/s)
select kernel
1:    kernel-4.4.190-1233-rockchip-ayufan-gd3f1be0ed310
2:    kernel-4.4.190-1233-rockchip-ayufan-gd3f1be0ed310-memtest
Enter choice: 1:    kernel-4.4.190-1233-rockchip-ayufan-gd3f1be0ed310
Retrieving file: /boot/initrd.img-4.4.190-1233-rockchip-ayufan-gd3f1be0ed310
5140884 bytes read in 74 ms (66.3 MiB/s)
Retrieving file: /boot/vmlinuz-4.4.190-1233-rockchip-ayufan-gd3f1be0ed310
20545544 bytes read in 220 ms (89.1 MiB/s)
append: rw panic=10 init=/sbin/init coherent_pool=1M ethaddr=2e:68:c4:77:e9:11 eth1addr= serial=f671f593e6dba571
cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1 root=LABEL=linux-root rootwait rootfstype=ext4
Retrieving file: /boot/dtbs/4.4.190-1233-rockchip-ayufan-gd3f1be0ed310/rockchip/rk3399-rockpro64.dtb
96273 bytes read in 58 ms (1.6 MiB/s)
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000

# ^ this is where it halts. No loading kernel.

# This is U-boot I compiled using instructions linked above, same PS, same drive connected to usb 3.0
# via the toshiba interface. Booting with Pins 20&21 bridged to bypass SPI

U-Boot TPL 2020.10-00787-g7ec87e4192 (Oct 21 2020 - 11:07:54)
Channel 0: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Channel 1: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
256B stride
lpddr4_set_rate: change freq to 400000000 mhz 0, 1
lpddr4_set_rate: change freq to 800000000 mhz 1, 0
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2020.10-00787-g7ec87e4192 (Oct 21 2020 - 11:07:54 -0400)
Trying to boot from MMC1


U-Boot 2020.10-00787-g7ec87e4192 (Oct 21 2020 - 11:07:54 -0400)

SoC: Rockchip rk3399
Reset cause: POR
Model: Pine64 RockPro64 v2.1
DRAM:  3.9 GiB
PMIC:  RK808
MMC:   mmc@fe310000: 2, mmc@fe320000: 1, sdhci@fe330000: 0
Loading Environment from SPIFlash... Invalid bus 0 (err=-19)
*** Warning - spi_flash_probe_bus_cs() failed, using default environment

In:    serial
Out:   vidconsole
Err:   vidconsole
Model: Pine64 RockPro64 v2.1
Net:   eth0: ethernet@fe300000
starting USB...
Bus usb@fe380000: USB EHCI 1.00
Bus usb@fe3a0000: USB OHCI 1.0
Bus usb@fe3c0000: USB EHCI 1.00
Bus usb@fe3e0000: USB OHCI 1.0
Bus dwc3: usb maximum-speed not found
Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@fe380000 for devices... 1 USB Device(s) found
scanning bus usb@fe3a0000 for devices... 1 USB Device(s) found
scanning bus usb@fe3c0000 for devices... 1 USB Device(s) found
scanning bus usb@fe3e0000 for devices... 2 USB Device(s) found
scanning bus dwc3 for devices... cannot reset port 2!?
1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found



Questions:
1. Do I have a shit rockpro64 board?
2. Is u-boot not able to work with usb to sata bridges? (hopefully yet)
3. any other magic method you can think of to get usb 3.0 to boot?
#2
I agree with your claim
The content you pointed out is PCIEx and USB 2 items.
But, Here, I will give my view only on USB.

[Symptoms]
1. USB drive cannot be detected
 I checked with 7 enclosures.
 All are products of different manufacturers or models, not the same model

 The breakdown of the 7 units I confirmed is as follows
  ・ 4 units using JMicron devices.
  ・ 3 units using ASMedia devices.

 Two enclosures using ASMedia devices could be detected.
 All enclosures using JMicron devices could not be detected.

2. Stack just before kernel boots
 If a USB device is connected to the USB 2.0 port
  ・ Regardless of device type (For example: mouse or keyboard, etc.)
 This symptom occurs.
 This is a problem with U-Boot software.
---

[Workaround]
1. USB drive cannot be detected
 When the enclosure is connected via a "self-powered" USB3.0-HUB,
 All of the above 7 units can be detected now.

 * I think it is important to be a Self-Powered HUB
 Because I don't think that improvement can be expected when using BUS-Powered HUB.
 Therefore, I haven't dared to try it.

2. Stack just before kernel boots
 Do not connect any kind of device to the USB 2.0 port.

---

[Other]
 About power supply
 According to the official standard, the current supply capacity required for VBUS is
 500mA for USB2.0 / 900mA for USB3.0
 It is stipulated as.
 On the other hand, the design value of Rockpro64 is 750mA for USB2.0 / 1450mA for USB3.0 (see the circuit diagram).
 Also, according to the data sheet of the relevant part (SY6280AAC), the variation error is about +- 25%, so
 It is designed to meet the official standards even in the worst case.

 Next is the HDD drive.
 The standard HDD device requires the maximum current when the motor starts up.
 The value is about 1000mA for a standard 2.5-inch drive.
 The supply capacity of the USB 2.0 port is 500mA according to the official standard, so
 If you connect a 2.5 HDD to the USB 2.0 port, it can't be helped even if it doesn't work.
 (* If there are no other problems,
  For devices with relatively low current consumption, such as "SSD / USB-Sitck", we can expect it to work properly.
  However, due to the problem of "2. Stack just before kernel boot", it will stack with high probability.
 )

 This means that no matter how powerful an external power supply is prepared, the effect commensurate with it cannot be obtained.
 Because the current supply capacity of VBUS is limited on the board by the value according to the official standard.
 It is natural that even if the external power supply is strengthened more than necessary, there is no effect.

 On the other hand, the USB3.0 port has a current supply capacity of 1000mA or more, so
 If it is a standard 2.5 inch drive, most of it will work.

---
You insist in this thread that "there is no problem with the power supply".
I also agree with your claim.

The symptom you pointed out is
 "U-Boot has not yet reached a sufficient level of perfection"
It is due to that.

------
The following is a log when three 2.5-HDDs are connected via USB3.0-HUB.
A mouse is connected to the USB 2.0 port to confirm the problem.
In this case, I have a very high probability of encountering a "stack befor kernel boot" issue.

If I disconnect the device from the USB 2.0 port, it is boot properly.

 * The "U-Boot" I used to check the operation was obtained from the following github tree.
  "U-boot-ci-2020.10-rockpro64-spi"
 I used the one that got the above and built it.

Code:
U-Boot TPL 2020.10 (Oct 28 2020 - 18:33:53)
Channel 0: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Channel 1: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
256B stride
lpddr4_set_rate: change freq to 400000000 mhz 0, 1
lpddr4_set_rate: change freq to 800000000 mhz 1, 0
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2020.10 (Oct 28 2020 - 18:33:53 +0900)
Trying to boot from SPI
NOTICE:  BL31: v2.3(release):bd260fc
NOTICE:  BL31: Built : 08:29:28, Oct 24 2020
NOTICE:  BL31: Rockchip release version: v1.1
...
...

starting USB...
Bus usb@fe380000: USB EHCI 1.00
Bus usb@fe3a0000: USB OHCI 1.0
Bus usb@fe3c0000: USB EHCI 1.00
Bus usb@fe3e0000: USB OHCI 1.0
Bus dwc3@fe800000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus dwc3@fe900000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@fe380000 for devices... 1 USB Device(s) found
scanning bus usb@fe3a0000 for devices... 1 USB Device(s) found
scanning bus usb@fe3c0000 for devices... 1 USB Device(s) found
scanning bus usb@fe3e0000 for devices... 1 USB Device(s) found
scanning bus dwc3@fe800000 for devices... 1 USB Device(s) found
scanning bus dwc3@fe900000 for devices... cannot reset port 1!?
Device not responding to set address.

      USB device not accepting new address (error=80000000)
cannot reset port 3!?
6 USB Device(s) found
       scanning usb for storage devices... 3 Storage Device(s) found
Hit any key to stop autoboot:  0

=> usb stor
  Device 0: Vendor: WDC WD50 Rev: 0    Prod: 00BEVT-75A0RT0
            Type: Hard Disk
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
  Device 1: Vendor: WDC WD16 Rev: 8101 Prod: 00BEVT-26ZCT0
            Type: Hard Disk
            Capacity: 152627.8 MB = 149.0 GB (312581808 x 512)
  Device 2: Vendor: ASMT     Rev: 0    Prod: 2115
            Type: Hard Disk
            Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512)

=> usb tree
USB device tree:
  1  Hub (480 Mb/s, 0mA)
     u-boot EHCI Host Controller

  1  Hub (12 Mb/s, 0mA)
      U-Boot Root Hub

  1  Hub (480 Mb/s, 0mA)
  |  u-boot EHCI Host Controller
  |
  +-2  Hub (480 Mb/s, 100mA)
    |   USB2.0 HUB
    |
    +-3  Human Interface (1.5 Mb/s, 98mA)
         G-Tech Wireless Dongle

  1  Hub (12 Mb/s, 0mA)
      U-Boot Root Hub

  1  Hub (5 Gb/s, 0mA)
     U-Boot XHCI Host Controller

  1  Hub (5 Gb/s, 0mA)
  |  U-Boot XHCI Host Controller
  |
  +-2  Hub (5 Gb/s, 0mA)
  | |
  | +-4  Mass Storage (5 Gb/s, 224mA)
  | |    Jmicron External Disk 3.0 987654321010
  | |
  | +-5  Mass Storage (5 Gb/s, 2mA)
  | |    Jmicron USB3.0 External HDD 873930CE4
  | |
  | +-6  Mass Storage (5 Gb/s, 0mA)
  |      ASMT ASM105x 00000000000000000000
  |
  +-3  Hub (480 Mb/s, 0mA)

=> run bootcmd_usb0
...


Possibly Related Threads…
Thread Author Replies Views Last Post
  Booting my RockPro64 from NVMe drive PsySc0rpi0n 4 6,454 05-11-2022, 02:35 PM
Last Post: PsySc0rpi0n
  Sata HD stopped booting db579 2 2,587 03-11-2022, 03:34 PM
Last Post: db579
  Rockpro64 with PCI FC Card - Not booting (Sometimes) MSteam 1 3,176 10-25-2020, 07:42 PM
Last Post: MSteam
  RockPro64 not booting jekohk 10 13,962 06-09-2019, 01:53 PM
Last Post: Davidos
  Problems with booting nJoy. 1 2,833 03-23-2019, 03:36 AM
Last Post: nJoy.
  Hardware issue overheating while booting and fail to boot DIDquest 13 17,097 03-23-2019, 02:50 AM
Last Post: nJoy.
  EMMC not booting while SD does. Apokalypz 29 35,600 03-10-2019, 04:12 AM
Last Post: graham-r

Forum Jump:


Users browsing this thread: 1 Guest(s)