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.

Reading a file from USB STORAGE device from U-boot in OMAPL-138 platform,but I don not find usb device

Other Parts Discussed in Thread: DA8XX, OMAP-L137

Hi:

I am using hawkboard which is based on OMAPL-138 platform.
I am trying to read from usb storage device from the u-boot.
 
I have following things already enabled in u-boot/include/configs/da850evm.h
 
#define CONFIG_USB_DA8XX      /* Platform hookup to MUSB controller */
#define CONFIG_MUSB_HCD
 
#ifdef CONFIG_USB_DA8XX
#ifdef CONFIG_MUSB_HCD
#define CONFIG_USB_OHCI         //使能USB_OHCI协议的支持
#define CONFIG_CMD_USB      /* inclue support for usb       */
#define CONFIG_USB_STORAGE     /* MSC class support */
#define CONFIG_CMD_STORAGE     /* inclue support for usb       */
#define CONFIG_CMD_FAT      /* inclue support for FAT/storage*/
#define CONFIG_DOS_PARTITION /* inclue support for FAT/storage*/
#define CONFIG_SUPPORT_VFAT     //使能FAT32文件系统的支持
#define CONFIG_SYS_DEVICE_DEREGISTER
#define LITTLEENDIAN            //定义数据为小端模式
#ifdef CONFIG_USB_KEYBOARD
#define CONFIG_SYS_USB_EVENT_POLL
#define CONFIG_PREBOOT "usb start"
#endif /* CONFIG_USB_KEYBOARD */
#endif /* CONFIG_MUSB_HCD */
#ifdef CONFIG_MUSB_UDC
/* USB device configuration */
#define CONFIG_USB_DEVICE  1
#define CONFIG_USB_TTY   1
#define CONFIG_SYS_CONSOLE_IS_IN_ENV 1
/* Change these to suit your needs */
#define CONFIG_USBD_VENDORID  0x0451
#define CONFIG_USBD_PRODUCTID  0x5678
#define CONFIG_USBD_MANUFACTURER "Texas Instruments"
#define CONFIG_USBD_PRODUCT_NAME "DA850EVM"
#endif /* CONFIG_MUSB_UDC */
#endif /* CONFIG_USB_DA8XX */
#endif /* __CONFIG_H */
 
 
But, when I connect usb device to usb port," usb start" result:
 
 usb start
(Re)start USB...
USB:   scanning bus for devices... New Device 0
usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x40
usb_new_device: usb_get_descriptor() failed
No USB Device found
scanning bus for storage devices... 0 Storage Device(s) found
 
