musb: enable hostmode on n900 (semi-manual)
authorPaul Fertser <fercerpav@gmail.com>
Fri, 29 Oct 2010 20:33:21 +0000 (00:33 +0400)
committerPaul Fertser <fercerpav@gmail.com>
Fri, 5 Nov 2010 22:10:04 +0000 (01:10 +0300)
commitd7f76e505b16f7e9305c59c51d02fb1473ab5b2c
tree5cecd7f6d9aab4422af32c50964b2bfe0d7ad1c6
parentb6381a48b0a49d97a66133bca18197d23e49fa39
musb: enable hostmode on n900 (semi-manual)

With this i'm able to use my LS, FS and HS devices. For this bme should
obviously be stopped.

Do ``cat /proc/driver/musb_hdrc'' to check for DEVCTL state.

Do ``echo hostf > /sys/devices/platform/musb_hdrc/mode'' to switch it to
the host mode in FULL speed; do ``echo hostl >
/sys/devices/platform/musb_hdrc/mode'' to switch it to the host mode in
LOW speed; do ``echo hosth > /sys/devices/platform/musb_hdrc/mode'' for
HIGH speed.

Then apply VBUS and force enumeration.

Proper DEVCTL state in hostmode with the power on VBUS applied (either
internal, or external) is 0x5D for full/high speed, 0x3D for low speed.

Then manually force device enumeration with
``echo F > /proc/driver/musb_hdrc''

``echo peripheral > /sys/devices/platform/musb_hdrc/mode'' to switch it
back (do not forget to start bme afterwards).

You might need to wait for some time before a new attempt to force the
hostmode, calling ``lsusb'' usually helps to bring it back to the
default state.
drivers/usb/musb/musb_core.c
drivers/usb/musb/musb_core.h
drivers/usb/musb/musb_procfs.c
drivers/usb/musb/omap2430.c