U-boot musb gadget support

From eLinux.org
Revision as of 06:20, 10 January 2009 by Dirk (Talk | contribs)

Jump to: navigation, search

This is currently publish as a patch for U-Boot at OMAP3 based boards (e.g. BeagleBoard) instead of a git repository since I haven't got time to setup a git somewhere.

Current Status

  • Currently the patch enables beagleboard to be recognized as an usb ACM modem, and provide u-boot console over it. However some issues with initialization needs to be solved (see Known bugs section).

Known bugs

  • The twl4030 initialization isn't right yet (working on it), so the only work around to make a board bootable with this patch if by pressing the user button while applying power to the board, otherwise the USB PHY won't be properly initialized.
  • Setting the stdint,stdout,stderr to be multi-io (have the u-boot console and serial and USB at the same time) get stuck if a terminal like minicom isn't open on the USB ACM device.

Next steps

  • Fix the twl3040 initialization issues
  • Fix the problem with multi-io
  • Get the patch into some of the git u-boot trees around (omap3-dev-usb?).

Getting the source code

Checkout the git source from Beagle U-Boot git repository. Get it by:

git clone git://www.sakoman.net/git/u-boot-omap3.git
cd u-boot-omap3
git checkout --track -b omap3-dev origin/omap3-dev

Apply the patch by:

patch -p1 <  musb-gadget-beagle.patch

Build (assuming Code Sourcery GCC 2007q3):

make CROSS_COMPILE=arm-none-linux-gnueabi- mrproper
make CROSS_COMPILE=arm-none-linux-gnueabi- omap3_beagle_config
make CROSS_COMPILE=arm-none-linux-gnueabi-

Getting started

  • Load your new u-boot.bin image into the board using any of the existing methods. If you have a beagle running already a working u-boot, you can load it by serial using the 'loady' command and minicom or 'sb' (be sure to have lszrz installed in your distro). Then erasing the u-boot in flash and reflashing the new image with the following commands:
nand unlock
nand erase 80000 160000
nand write.i 80000000 80000 160000
  • Reboot your board and keep the user button pressed while applying power (see Known bugs).
  • Attach an mini-b USB cable to the beagle. Your host should recognize an ACM CDC device (works out of the box on Linux and OS X).
  • If you want to have the u-boot console over USB use the following command:
setenv stdout usbtty; setenv stdin usbtty; setenv stderr usbtty
  • You can also use multi-io to have the console over serial and USB at the same time, but this has a bug documented in Known bugs:
setenv stdout usbtty,serial; setenv stdin usbtty,serial; setenv stderr usbtty,serial