[Bug 608312] Re: Usb host mode on OTG doesn't work on Maverick with BeagleBoard

Ricardo Salveti rsalveti at rsalveti.net
Wed Jul 21 23:51:41 UTC 2010


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] musb_hdrc musb_hdrc: USB OTG mode controller at fa0ab000 using DMA, IRQ 92

After the initialization if you just plug the OTG cable nothing will
happen, but when I load the g_ether module this is what it shows:

[  483.068023] MUSB - usb_gadget_register_driver 1719: registering driver g_ether
[  483.068115] g_ether gadget: using random self ethernet address
[  483.068145] g_ether gadget: using random host ethernet address
[  483.093505] usb0: MAC 92:91:16:c8:0a:cd
[  483.093536] usb0: HOST MAC b2:bb:bf:46:cc:bb
[  483.094482] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[  483.094512] g_ether gadget: g_ether ready
[  483.094543] MUSB - usb_gadget_register_driver 1766: OTG startup...
[  483.094573] musb_hdrc musb_hdrc: MUSB HDRC host driver
[  483.094604] musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 2
[  483.105316] hub 2-0:1.0: USB hub found
[  483.105377] hub 2-0:1.0: 1 port detected
[  483.105438] MUSB - musb_start 948: <== devctl 80
[  483.105438] MUSB - musb_hub_control 426: set feature 8
[  483.105468] MUSB - musb_interrupt 1584: ** IRQ peripheral usb0040 tx0000 rx0000
[  483.105499] MUSB - musb_stage0_irq 460: <== Power=e0, DevCtl=81, int_usb=0x40
[  483.105529] MUSB - musb_stage0_irq 553: SESSION_REQUEST (b_idle)
[  483.105529] MUSB - omap_set_vbus 177: VBUS a_wait_vrise, devctl 81 
[  483.202819] MUSB - musb_hub_control 356: port status 00000100

Then if I plug the cable the OTG works just as expected:
root at beagle-maverick:~# cat /sys/devices/platform/musb_hdrc/mode 
b_idle
root at beagle-maverick:~# modprobe g_ether
root at beagle-maverick:~# 
root at beagle-maverick:~# cat /sys/devices/platform/musb_hdrc/mode 
a_host

The kernel worked with the other config file by default because the
g_ether is compiled as built-in and not as a module.

Now we need to identify if this should be the expected behavior or if
the musb module should initialize the gadget and host part even without
loading the g_ether module.

-- 
Usb host mode on OTG doesn't work on Maverick with BeagleBoard
https://bugs.launchpad.net/bugs/608312
You received this bug notification because you are a member of Kernel
Bugs, which is subscribed to linux in ubuntu.




More information about the kernel-bugs mailing list