This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BEAGLEBK:External SATA drive (with SATA to USB interface) is not detected on BEAGLEBONE BLACK

Hi,

Ti-sdk version: ti-processor-sdk-linux-am335x-evm-06.03.00.106

U-Boot Version: U-Boot 2019.01-gc148924

USB Devices:

         + 2.5" external SATA drive with SATA to USB interface ( JM20329,MA6116A )

At the U-Boot shell, the above  device was not detected when I connected them to USB PORT on Beaglebone Black.

USB Storage devices viz. Western Digital Portable Drive (My Passport) were detected properly by the same Beaglebone Black.

For the USB devices failing to be detected, I get only a "Port Not Available" message.        

Is this behaviour expected ?? and how do I overcome this?

Regards,

Adarsh

  • Hi Adarsh,

    Can Linux detect this USB-SATA device?

    If you use a self-powered USB hub to connect this USB-SATA device, can U-Boot detect it?

  • Hi Liu,

    Q.""Can Linux detect this USB-SATA device?""

    Yes,I can.

    ---------

    Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x8ffe8ffe

    Device     Boot Start       End   Sectors   Size Id Type
    /dev/sda1        2048 625142445 625140398 298.1G 83 Linux
    debian@beaglebone:~$

    ---------

    Q.""If you use a self-powered USB hub to connect this USB-SATA device, can U-Boot detect it?""

    No,the USB-SATA device is not detected.

    Regards,

    Adarsh

  • Hi Adarsh,

    Can you please provide the U-Boot console log when the detection failed?

  • Hi Liu,

    Log without USB HUB

    ------------

    U-Boot SPL 2019.01-gc148924-dirty (Apr 17 2021 - 12:08:20 +0530)
    Trying to boot from MMC1


    U-Boot 2019.01-gc148924-dirty (Apr 17 2021 - 12:08:20 +0530)

    CPU  : AM335X-GP rev 2.1
    Model: TI AM335x BeagleBone Black
    DRAM:  512 MiB
    NAND:  0 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Loading Environment from FAT... OK
    Net:   eth0: ethernet@4a100000
    Warning: usb_ether MAC addresses don't match:
    Address in ROM is          de:ad:be:ef:00:01
    Address in environment is  04:79:b7:a8:fd:e0
    , eth1: usb_ether
    Hit any key to stop autoboot:  0
    => usb start
    starting USB...
    USB0:   Port not available.


    =>

    ------------

    Log with USB-SATA device connected through the USB-2.0 Hub (iball piano423):

    Debug is enabled in "u-boot/drivers/usb/host/usb-uclass.c"

    -------------

    => usb start
    starting USB...
    USB0:   scanning bus 1 for devices...
    Calling usb_setup_device(), portnr=0
    read_descriptor for 'usb@47401800': ret=0
    ** usb_find_child returns -2
    usb_find_and_bind_driver: Searching for driver
    usb_find_and_bind_driver: Match found: usb_hub
    usb_scan_device: Probing 'usb_hub', plat=9df4c4e8
    1 USB Device(s) found
    scan end
           scanning usb for storage devices... 0 Storage Device(s) found
    =>

    --------------

    Regards,

    Adarsh

  • Hi Adarsh,

    Please try to use "usb reset" command instead of "usb start".

    When the detect failed, please run the following command on the uboot console to dump a register:

    => md.b 0x47401c60 1

  • Hi Liu,

    The output of the command:

    ------------------------------

    U-Boot SPL 2019.01-g333c3e72d3 (Apr 19 2020 - 11:21:12 +0000)
    Trying to boot from MMC1


    U-Boot 2019.01-g333c3e72d3 (Apr 19 2020 - 11:21:12 +0000)

    CPU  : AM335X-GP rev 2.1
    Model: TI AM335x BeagleBone Black
    DRAM:  512 MiB
    NAND:  0 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Loading Environment from FAT... OK
    Net:   eth0: ethernet@4a100000
    Warning: usb_ether MAC addresses don't match:
    Address in ROM is          de:ad:be:ef:00:01
    Address in environment is  04:79:b7:a8:fd:e0
    , eth1: usb_ether
    Hit any key to stop autoboot:  0
    => usb reset
    resetting USB...
    USB0:   Port not available.
    => md.b 0x47401c60 1
    47401c60: 80                                                 .
    =>

    ------------------------------

  • Hi Adarsh,

    Please run the following command before run "usb reset" to see if it solves the issue. Please try it with and without the usb hub.

     

    setenv usb_pgood_delay 200

  • Hi Bin,

    Without usb hub:

    U-Boot SPL 2019.01-g333c3e72d3 (Apr 19 2020 - 11:21:12 +0000)
    Trying to boot from MMC1
    
    
    U-Boot 2019.01-g333c3e72d3 (Apr 19 2020 - 11:21:12 +0000)
    
    CPU  : AM335X-GP rev 2.1
    Model: TI AM335x BeagleBone Black
    DRAM:  512 MiB
    NAND:  0 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Loading Environment from FAT... *** Warning - bad CRC, using default environment
    
    <ethaddr> not set. Validating first E-fuse MAC
    Net:   eth0: ethernet@4a100000
    Warning: usb_ether MAC addresses don't match:
    Address in ROM is          de:ad:be:ef:00:01
    Address in environment is  04:79:b7:a8:fd:e0
    , eth1: usb_ether
    Hit any key to stop autoboot:  0 
    => setenv usb_pgood_delay 200
    => printenv usb_pgood_delay
    usb_pgood_delay=200
    => usb reset
    resetting USB...
    USB0:   Port not available.
    =>

    With USB hub:

    U-Boot SPL 2019.01-g333c3e72d3 (Apr 19 2020 - 11:21:12 +0000)
    Trying to boot from MMC1
    
    
    U-Boot 2019.01-g333c3e72d3 (Apr 19 2020 - 11:21:12 +0000)
    
    CPU  : AM335X-GP rev 2.1
    Model: TI AM335x BeagleBone Black
    DRAM:  512 MiB
    NAND:  0 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Loading Environment from FAT... *** Warning - bad CRC, using default environment
    
    <ethaddr> not set. Validating first E-fuse MAC
    Net:   eth0: ethernet@4a100000
    Warning: usb_ether MAC addresses don't match:
    Address in ROM is          de:ad:be:ef:00:01
    Address in environment is  04:79:b7:a8:fd:e0
    , eth1: usb_ether
    Hit any key to stop autoboot:  0 
    => setenv usb_pgood_delay 200
    => usb reset
    resetting USB...
    USB0:   scanning bus 1 for devices... 1 USB Device(s) found
           scanning usb for storage devices... 0 Storage Device(s) found
    => 
    

  • Hi Adarsh,

    I could understand this USB drive might have special characters which causes the enumeration failure without USB hub, but I cannot think of why it also fails with a self-powered USB hub.

    The next step of debugging would be to use a scope to prob some USB pins, you can refer to the Beaglebone Black schematics to locate the following signals - USB1_DRVVBUS, USB1_VBUS, USB1_DP, and probe these signals while running command 'usb reset'. I'd like to see the capture of these signals.

  • The Beaglebone Black doesn't have the bulk VBUS CAP on USB1 port which is required by the USB2.0 Specs. So another simple hw test is to add a 120uF capacitor on USB1 VBUS line near the USB host connector on the board to see if this solve the issue.

  • Hi Bin,

    It is observed that USB-SATA drive is detected withing the linux environment (linux factory image on the board).Log is attached.

    So another simple hw test is to add a 120uF capacitor on USB1 VBUS line near the USB host connector on the board to see if this solve the issu

    I will update you once we get it done.

  • Hi Bin,

    The next step of debugging would be to use a scope to prob some USB pins, you can refer to the Beaglebone Black schematics to locate the following signals - USB1_DRVVBUS, USB1_VBUS, USB1_DP, and probe these signals while running command 'usb reset'. I'd like to see the capture of these signals.

    These USB1 lines are not available on P9 and P8 expansion headers of the Beaglebone Black. As per my understanding ,probing these could require additional wiring the on board hardware.

    We would like to check the feasibility of this option and then proceed further.

  • Yes, these signals are not on the P8 or P9 headers. You would have to solder some wirings to bring out the signals.

  • Hi Bin,

    As these are h/w adjustments on a multi-layer pcb with fine tracks, we are unable to take a forward step (fear of getting the board bricked in process).

    As of now we would like to put this on hold and resume further debugging only after we perform the suggested modification.

    Thanks for the support.

    Regards,

    Adarsh

  • Hi Adarsh,

    I understand your concern.

    Do you mind to explain why do you want to get multiple USB harddrives working in U-Boot? From what I am aware, this requirement is not common.

  • Hi Bin,

    Do you mind to explain why do you want to get multiple USB harddrives working in U-Boot? From what I am aware, this requirement is not common.

    Sure.It is not multiple USB hard drives, it is a single SATA Drive connected to an SATA-to-USB adapter.We wanted to boot Linux OS from a USB drive (with more storage capacity for storing data also), The SATA - to -USB drives were already with us and wanted to use them in our current project.

    As u-boot was unable to identify the storage device itself, I got little suspicious ( I was under the impression that the u-boot should atleast detect the device ) and reported it to TI.In addition to SATA-to-USB drive,it was observed that composite USB devices (with us like HUAWEI USB internet modem with sdhc storage and SONY USB walkman ) were also not getting detected.

    Though these are not ONLY storage devices,they could also be used in case of need or urgency.

    Regards,

    Adarsh.

  • Hi Adarsh,

    It is not multiple USB hard drives, it is a single SATA Drive connected to an SATA-to-USB adapter.

    Sorry, by multiple I meant different USB hard drivers.

    Since the hard drive which is failed to detect in UBoot works fine in Linux, I think the issue is likely about software timing in UBoot. But I don't have a USB device which can trigger the failure to debug it locally, I would have to rely on you to debug on your setup, as you can see, the remote debug process would be slow.