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

Other Parts Discussed in Thread: DA8XX, OMAP-L138
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.

As per this wiki,

http://processors.wiki.ti.com/index.php/Booting_Linux_kernel_using_U-Boot#NAND_Flash_.28jffs2_image_as_rootfs.29

I have following things already enabled in u-boot/include/configs/omapl_hawkboard.h,

*==============================*/
/* USB  configuration           */
/*==============================*/
#define CONFIG_MUSB             /* Generic MUSB controller */
#define CONFIG_USB_DA8XX        /* Platform hookup to MUSB controller */
#define CONFIG_USB_STORAGE      /* MSC class support */

I have connected USB Disk to hawkboard USB 2.0 port (Not to the OTG port) and then powered ON the board.
When i execute "usb reset", it fails, it reports

"Error, couldn't init Lowlevel part".

Anybody have tried this on the hawkboard.
Is the steps i have tried is correct or wrong.

The flow works like,

usb reset -> do_usb() -> usb_init() -> usb_lowlevel_init()

usb_lowlevel_init() is from u-boot/drivers/usb/musbhdrc.c. It returns -1.


--
Thanks and Regards,
Harish Kumar. V
  • Pl. verify whether the hawkboard related config is available under uboot and that usb has been enabled/configured in the config.

    As I understand only OMAPL13x evm is supported in the released U-Boot package.

    regards

    swami

  • Sir,

    I am using u-boot-omapl1_v1.tar.bz2. It is available from the link "http://code.google.com/p/hawkboard/downloads/list".

    The hawkboard related config is available and able to compile and boot.

    The usb has been enabled in the configuration,

    *=============================

    =*/
    /* USB  configuration           */
    /*==============================*/
    #define CONFIG_MUSB             /* Generic MUSB controller */
    #define CONFIG_USB_DA8XX        /* Platform hookup to MUSB controller */
    #define CONFIG_USB_STORAGE      /* MSC class support */

    During building u-boot, the following object files are created,

    u-boot/drivers/usb/da8xx_usb.o
    u-boot/drivers/usb/musbhdrc.o 
    u-boot/drivers/usb/usbdcore.o

     

    Thanks and Regards,

    HarishKumar.V

  • I don't have a Hawkboard, but I do work on OMAP and AM parts.  The MUSB is the OTG port on those parts so I would assume the same is true for the Hawkboard.  On the OMAP3 EVM I use a cable that has mini-A on one end and a female B connector on the other end.  USB storage works fine on the OMAP3 EVM.

    Steve K.

  • Steve,

    the hawkboard has USB HOST and OTG port.

    I have connected USB pendrive directly to USB HOST port.

     

  • Pl. connect the stick to the OTG port.

    regards

    swami

  • As reinforcement to Swami's statement, the OMAP-L138 has two USB peripherals (USB2.0 and USB1.1).  USB2.0 is the OTG port, and USB1.1 is the USB Host. 

    For more information, please refer to the Hawkboard website (http://www.hawkboard.org).  On there, you will be able to find the board schematics. 

  • Christna Lam,

    Thanks very much for correcting me....

    I will try on the USB 2.0 OTG port in host mode.

     

     

  • Hi All,

    Thanks .... reading file from usb pen drive works from u-boot layer. But, if found some problems in that,

    case 1 :

    the usb works, when i use uboot from "git://arago-project.org/git/people/sekhar/u-boot-omapl1.git". i have to use da50_evm configuration.

    But, in that, the hawkboard kernel is not booting, even after changing the machine number. (corresponding to hawkboard)

    Its getting struck at , loading kernel image.

    case 2 :

    if the default u-boot from hawkboard website is used, device descriptor error (-1) is coming.

     

    Thanks and Regards,

    HarishKumar.V

  • Hi all,

    this is the log , where i am able to read uImage from usb, but during booting, it hangs,,,

    U-Boot 2009.11-dirty (May 10 2010 - 15:01:12)

    I2C: ready
    DRAM: 128 MB
    NAND: 128 MiB
    Bad block table not found for chip 0
    Bad block table not found for chip 0
    Bad block table written to 0x000007fe0000, version 0x01
    Bad block table written to 0x000007fc0000, version 0x01
    *** Warning - bad CRC or NAND, using default environment

    In: serial
    Out: serial
    Err: serial
    ARM Clock : 300000000 Hz
    DDR Clock : 150000000 Hz
    Net: Ethernet PHY: GENERIC @ 0x07

    Hit any key to stop autoboot: 3 0
    U-Boot > usb reset
    (Re)start USB...
    USB: scanning bus for devices... 2 USB Device(s) found
    scanning bus for storage devices... 1 Storage Device(s) found
    U-Boot > fatls usb 0:1
    metal method - metal riffology with sarah spisak part 1 & 2 - dmwinc/
    lick library - legato licks and techniques with stuart bull - dmwinc/
    troy stetina - instructional bookpack (fix) [guitar] [tab]/
    guitar world - super shred guitar masterclass with jeff loomis - dmwinc/
    troy stetina - metal rhythm guitar vol. 2/
    arsenal of megadeth/
    lick library - fretburning blues runs with danny gill - dmwinc/
    1800316 uimage

    1 file(s), 7 dir(s)

    U-Boot > fatload usb 0:1 0xC0700000 uImage
    reading uImage
    ...............................................................................................................................................................................

    1800316 bytes read

    U-Boot > bootm 0xc0700000
    ## Booting kernel from Legacy Image at c0700000 ...
    Image Name: Linux-2.6.32-rc6-svn2
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 1800252 Bytes = 1.7 MB
    Load Address: c0008000
    Entry Point: c0008000
    Verifying Checksum ... OK
    Loading Kernel Image ...


    Thanks and Regards,
    HarishKumar.V
  • Thanks everybody,

     

    Able to read uImage from usb pen drive in u-boot and boot the uImage.

     

    Thanks and Regards,

    HarishKumar.V

  • Dear All,

                  I am tring to use USB_KEYBOARD (On u-boot) through usb hub on beagle board. the communication goes like this. "omap3--> USB3320(Transciver)-->smsc 9514(usb-ethernet hub)".  from the above conversation i found you have worked on omap series. Can you suggest us,how to use usb-kbd or storage device on u-boot.  I am using u-boot-2011.06 source code as i could not find smsc related driver in the below series.

                Any one has tried this on beagle board.

    Thanks & Regards

    Atul Kumar

  • Hi Harish,

    I am stuck with the same problems you faced. I cannot access USB stick from USB host.

    What was the final solution you came up with?

    Could you briefly explain.

    Thanks,

    HSMahendra

  • i used new bootloader as mentioned in the mailing thread and i used OTG port in host mode.

    connected to hub via mini - a cable.

  • Hi Harish:

    You how to set up that “used OTG port in host mode”?

    I have the problem as the same you.

    http://e2e.ti.com/support/embedded/linux/f/354/t/164430.aspx

    my email:

    liqiu7927@sina.com

     

    Thanks!