USB host mode on OTG doesn't work on Maverick with BeagleBoard

Bug #608312 reported by Ricardo Salveti
28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Won't Fix
High
Paolo Pisati
Maverick
Invalid
High
Unassigned
Natty
Invalid
High
Paolo Pisati

Bug Description

When booting Maverick on a C4 BeagleBoard the host mode on USB OTG doesn't work as it should.

In theory it should just work when I add a micro USB cable (OTG compatible) connected to a powered hub.

Checking the device status:
Before plugging the cable:
ubuntu@beagle-maverick:/sys/devices/platform/musb_hdrc$ cat mode
b_idle

After plugging the cable:
ubuntu@beagle-maverick:/sys/devices/platform/musb_hdrc$ cat mode
a_idle

When it works it should just display "host" when you have the cable connected, just like it worked on Lucid.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: linux-image-2.6.35-9-omap 2.6.35-9.14
Regression: Yes
Reproducible: Yes
ProcVersionSignature: Ubuntu 2.6.35-9.14-omap 2.6.35-rc5
Uname: Linux 2.6.35-9-omap armv7l
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
AplayDevices:
 **** List of PLAYBACK Hardware Devices ****
 card 0: omap3beagle [omap3beagle], device 0: TWL4030 twl4030-0 []
   Subdevices: 1/1
   Subdevice #0: subdevice #0
Architecture: armel
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: omap3beagle [omap3beagle], device 0: TWL4030 twl4030-0 []
   Subdevices: 1/1
   Subdevice #0: subdevice #0
Date: Wed Jul 21 17:11:23 2010
Lspci:
 Error: command ['lspci', '-vvnn'] failed with exit code 1: pcilib: Cannot open /proc/bus/pci
 lspci: Cannot find any working access method.
ProcCmdLine: splash ro elevator=noop vram=12M omapfb.mode=dvi:1280x720MR-16@60 root=UUID=f9533185-9f35-409b-9ec2-f9af70757512 fixrtc console=ttyS2,115200n8 serialtty=ttyS2
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: linux

Revision history for this message
Ricardo Salveti (rsalveti) wrote :
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

It's probably a config issue, cause when compiling and using the same kernel with config file from http://bazaar.launchpad.net/~beagleboard-kernel/+junk/2.6.35-devel/annotate/head:/patches/defconfig it does work as expected.

Revision history for this message
Ricardo Salveti (rsalveti) wrote :
Download full text (5.1 KiB)

Argh, for some reason the OTG just get initialized when you load the g_ether driver.

Just activated the debug and here's what I got:

Initializing MUSB:

[ 16.670837] musb_hdrc: version 6.0, musb-dma, otg (peripheral+host), debug=0
[ 16.767852] musb_hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
[ 16.767913] musb_hdrc: MHDRC RTL version 1.400
[ 16.767913] musb_hdrc: setup fifo_mode 4
[ 16.767944] musb_hdrc: 28/31 max ep, 16384/16384 memory
[ 16.767974] MUSB - musb_core_init 1518: musb_hdrc: hw_ep 0shared, max 64
[ 16.767974] MUSB - musb_core_init 1518: musb_hdrc: hw_ep 1tx, max 512
[ 16.768005] MUSB - musb_core_init 1527: musb_hdrc: hw_ep 1rx, max 512
[ 16.768005] MUSB - musb_core_init 1518: musb_hdrc: hw_ep 2tx, max 512
[ 16.768035] MUSB - musb_core_init 1527: musb_hdrc: hw_ep 2rx, max 512
[ 16.768066] MUSB - musb_core_init 1518: musb_hdrc: hw_ep 3tx, max 512
[ 16.768066] MUSB - musb_core_init 1527: musb_hdrc: hw_ep 3rx, max 512
[ 16.768096] MUSB - musb_core_init 1518: musb_hdrc: hw_ep 4tx, max 512
[ 16.768127] MUSB - musb_core_init 1527: musb_hdrc: hw_ep 4rx, max 512
[ 16.768127] MUSB - musb_core_init 1518: musb_hdrc: hw_ep 5tx, max 512
[ 16.768157] MUSB - musb_core_init 1527: musb_hdrc: hw_ep 5rx, max 512
[ 16.768157] MUSB - musb_core_init 1518: musb_hdrc: hw_ep 6tx, max 512
[ 16.768188] MUSB - musb_core_init 1527: musb_hdrc: hw_ep 6rx, max 512
[ 16.768218] MUSB - musb_core_init 1518: musb_hdrc: hw_ep 7tx, max 512
[ 16.768218] MUSB - musb_core_init 1527: musb_hdrc: hw_ep 7rx, max 512
[ 16.768249] MUSB - musb_core_init 1518: musb_hdrc: hw_ep 8tx, max 512
[ 16.768249] MUSB - musb_core_init 1527: musb_hdrc: hw_ep 8rx, max 512
[ 16.768280] MUSB - musb_core_init 1518: musb_hdrc: hw_ep 9tx, max 512
[ 16.768310] MUSB - musb_core_init 1527: musb_hdrc: hw_ep 9rx, max 512
[ 16.768310] MUSB - musb_core_init 1518: musb_hdrc: hw_ep 10tx, max 256
[ 16.768341] MUSB - musb_core_init 1527: musb_hdrc: hw_ep 10rx, max 64
[ 16.768371] MUSB - musb_core_init 1518: musb_hdrc: hw_ep 11tx, max 256
[ 16.768371] MUSB - musb_core_init 1527: musb_hdrc: hw_ep 11rx, max 64
[ 16.768402] MUSB - musb_core_init 1518: musb_hdrc: hw_ep 12tx, max 256
[ 16.768432] MUSB - musb_core_init 1527: musb_hdrc: hw_ep 12rx, max 64
[ 16.768463] MUSB - musb_core_init 1518: musb_hdrc: hw_ep 13shared, max 4096
[ 16.768463] MUSB - musb_core_init 1518: musb_hdrc: hw_ep 14shared, max 1024
[ 16.768493] MUSB - musb_core_init 1518: musb_hdrc: hw_ep 15shared, max 1024
[ 16.768585] MUSB - musb_platform_try_idle 132: b_idle inactive, for idle timer for 7 ms
[ 16.768707] MUSB - musb_init_controller 2134: OTG mode, status 0, dev80
[ 16.768798]...