Thanks and Regards,
LQ

 
 
  • Tracking code to find that function which (usb_get_descriptor) return -1;

  • As for as I know only musb port is supported in uboot for OMAPL1-38 and not OHCI. Can you check if OHCI platform glue layer is available for OMAPL1-38?

    Ajay

  • Thanks Ajay

     

    You say, How do I set to make 138 support usb2.0 in the musb.

  • Changes in u-boot/include/configs/da850evm.h

    Remove "#define CONFIG_USB_OHCI         //使能USB_OHCI协议的支持"

    Refer http://processors.wiki.ti.com/index.php/Configuring/Building_U-Boot_for_OMAP-L137#USB_Storage_Support

    ajay

  • I remove "#define CONFIG_USB_OHCI "

     Inserted in the u disk at usb1.1 or usb2.0 by AminiB Cable ,

    when I "usb start", result,

    No USB Device found
    0 Storage Device(s) found

    Are there any macro does not release?

     

    Thanks!

     

  • you need to insert usb disk to musb port (mini-AM usb receptacle) using mini-A plug (mini-A and mini-B are different).

    It seems you used mini-B plug. Please try with mini-A plug.

    Ajay

  • I tested usb1.1,found that No-u-disk connected through "usb start" to find equipment,but don not find mass storage

     

    But, remove "CONFIG_USB_OHCI"  ,"usb start" donnot find the device and mass storage

  • I didn't understand statement "I tested usb1.1" ? OMAPL1-38 has two usb ports. one is OHCI port which is available on EVM as standard-A receptacle (same as PCs have). OHCI supports only usb1.1 devices. Second is musb port which is mini-AM receptacle. musb port supports both usb2.0 and usb1.1.

    For uboot usb testing you need to connected the usb device to musb port using mini-A plug (connects to EVM musb port) to Std-A receptacle (connects to USB DISK) cable.

    Ajay

  • I will test ,then ask you

     

    Thanks

  • When I test musb port, I need to release "CONFIG_USB_EHCI"?

     

  • For uboot usb testing I need confirm that connected the usb device to musb port using mini-A plug.

    But I donnot find decive.

    Follow:

    /include/configs/da850evm.h

    #define CONFIG_USB_DA8XX      /* Platform hookup to MUSB controller */
    #define CONFIG_MUSB_HCD
     
    #ifdef CONFIG_USB_DA8XX
    #ifdef CONFIG_MUSB_HCD
    #define CONFIG_CMD_USB      /* inclue support for usb       */
    #define CONFIG_USB_STORAGE     /* MSC class support */
    #define CONFIG_CMD_STORAGE     /* inclue support for usb       */
    #define CONFIG_CMD_FAT      /* inclue support for FAT/storage*/
    #define CONFIG_DOS_PARTITION /* inclue support for FAT/storage*/
    #define CONFIG_SUPPORT_VFAT  
    #define CONFIG_SYS_DEVICE_DEREGISTER
    #define LITTLEENDIAN     
    #ifdef CONFIG_USB_KEYBOARD
    #define CONFIG_SYS_USB_EVENT_POLL
    #define CONFIG_PREBOOT "usb start"
    #endif /* CONFIG_USB_KEYBOARD */
    #endif /* CONFIG_MUSB_HCD */
    #ifdef CONFIG_MUSB_UDC
    /* USB device configuration */
    #define CONFIG_USB_DEVICE  1
    #define CONFIG_USB_TTY   1
    #define CONFIG_SYS_CONSOLE_IS_IN_ENV 1
    /* Change these to suit your needs */
    #define CONFIG_USBD_VENDORID  0x0451
    #define CONFIG_USBD_PRODUCTID  0x5678
    #define CONFIG_USBD_MANUFACTURER "Texas Instruments"
    #define CONFIG_USBD_PRODUCT_NAME "DA850EVM"
    #endif /* CONFIG_MUSB_UDC */
    #endif /* CONFIG_USB_DA8XX */
    #endif /* __CONFIG_H */
     
    usb start
    (Re)start USB...
    USB:   scanning bus for devices... No USB Device found
    scanning bus for storage devices... 0 Storage Device(s) found
     
    Thanks
    LQ

  • Hi Ajay:

    I try to at da850evm.h defined:

    #define CONFIG_USB_OHCI_NEW     1
    #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
    #define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00a00000
    #define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9263"

    then "usb start", result:

    1 USB Device(s) found
    scanning bus for storage devices... 0 Storage Device(s) found

     

    then "usb info",result:

    1: Hub,  USB Revision 1.10
     -  OHCI Root Hub
     - Class: Hub
     - PacketSize: 8  Configurations: 1
     - Vendor: 0x0000  Product 0x0000 Version 0.0
       Configuration: 1
       - Interfaces: 1 Self Powered 0mA
         Interface: 0
         - Alternate Setting 0, Endpoints: 1
         - Class Hub
         - Endpoint 1 In Interrupt MaxPacket 2 Interval 255ms

     

    But, i think that this port  is not what I need. 

     

    then I try to defined "#define CONFIG_USB_EHCI" ,but did not succeed

     

    Thanks.

  • Hi All

    I confirm:

    1. Vbus have power on

    2. Cable is miniA

    3. macro about musb defined

    But "usb start"result


    (Re)start USB...
    USB:   scanning bus for devices... New Device 0
    usb_control_msg: request: 0x6, requesttype: 0x80, value 0x100 index 0x0 length 0x40
    usb_new_device: usb_get_descriptor() failed
    No USB Device found
           scanning bus for storage devices...0 Storage Device(s) found

    I donnot kown that I ignored what

    Thanks!

    LQ

     

     

  • Sustained attention in......

     

    With analysis of the same problem.

     

    Thanks!

  • You may want ti look at pinmux settings of usb pins specially DRVVBUS pin.

    Regards,

    Ajay

  • I found that in the "da850evm.c" does not have usb setting information.

    #ifdef CONFIG_SPI_FLASH
    /* SPI0 pin muxer settings */
    const struct pinmux_config spi1_pins[] = {
     { pinmux[5], 1, 1 },
     { pinmux[5], 1, 2 },
     { pinmux[5], 1, 4 },
     { pinmux[5], 1, 5 },
    };
    #endif

    /* UART pin muxer settings */
    const struct pinmux_config uart_pins[] = {
     { pinmux[0], 4, 6 },
     { pinmux[0], 4, 7 },
     { pinmux[4], 2, 4 },
     { pinmux[4], 2, 5 }
    };

    #ifdef CONFIG_DRIVER_TI_EMAC
    const struct pinmux_config emac_pins[] = {
    #ifdef CONFIG_DRIVER_TI_EMAC_USE_RMII
     { pinmux[14], 8, 2 },
     { pinmux[14], 8, 3 },
     { pinmux[14], 8, 4 },
     { pinmux[14], 8, 5 },
     { pinmux[14], 8, 6 },
     { pinmux[14], 8, 7 },
     { pinmux[15], 8, 1 },
    #else
     { pinmux[2], 8, 1 },
     { pinmux[2], 8, 2 },
     { pinmux[2], 8, 3 },
     { pinmux[2], 8, 4 },
     { pinmux[2], 8, 5 },
     { pinmux[2], 8, 6 },
     { pinmux[2], 8, 7 },
     { pinmux[3], 8, 0 },
     { pinmux[3], 8, 1 },
     { pinmux[3], 8, 2 },
     { pinmux[3], 8, 3 },
     { pinmux[3], 8, 4 },
     { pinmux[3], 8, 5 },
     { pinmux[3], 8, 6 },
     { pinmux[3], 8, 7 },
    #endif /* CONFIG_DRIVER_TI_EMAC_USE_RMII */
     { pinmux[4], 8, 0 },
     { pinmux[4], 8, 1 }
    };
    #endif /* CONFIG_DRIVER_TI_EMAC */

    /* I2C pin muxer settings */
    const struct pinmux_config i2c_pins[] = {
     { pinmux[4], 2, 2 },
     { pinmux[4], 2, 3 }
    };

    #ifdef CONFIG_USE_NAND
    const struct pinmux_config aemif_pins[] = {
     { pinmux[7], 1, 1 },
     { pinmux[7], 1, 2 },
     { pinmux[7], 1, 4 },
     { pinmux[7], 1, 5 },
     { pinmux[9], 1, 0 },
     { pinmux[9], 1, 1 },
     { pinmux[9], 1, 2 },
     { pinmux[9], 1, 3 },
     { pinmux[9], 1, 4 },
     { pinmux[9], 1, 5 },
     { pinmux[9], 1, 6 },
     { pinmux[9], 1, 7 },
     { pinmux[12], 1, 5 },
     { pinmux[12], 1, 6 }
    };
    #elif defined(CONFIG_SYS_USE_NOR)
    const struct pinmux_config nor_pins[] = {
     { pinmux[5], 1, 6 },
     { pinmux[6], 1, 6 },
     { pinmux[7], 1, 0 },
     { pinmux[7], 1, 4 },
     { pinmux[7], 1, 5 },
     { pinmux[8], 1, 0 },
     { pinmux[8], 1, 1 },
     { pinmux[8], 1, 2 },
     { pinmux[8], 1, 3 },
     { pinmux[8], 1, 4 },
     { pinmux[8], 1, 5 },
     { pinmux[8], 1, 6 },
     { pinmux[8], 1, 7 },
     { pinmux[9], 1, 0 },
     { pinmux[9], 1, 1 },
     { pinmux[9], 1, 2 },
     { pinmux[9], 1, 3 },
     { pinmux[9], 1, 4 },
     { pinmux[9], 1, 5 },
     { pinmux[9], 1, 6 },
     { pinmux[9], 1, 7 },
     { pinmux[10], 1, 0 },
     { pinmux[10], 1, 1 },
     { pinmux[10], 1, 2 },
     { pinmux[10], 1, 3 },
     { pinmux[10], 1, 4 },
     { pinmux[10], 1, 5 },
     { pinmux[10], 1, 6 },
     { pinmux[10], 1, 7 },
     { pinmux[11], 1, 0 },
     { pinmux[11], 1, 1 },
     { pinmux[11], 1, 2 },
     { pinmux[11], 1, 3 },
     { pinmux[11], 1, 4 },
     { pinmux[11], 1, 5 },
     { pinmux[11], 1, 6 },
     { pinmux[11], 1, 7 },
     { pinmux[12], 1, 0 },
     { pinmux[12], 1, 1 },
     { pinmux[12], 1, 2 },
     { pinmux[12], 1, 3 },
     { pinmux[12], 1, 4 },
     { pinmux[12], 1, 5 },
     { pinmux[12], 1, 6 },
     { pinmux[12], 1, 7 }
    };
    #endif

     

    so in the function "board_init" does not have "davinci_configure_pin_mux" about usb_pins.

    Is this fase?

     

    Thanks!

  • I try to change a uboot version, but the result was the same

  • Hi   LQ,

    Did u find the solution to this problem?? Pls let me know....Thnaks