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.

AM335X: U-boot does not find USB Host controller



On my board, both USB controller is configured as host only, and they are working fine under Linux kernel. But under u-boot, they cannot be found. There is not any message about USB initialization message. I type "usb start" and it reports "USB0: Port not available", My board is boot up from SPI flash and I need to program the flash chip via USB mass storage under u-boot environment. 

In am335x_evm.h, I have defined:

#define CONFIG_USB_MUSB_DSPS
#define CONFIG_ARCH_MISC_INIT
#define CONFIG_MUSB_GADGET
#define CONFIG_MUSB_PIO_ONLY
#define CONFIG_MUSB_DISABLE_BULK_COMBINE_SPLIT
#define CONFIG_USB_GADGET
#define CONFIG_USBDOWNLOAD_GADGET
#define CONFIG_USB_GADGET_DUALSPEED
#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_MUSB_HOST
#define CONFIG_AM335X_USB0
#define CONFIG_AM335X_USB0_MODE MUSB_HOST
#define CONFIG_AM335X_USB1
#define CONFIG_AM335X_USB1_MODE MUSB_HOST

I am using ti-processor-sdk-Linux-evm-02.00.02.11.

Do I miss something?

Regards,

Colman

  • Hi Colman,

    You need to plug in a USB drive in the usb port & then execute usb start.

    See my log:

    NO USB device in USB port of AM335x EVMSK (running SDK 02.00.02.11):

    U-Boot# usb dev                                                                

    USB is stopped. Please issue 'usb start' first.                                

    U-Boot# usb start                                                              

    starting USB...                                                                

    USB0:   Port not available.

    After I plug a usb device in the AM335x EVMSK USB port: 

    U-Boot# usb start
    starting USB...
    USB0: scanning bus 0 for devices... 1 USB Device(s) found
    scanning usb for storage devices... 1 Storage Device(s) found
    U-Boot#

    U-Boot# usb dev

    USB device 0: Vendor: Kingston Rev: PMAP Prod: DataTraveler 2.0
    Type: Removable Hard Disk
    Capacity: 7441.6 MB = 7.2 GB (15240576 x 512)

    Best Regards, 
    Yordan

     

  • Dear Yordan,

    Of course, I have plugged in the USB devices on both USB ports. The "Port not available" is the checking result before the "scanning..." message. I trace the code, it comes from common/usb.c, function usb_init(). It does not return any from isb_lowlevel_init(), also I have found that the isb_lowlevel_init() does the use the index parameter, so it only support one USB controller, how can it manage the two USB ports?

    Regards,
    Colman
  • Dear Yordan,

    I have solved it. It is due the missing 5V on the USB_VBUS pin. I turned it on and it can detect the USB device. But I have to modify the code to deal with two USB Host port.

    Regards,
    Colman
  • Hi Colman,

    I'm glad to hear you solved this issue.
    Also thank you fro updating the thread with your resolution. I'm sure it will be useful to other people in the e2e community.

    Best Regards,
    Yordan
  • Hi Colman Lai,


    I face the same problem ... could you provide a patch? How did you turned on the 5V on the USB_VBUS pin?

    thanks!

    bye,

    Heiko

  • Dear Heiko,

    There is no magic, you must have 5V input to the USB_VBUS pin. I just use AM335x's 32KHz output to generate a 5V and feed to USB_VBUS pin.

    Colman

  • I had the same problem. Solved using a powered USB hub. Plugged the hub into the BBB USB port and plugged the USB flash drive into the USB hub. Worked fine then.