USB OTG host in Angstrom

504 views
Skip to first unread message

dlamborg

unread,
Oct 7, 2008, 11:30:02 AM10/7/08
to Beagle Board
Greetings,

I've been having great success with my new beagle board so far. Thanks
for all the great documentation and information. I have run into one
snag and would like to know if anyone else has seen this problem.

I've installed the Linux Angstrom distribution on a 2G SD/MMC card and
it boots just fine thanks to the great instructions.

I'm trying now to attach a USB mouse and keyboard through a powered
hub and so far have had no luck getting the USB subsystem to recognize
either of these devices. I've tried connecting only one device at a
time without the hub and still get no response.

I've taken care to use the USB mini-A to Standard-A connector
recommended here: http://www.vernier.com/accessories/access.html?usb-mini&template=basic.html

I've also used an ohm meter to make sure pins 4-5 are shorted as
required for a USB OTG host.

When Linux boots, the devices listed under /proc/bus/usb contain
these:

root@beagleboard:/proc/bus/usb# cat devices

T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 3
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 2.06
S: Manufacturer=Linux 2.6.22.1-omap1 ehci_hcd
S: Product=OMAP-EHCI Host Controller
S: SerialNumber=ehci-omap.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms

So it looks like there's an EHCI controller in my system. But no
devices registered on the bus.

I'm guessing that the mini-A connector is wired correctly and the OTG
function of the USB device is working.

I'm now wondering if this is a hardware problem with my Beagle (rev
B4) or possibly the connector is the wrong type for what I'm trying to
do.

Would I have better luck if I connected to the powered hub using a
mini-A to mini-B connector.

Has anyone else had this type of problem?

BTW - I've also tried plugging the Beagle into a PC and it is
recognized as a device under WinXP - seems okay.

Thanks and I look forward to contributing to the project.

Dave

John Beetem

unread,
Oct 8, 2008, 1:02:17 PM10/8/08
to Beagle Board
> When Linux boots, the devices listed under /proc/bus/usb contain
> these:
> So it looks like there's an EHCI controller in my system. But no
> devices registered on the bus.

I think the device listed is the USB controller contained in the OMAP,
not your external host. In general, a USB host incorporates a 1-4
port hub that serves as the root of the USB tree.

An external USB hub is a node in the USB tree. It has a single host
port (usually a female B jack or a short cable with a male A plug)
which must connect to your BeagleBoard USB OTG. The rest of the hub
ports are usually female A jacks into which you plug your USB devices
(mouse, keyboard, etc.). Do not plug your BeagleBoard cable into one
of the hub's device ports. BeagleBoard will only work as a host if
it's connected to the host port. (OTOH, it probably won't do any
damage.)

In my case, I have a hub with a host port cable with a male A plug. I
use a double-female A adapter to connect to my male A to male 5-pin
mini A cable that plugs into BeagleBoard USB OTG.

Also, one way to see if the BeagleBoard software has set it to host
mode is to check the voltage at Pin 1 of the OTG port. R5 is a
convenient place to do it. If the BeagleBoard is in host mode it
drives Pin 1 to 5V (100 mA max). If the BeagleBoard thinks it's a
device, it does not drive Pin 1. (Pin 1 is also 5V if the BeagleBoard
is connected to a hub as a USB device, but in this case it's the hub
that is driving Pin 1 to 5V.)

Hope this helps.

rtp...@comcast.net

unread,
Oct 8, 2008, 9:27:08 PM10/8/08
to Beagle Board, dlamborg
Even with cables I very often have to use this incantation to get it to work (using .26 kernel from recent OE build console-image).

echo host> /sys/devices/platform/musb_hdrc/mode

This forces the USB OTG port to act like a host, then once you have the cables sorted out, you can use external USB devices no problem.


-Sincerely,
Todd Pack

-------------- Original message ----------------------
From: dlamborg <dlam...@yahoo.com>
>
> Greetings,
>
> I've been having great success with my new beagle board so far. Thanks
> for all the great documentation and information. I have run into one
> snag and would like to know if anyone else has seen this problem.
>
> I've installed the Linux Angstrom distribution on a 2G SD/MMC card and
> it boots just fine thanks to the great instructions.
>
> I'm trying now to attach a USB mouse and keyboard through a powered
> hub and so far have had no luck getting the USB subsystem to recognize
> either of these devices. I've tried connecting only one device at a
> time without the hub and still get no response.
>
> I've taken care to use the USB mini-A to Standard-A connector
> recommended here:
> http://www.vernier.com/accessories/access.html?usb-mini&template=basic.html
>
> I've also used an ohm meter to make sure pins 4-5 are shorted as
> required for a USB OTG host.
>

> When Linux boots, the devices listed under /proc/bus/usb contain
> these:
>

> root@beagleboard:/proc/bus/usb# cat devices
>
> T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 3
> B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
> D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
> P: Vendor=0000 ProdID=0000 Rev= 2.06
> S: Manufacturer=Linux 2.6.22.1-omap1 ehci_hcd
> S: Product=OMAP-EHCI Host Controller
> S: SerialNumber=ehci-omap.0
> C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
> I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
> E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms
>

> So it looks like there's an EHCI controller in my system. But no
> devices registered on the bus.
>

rtp...@comcast.net

unread,
Oct 8, 2008, 9:27:08 PM10/8/08
to Beagle Board, dlamborg

David Lamborghini

unread,
Oct 9, 2008, 7:48:31 AM10/9/08
to beagl...@googlegroups.com

Thanks for the reply. Great information. After posting this I spent some time reading other posts (some unrelated) trying to understand what I should see for USB devices. I stumbled across some posts describing problems identifying USB OTG in some kernel builds.  I don't yet have kernel building up and running for OMAP on my linux system so I grabbed the latest uImage from the Angstrom site (.26). This time it worked and I was able to find my hub, keyboard and mouse. Turns out I had downloaded the original uImage before some patches were applied. Whatever was changed it fixes my OTG problem.

thanks again.

----- Original Message ----
From: John Beetem <johnb...@yahoo.com>
To: Beagle Board <beagl...@googlegroups.com>
Sent: Wednesday, October 8, 2008 1:02:17 PM
Subject: [beagleboard] Re: USB OTG host in Angstrom


> When Linux boots, the devices listed under /proc/bus/usb contain
> these:
> So it looks like there's an EHCI controller in my system. But no
> devices registered on the bus.

Reply all
Reply to author
Forward
0 new messages