OTG : hub questions

10 views
Skip to first unread message

Guylhem Aznar

unread,
May 24, 2009, 11:23:52 PM5/24/09
to beagl...@googlegroups.com
Hello

I have a problem with the USB OTG port. For some reason, it reports
itself as a HUB, and therefore refuses any bus-powered hub- even if
the device is simply a keyboard with happens to have 2 USB ports that
I do not plan to use.

The EHCI port can't be used - I guess that's because the keyboard is not EHCI.

Is there a workaround to make the MUSB HDRC host driver work like a
USB master port, and not as a hub ??

BTW, why does the dmesg reports a 3 ports hub has been detected, even
when there's nothing connected ??

Thanks
Guylhem

--
Dr. Guylhem Aznar, MD PhD

Unité d'Analyse Médico-Économique
Service de Santé Publique et d'Économie de la Santé
Pôle SPSSR
CHU de Fort de France
BP 632
97261 Fort De France Cedex
Martinique, France

Tel : 05 96 55 23 47
Fax : 05 96 75 84 57

John Beetem

unread,
May 26, 2009, 11:55:12 AM5/26/09
to Beagle Board
Guylhem:

A keyboard with additional USB ports is implemented as a USB hub with
one internal connection to the keyboard device and one or more
external USB connectors. A USB device has only one upstream port
(towards the host) so if it has multiple downstream devices it must be
implemented as a hub.

The BeagleBoard RevC EHCI port only supports high-speed USB (480 Mb/
s). Your keyboard/hub is probably a full-speed device so needs to be
plugged into the BeagleBoard OTG USB port with a suitable hard-to-find
cable, or you can plug a high-speed hub into the EHCI port and plug
your keyboard into a downstream port of the high-speed hub.

Lots of useful USB information at the BeagleBoard Wiki and FAQ:
http://elinux.org/BeagleBoard#USB
http://elinux.org/BeagleBoardFAQ#USB_2.0_EHCI_HS_connector

Hope this helps.
John

John Beetem

unread,
May 26, 2009, 12:10:26 PM5/26/09
to Beagle Board
Guylhem:

Actually, I think I read your question wrong. It sounds like you're
trying to use the BeagleBoard OTG port to connect to your keyboard/hub
but the BeagleBoard OTG port is in device mode instead of host mode.
The usual cause of this is using a Mini-B plug instead of a Mini-A
plug. The Mini-A plug shorts ID pin 4 to GND pin 5 to tell the OTG
port to run in host mode. A useful experiment is to short pins 4 and
5 with a probe, pin, or piece of wire while Linux is booting. Once
Linux has completed booting, you no longer need the wire. If this is
indeed the problem you can permanently short pins 4 and 5 by getting a
Mini-A cable (they're hard to find), modifying a Mini-B cable, or
shorting pins 4 and 5 as described in the BeagleBoard Wiki.

On enumeration: hubs are always detected as hubs even if nothing is
connected to them. This is necessary so that software can poll the
hubs' ports to see if anything does get plugged in after the OS is
running.

Hope this helps,
John

Guylhem Aznar

unread,
May 26, 2009, 2:47:42 PM5/26/09
to beagl...@googlegroups.com
Hello

On Tue, May 26, 2009 at 12:10, John Beetem <johnb...@yahoo.com> wrote:
> The usual cause of this is using a Mini-B plug instead of a Mini-A

No, I'm using a mini A. To be sure it works fine, I did even shorted
the pins on the motherboard.
I can plug USb peripherals and they are detected.

However, my keyboard can not work because the kernel believes I'm
daisy-chaining 2 bus-powered hubs.
The keyboard has a hub, ok, but is the OTG port on an internal hub on
the beagleboard?

The kernel thinks so.

That would explain why the kernel refuses to accept the keyboard
because it's not a externally powered usb hub.

IMHO either :
- the OTG port is indeed on an internal hub, which then shouldn't be
declared as bus powered
- the OTG port is on no internal hub, and the reference should be removed

In any case it seems weird. Maybe a sysfs option to allow daisy
chaining bus-powered hubs, at the sole resposability of the user,
would be interesting.

John Beetem

unread,
May 26, 2009, 5:29:10 PM5/26/09
to Beagle Board
Guylhem,

Interesting. Yes, I remember seeing Ångström find the root hub, which
is inside the OMAP chip. This is consistent with the USB 2.0
standard, where there is always a root hub integrated with the host
controller. (One thing I really like about USB is that the standard
is available free at www.usb.org.)

One possibility is that your keyboard is drawing more than the 100 mA
available from the BeagleBoard's OTG port. 100 mA is enough to drive
a single low-powered device, but not enough for a hub and multiple
devices. In my own case, I found that I could run a bus-powered hub
and mouse, but adding the keyboard caused Ångström to continuously
disconnect and reconnect my USB devices. This suggests that it is OK
to connect a bus-powered hub to the BeagleBoard OTG as long as it
doesn't draw more than 100 mA (or was back in August 2008). Maybe the
software has changed since then so you can't use an external bus-
powered hub. Or maybe my $5 hub lied and told the host controller
that it was self-powered even when the external power supply wasn't
connected.

One thing you might try is borrowing some current from the 500 mA EHCI
port using a USB Y cable similar to the one shown in Figure 2 of the
BeagleBoard System Reference Manual (rev C2.2). As I understand it,
the extra USB "A" cable simply connects the VCC and GND wires and
omits the data signals so that you can provide more power to a device.

John

Siarhei Siamashka

unread,
Aug 15, 2009, 6:00:25 PM8/15/09
to beagl...@googlegroups.com

Is it possible to modify/configure the kernel so that OTG always works
in host mode regardless of the status of ID pin? This would allow to use
Mini-B cable/adapter for OTG without any HW mods. Mini-A cables just do not
seem to be available in local shops.

I wonder if it would be possible to have Micro-AB plug for OTG in one of the
next revisions of beagleboard? Seems like Micro-A cables/adapters are much
easier to find. This has been already proposed on the list long ago:
http://groups.google.com/group/beagleboard/browse_thread/thread/4765b005528befce

--
Best regards,
Siarhei Siamashka

signature.asc
Reply all
Reply to author
Forward
0 new messages