Read more...

Bryan Wu (cooloney)
Changed in linux (Ubuntu):
assignee: nobody → Bryan Wu (cooloney)
Revision history for this message
Bryan Wu (cooloney) wrote :

We found the root cause of this issue is musb driver only call usb_add_hcd in gadget init code when it is OTG mode. And gadget register driver will only be called when we build-in gadget class driver or modprobe gadget class driver manually.

I prepared a patch for upstream review here:
http://kernel.ubuntu.com/git?p=roc/ubuntu-lucid.git;a=commitdiff;h=fc58ea3748869d2fa811dff26aa0fa07490b22b2

kernel package is here:
http://people.canonical.com/~roc/kernel/lp566645_otg/

Thanks

Changed in linux (Ubuntu):
importance: Undecided → High
status: New → In Progress
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Bryan, as this bug also affects the Maverick's kernel, can you create another kernel package based on the Maverick one?

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Tobin, can you please test this issue when Bryan releases a new kernel for Maverick?

Thanks in advance.

Tobin Davis (gruemaster)
tags: added: regression-tested
removed: regression-potential
Revision history for this message
Bryan Wu (cooloney) wrote :

Please find the Maverick kernel here:
http://people.canonical.com/~roc/kernel/lp566645_otg/

I tested it on Gumstix board as well as Beagle board, it works.

Git patches:
http://kernel.ubuntu.com/git?p=roc/ubuntu-maverick.git;a=shortlog;h=refs/heads/otg

Tobin Davis (gruemaster)
tags: added: regression-potential
removed: regression-tested
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Tobin, any chance to test the possible fixes?

And Bryan, did you get any other review about your patches? It'd be good to have this fixed for Maverick.

Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

removed regression-potential tag as every bug has the potential to be a regression. As such the bug team has deprecated the use of that tag.

~JFo

tags: removed: regression-potential
Revision history for this message
Rodrigo Belem (rbelem) wrote :

It is not working in natty too.

Changed in linux (Ubuntu Natty):
milestone: none → ubuntu-11.04
description: updated
summary: - Usb host mode on OTG doesn't work on Maverick with BeagleBoard
+ USB host mode on OTG doesn't work on Maverick with BeagleBoard
Bryan Wu (cooloney)
Changed in linux (Ubuntu Natty):
assignee: Bryan Wu (cooloney) → Paolo Pisati (p-pisati)
Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

As this is not likely to make it in time for the release, but is definitely SRU-worthy, I've reset the milestone to natty-updates to see that it is tracked for that series.

~JFo

Changed in linux (Ubuntu Natty):
milestone: ubuntu-11.04 → natty-updates
Changed in linux (Ubuntu Maverick):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
JC Hulce (soaringsky) wrote :

This bug affects Ubuntu 10.10, Maverick Meerkat. Maverick has reached end-of-life and is no longer supported, so I am closing the bugtask for Maverick. Please upgrade to a newer version of Ubuntu.
More information here: https://lists.ubuntu.com/archives/ubuntu-announce/2012-April/000158.html

Changed in linux (Ubuntu Maverick):
status: Confirmed → Invalid
Gary M (garym)
tags: added: natty
Revision history for this message
Joseph Salisbury (jsalisbury) wrote : Unsupported series, setting status to "Won't Fix".

This bug was filed against a series that is no longer supported and so is being marked as Won't Fix. If this issue still exists in a supported series, please file a new bug.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: In Progress → Won't Fix
Revision history for this message
dino99 (9d9) wrote :
Changed in linux (Ubuntu Natty):
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.