OTG issue

Hi,
Until recently I've been using my beagleboard(rev c3) with the
validation (revC) kernel and bootloader, with the following USB setup:
OTG: hub+keyboard+mouse (bus powered)
Host: 2.5" HDD (bus powered)

It was working fine until last week, when I changed the kernel to OE
2.6.29-r46 (bootloader remained the same). Since then OTG stopped
working in host mode: hub doesn't get power and devices not
enumerated.

I tried to keep the two kernel configs as similar as possible, but as
the validation is 2.6.28 only and the OE kernel tons of patches
applied, they are quite different.

Has anyone used a recent OE kernel with OTG host mode? Can I have the
kernel config for it?
I can also provide my configs if someone wants to have a look at it
(didn't want to flood the list).

Regards,
Gyorgy

Hi Gyorgy,

This has the otg port setup you need, for that application..

( i run all my beagleboards with the root file system on external usb
harddrives on the otg port)

http://www.rcn-ee.net/deb/kernel/beagle/jaunty/v2.6.29-58cf2f1-oer45.1/defconfig

Regards,

Hi Robert,
I had a busy weekend but finally managed to check your kernel config.
It was essentially the same as mine, except for the SmartReflex
setting. I've checked the kernel with 2 U-boot versions:
U-Boot 2009.01-dirty (Feb 19 2009 - 12:22:31) - RevC validation
U-Boot 2009.06-rc2 (Oct 10 2009 - 20:01:12) - recent OE

In both cases I had the same results:
- OTG port does not provide power
- I had to explicitly plug in miniA-to-A cable to trigger enumeration

By the later I mean if I power up the board with everything connected
OTG devices are not recognized. Kernel stops waiting for the root
device and I have to remove the miniA plug from the OTG connector and
reinsert it to continue booting.
Also there's no /sys/devices/platform/musb-hdrc/mode to get/set OTG
mode in this kernel version.

So OTG works in host mode, but functionality is not what it should be.
I'm still wondering what patch/setting do I need for proper bus
powered OTG mode with recent OE kernels (rev C3 BB). Pointers also
welcome how to investigate this issue, as I don't know were to
start... (apart from diffing 2 kernel trees, but that might take a
while)

I've also seen somebody mentioning on this list that his keyboard not
working on the OTG port, I think it's the same lack of power supply.

Regards,
Gyorgy

Hi Robert,
I had a busy weekend but finally managed to check your kernel config.
It was essentially the same as mine, except for the SmartReflex
setting. I've checked the kernel with 2 U-boot versions:
U-Boot 2009.01-dirty (Feb 19 2009 - 12:22:31) - RevC validation
U-Boot 2009.06-rc2 (Oct 10 2009 - 20:01:12) - recent OE

In both cases I had the same results:
- OTG port does not provide power
- I had to explicitly plug in miniA-to-A cable to trigger enumeration

By the later I mean if I power up the board with everything connected
OTG devices are not recognized. Kernel stops waiting for the root
device and I have to remove the miniA plug from the OTG connector and
reinsert it to continue booting.
Also there's no /sys/devices/platform/musb-hdrc/mode to get/set OTG
mode in this kernel version.

So OTG works in host mode, but functionality is not what it should be.
I'm still wondering what patch/setting do I need for proper bus
powered OTG mode with recent OE kernels (rev C3 BB). Pointers also
welcome how to investigate this issue, as I don't know were to
start... (apart from diffing 2 kernel trees, but that might take a
while)

The otg is setup for both:

( ) USB Host
( ) USB Peripheral (gadget stack)
(X) Both host and peripheral: USB OTG (On The Go) Device

The cable connected to the otg port sets the mode, your mini-a to a is
setting 'host' mode...

I've also seen somebody mentioning on this list that his keyboard not
working on the OTG port, I think it's the same lack of power supply.

The otg port can only handle a small limited amount of current..

Regards,

My point is:
With the validation kernel OTG works perfectly (provides power, things
get recognized at boot).
With the OE kernel (even with the config you provided) these doesn't work.
So, the _same_ HW setup works with one kernel and fails with the
other, I want to find out what causes the difference in behaviour.

BTW, I know OTG provides limited amount of current. But AFAIK
BeagleBoard is rated 100mA which should be more than enough for a
keyboard or a mouse.

Regards,
Gyorgy

Hi All,
Issue solved. Don't know how, but everything works now.

I replaced the power supply (probably this made the trick), unplugged
everything, and replugged everything. And it worked.

Bootloader and kernel: U-Boot 2009.06-rc2 (OE), 2.6.29-r46 (OE, with
Robert's config)
OTG: hub, keyboard, mouse (bus powered); cable modem (has it's own power supply)
HOST: 2.5" HDD (bus powered)

The config seems to be quite stable, it's already up 12+ hours
building Gentoo packages.

Regards,
Gyorgy

Also there's no /sys/devices/platform/musb-hdrc/mode to get/set OTG
mode in this kernel version.

Linux beagleboard 2.6.29-omap1 #1 PREEMPT Tue Nov 3 16:02:56 CET 2009
armv7l GNU
/Linux

kernel r46

rev B7

OTG doesn't enumerate usb devices.

Instead kernel r35 does.

I have tried several times but r46 doesn't work.

Try to set OTG as host only in kernel configuration and check whether it enumerates.
Try it for test purpose but it is not useful if you are going to use it as both OTG and host

Regards,
Omkar