Bug 64771 - [pandaboard] OTG port not working
Summary: [pandaboard] OTG port not working
Status: RESOLVED OBSOLETE
Alias: None
Product: Drivers
Classification: Unclassified
Component: USB (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Greg Kroah-Hartman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-10 22:54 UTC by Tobias Jakobi
Modified: 2014-10-11 20:37 UTC (History)
1 user (show)

See Also:
Kernel Version: 3.12
Subsystem:
Regression: No
Bisected commit-id:


Attachments
full kernel log (23.21 KB, text/plain)
2013-11-10 22:55 UTC, Tobias Jakobi
Details
kernel config (70.18 KB, text/plain)
2013-11-10 22:56 UTC, Tobias Jakobi
Details

Description Tobias Jakobi 2013-11-10 22:54:51 UTC
Hello,

I can't get the USB OTG port working on the Pandaboard ES.

for arg in phy-twl6030-usb omap2430; do
modprobe $arg
done

lsmod:
Module                  Size  Used by
phy_twl6030_usb         4162  0 
omap2430                6314  1 phy_twl6030_usb
musb_hdrc              30753  1 omap2430

Looks like that the relevant modules are loaded.

dmesg:
[  517.636169] HS USB OTG: no transceiver configured
[  517.636169] musb-hdrc musb-hdrc.1.auto: musb_init_controller failed with status -517
[  517.636169] platform musb-hdrc.1.auto: Driver musb-hdrc requests probe deferral
[  517.636566] platform 4a002260.bandgap: Driver ti-soc-thermal requests probe deferral
[  517.636566] HS USB OTG: no transceiver configured
[  517.636840] musb-hdrc musb-hdrc.1.auto: musb_init_controller failed with status -517
[  517.636871] platform musb-hdrc.1.auto: Driver musb-hdrc requests probe deferral
[  517.642761] twl6030_usb usb-comparator.26: Initialized TWL6030 USB module
[  517.644714] platform 4a002260.bandgap: Driver ti-soc-thermal requests probe deferral
[  517.644866] HS USB OTG: no transceiver configured
[  517.644897] musb-hdrc musb-hdrc.1.auto: musb_init_controller failed with status -517
[  517.644897] platform musb-hdrc.1.auto: Driver musb-hdrc requests probe deferral
[  517.669189] omap_musb_mailbox: musb core is not yet ready

The correct cable is attached to the board, with a usb-audio stick. This combination works on the 3.4.x ti kernel. Here I don't even see how the bus that the OTG chip provides, is enumerated.

Greets,
Tobias
Comment 1 Tobias Jakobi 2013-11-10 22:55:38 UTC
Created attachment 114191 [details]
full kernel log
Comment 2 Tobias Jakobi 2013-11-10 22:56:14 UTC
Created attachment 114201 [details]
kernel config
Comment 3 Greg Kroah-Hartman 2013-11-10 23:18:18 UTC
On Sun, Nov 10, 2013 at 10:54:51PM +0000, bugzilla-daemon@bugzilla.kernel.org wrote:
>            Summary: [pandaboard] OTG port not working

Please contact the pandaboard developers, nothing I can do about it,
sorry.

Or email this to linux-usb@vger.kernel.org, the usb developers there
should be able to help out.
Comment 4 Tobias Jakobi 2013-11-10 23:22:26 UTC
Thanks, I CCed both linux-usb and linux-omap.
Comment 5 kishon 2013-11-11 13:03:46 UTC
CONFIG_OMAP_OCP2SCP should also be enabled. omap usb2 phy is connected to ocp2scp. Only during ocp2scp probing omap usb2 phy will be created.

In your case ocp2scp is not enabled and hence omap usb2 phy is not created.

Btw which defconfig did you use? we have enabled it in omap2plus_defconfig ;-)
Comment 6 Tobias Jakobi 2013-11-11 14:12:50 UTC
Hello, thanks for the hint. Going to try this out this evening.

Concerning the defconfig, I based my current config on the defconfig from 3.12-rc4, at that time CONFIG_OMAP_OCP2SCP wasn't enabled yet (looks like you only just recently added it).
Comment 7 Tobias Jakobi 2013-11-11 21:33:30 UTC
So I added CONFIG_OMAP_OCP2SCP and this at least let's me progress partially.

This is what I get:
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0 
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb3: Product: MUSB HDRC host driver
usb usb3: Manufacturer: Linux 3.12.0+ musb-hcd
usb usb3: SerialNumber: musb-hdrc.1.auto
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 1 port detected
twl6030_usb usb-comparator.26: Initialized TWL6030 USB module
musb_bus_suspend 2457: trying to suspend as a_idle while active
musb_bus_suspend 2457: trying to suspend as a_idle while active
musb_bus_suspend 2457: trying to suspend as a_idle while active
musb_bus_suspend 2457: trying to suspend as a_idle while active
musb_bus_suspend 2457: trying to suspend as a_idle while active
musb_bus_suspend 2457: trying to suspend as a_idle while active
musb_bus_suspend 2457: trying to suspend as a_idle while active
musb_bus_suspend 2457: trying to suspend as a_idle while active
musb_bus_suspend 2457: trying to suspend as a_idle while active
musb_bus_suspend 2457: trying to suspend as a_idle while active
musb_bus_suspend 2457: trying to suspend as a_idle while active
musb_bus_suspend 2457: trying to suspend as a_idle while active

The last message is repeated ad infinitum and quickly fills my root partition. I tried this both with the OTG cable connected and not (also with cable connected before boot).

The device attached to the port also isn't powered when I insert the relevant modules (the optical output of the usb-audio stick then lights up).

I currently have the driver compiled in 'host mode only' mode. The musb_bus_suspend seems to come from musb_host. I'm now recompiling with 'dual role' mode, maybe this gets me further.
Comment 8 Tobias Jakobi 2013-11-12 00:41:04 UTC
Now tested with 'dual role', which at least fixes the kernel log spamming. Device still doesn't work though.

Again I tried everything with either OTG cable plugged in from before boot, plugging in after module load, not plugged in at all.

Also, this happens when I try to switch musb into host mode:
echo -n host > /sys/devices/44000000.ocp/4a0ab000.usb_otg_hs/musb-hdrc.1.auto/mode

dmesg:
[  273.218292] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
[  273.218353] musb-hdrc: MHDRC RTL version 2.0 
[  273.218353] musb-hdrc: setup fifo_mode 4
[  273.218383] musb-hdrc: 28/31 max ep, 16384/16384 memory
[  273.218444] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[  273.218444] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[  273.218749] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
[  273.218780] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[  273.218780] usb usb3: Product: MUSB HDRC host driver
[  273.218811] usb usb3: Manufacturer: Linux 3.12.0+ musb-hcd
[  273.218811] usb usb3: SerialNumber: musb-hdrc.1.auto
[  273.219451] hub 3-0:1.0: USB hub found
[  273.219482] hub 3-0:1.0: 1 port detected
[  273.243804] twl6030_usb usb-comparator.26: Initialized TWL6030 USB module
[  327.561157] ------------[ cut here ]------------
[  327.561492] WARNING: CPU: 0 PID: 0 at drivers/bus/omap_l3_noc.c:113 l3_interrupt_handler+0xc0/0x164()
[  327.561492] L3 custom error: MASTER:MPU TARGET:L4CFG
[  327.561492] Modules linked in: phy_twl6030_usb omap2430 musb_hdrc btrfs xor xor_neon zlib_inflate zlib_deflate raid6_pq omapfb cfbfillrect cfbimgblt cfbcopyarea arc4 wl12xx wlcore mac80211 cfg80211 rfkill usb_storage wlcore_sdio
[  327.561553] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.12.0+ #3
[  327.561553] Backtrace: 
[  327.561553] [<c0011988>] (dump_backtrace+0x0/0x10c) from [<c0011b24>] (show_stack+0x18/0x1c)
[  327.561676]  r6:00000071 r5:00000009 r4:00000000 r3:00000000
[  327.561676] [<c0011b0c>] (show_stack+0x0/0x1c) from [<c03f4f90>] (dump_stack+0x78/0x94)
[  327.561676] [<c03f4f18>] (dump_stack+0x0/0x94) from [<c0032cf0>] (warn_slowpath_common+0x6c/0x90)
[  327.561676]  r4:c054fe28 r3:c054c3f4
[  327.561676] [<c0032c84>] (warn_slowpath_common+0x0/0x90) from [<c0032db8>] (warn_slowpath_fmt+0x38/0x40)
[  327.561676]  r8:0000002a r7:c04d0898 r6:c05735d0 r5:f8000400 r4:00080003
[  327.561798] [<c0032d80>] (warn_slowpath_fmt+0x0/0x40) from [<c01e7560>] (l3_interrupt_handler+0xc0/0x164)
[  327.561798]  r3:c05735d4 r2:c04d085c
[  327.561798] [<c01e74a0>] (l3_interrupt_handler+0x0/0x164) from [<c006d508>] (handle_irq_event_percpu+0x54/0x19c)
[  327.561798]  r7:00000000 r6:00000000 r5:ed007054 r4:ed0ca2c0
[  327.561798] [<c006d4b4>] (handle_irq_event_percpu+0x0/0x19c) from [<c006d69c>] (handle_irq_event+0x4c/0x6c)
[  327.561889] [<c006d650>] (handle_irq_event+0x0/0x6c) from [<c0070708>] (handle_fasteoi_irq+0x84/0x150)
[  327.561889]  r6:00000000 r5:0000002a r4:ed007000 r3:00000000
[  327.561920] [<c0070684>] (handle_fasteoi_irq+0x0/0x150) from [<c006ce98>] (generic_handle_irq+0x28/0x38)
[  327.561920]  r4:0000002a r3:c0070684
[  327.561950] [<c006ce70>] (generic_handle_irq+0x0/0x38) from [<c000f0b8>] (handle_IRQ+0x40/0x9c)
[  327.561950]  r4:c054cc7c r3:000001a8
[  327.561981] [<c000f078>] (handle_IRQ+0x0/0x9c) from [<c00084d4>] (gic_handle_irq+0x30/0x64)
[  327.561981]  r6:c054ff38 r5:c05567f4 r4:fa24010c r3:000000a0
[  327.562011] [<c00084a4>] (gic_handle_irq+0x0/0x64) from [<c0012600>] (__irq_svc+0x40/0x50)
[  327.562011] Exception stack(0xc054ff38 to 0xc054ff80)
[  327.562042] ff20:                                                       c0dd28d0 00000000
[  327.562042] ff40: 00055b34 c0025644 c0585cac 00000001 c0585cac c0556468 c03fd14c c054e000
[  327.562072] ff60: c0556408 c054ff8c c054ff80 c054ff80 c0025270 c000f454 a00f0113 ffffffff
[  327.562072]  r7:c054ff6c r6:ffffffff r5:a00f0113 r4:c000f454
[  327.562103] [<c000f430>] (arch_cpu_idle+0x0/0x38) from [<c006cbb0>] (cpu_startup_entry+0x68/0x138)
[  327.562133] [<c006cb48>] (cpu_startup_entry+0x0/0x138) from [<c03f1ea8>] (rest_init+0x68/0x80)
[  327.562133]  r7:ffffffff r3:00000000
[  327.562133] [<c03f1e40>] (rest_init+0x0/0x80) from [<c051fa30>] (start_kernel+0x278/0x2bc)
[  327.562133] [<c051f7b8>] (start_kernel+0x0/0x2bc) from [<80008070>] (0x80008070)
[  327.562194] ---[ end trace 5c8243954ffb31e2 ]---
Comment 9 Tobias Jakobi 2014-02-28 20:28:40 UTC
Update: I've upgraded to 3.14-rc4 with some USB patches on top (https://patchwork.kernel.org/patch/3686561/). I also went back from dual-mode to host-only mode.

Output after modprobe of phy_twl6030_usb, musb_hdrc and omap2430:
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0 
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb3: Product: MUSB HDRC host driver
usb usb3: Manufacturer: Linux 3.14.0-rc4+ musb-hcd
usb usb3: SerialNumber: musb-hdrc.1.auto
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 1 port detected
twl6030_usb usb-comparator.29: Initialized TWL6030 USB module


echo -n host > /sys/devices/44000000.ocp/4a0ab000.usb_otg_hs/musb-hdrc.1.auto/mode:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 2053 at drivers/bus/omap_l3_noc.c:113 l3_interrupt_handler+0xc0/0x164()
L3 custom error: MASTER:MPU TARGET:L4CFG
Modules linked in: phy_twl6030_usb omap2430 musb_hdrc btrfs xor xor_neon zlib_inflate zlib_deflate raid6_pq omapfb cfbfillrect cfbimgblt cfbcopyarea arc4 wl12xx wlcore mac80211 cfg80211 rfkill usb_storage wlcore_sdio
CPU: 0 PID: 2053 Comm: bash Not tainted 3.14.0-rc4+ #2
Backtrace: 
[<c0011b08>] (dump_backtrace) from [<c0011ca4>] (show_stack+0x18/0x1c)
 r6:00000071 r5:00000009 r4:00000000 r3:00000000
[<c0011c8c>] (show_stack) from [<c0411d38>] (dump_stack+0x78/0x94)
[<c0411cc0>] (dump_stack) from [<c0034700>] (warn_slowpath_common+0x6c/0x90)
 r4:ea1f1d60 r3:c05803c4
[<c0034694>] (warn_slowpath_common) from [<c00347c8>] (warn_slowpath_fmt+0x38/0x40)
 r8:0000002a r7:c04f8e94 r6:c05a0edc r5:f8000400 r4:00080003
[<c0034794>] (warn_slowpath_fmt) from [<c01f7f54>] (l3_interrupt_handler+0xc0/0x164)
 r3:c05a0ee0 r2:c04f8e58
[<c01f7e94>] (l3_interrupt_handler) from [<c0072f84>] (handle_irq_event_percpu+0x54/0x1a0)
 r7:00000000 r6:00000000 r5:eb807054 r4:eb953540
[<c0072f30>] (handle_irq_event_percpu) from [<c007311c>] (handle_irq_event+0x4c/0x6c)
 r10:eb2f6800 r9:eb2f6808 r8:ea0007c0 r7:fa240100 r6:00000000 r5:eb807054
 r4:eb807000
[<c00730d0>] (handle_irq_event) from [<c00761bc>] (handle_fasteoi_irq+0x84/0x150)
 r6:00000000 r5:0000002a r4:eb807000 r3:00000000
[<c0076138>] (handle_fasteoi_irq) from [<c0072914>] (generic_handle_irq+0x28/0x38)
 r4:0000002a r3:c0076138
[<c00728ec>] (generic_handle_irq) from [<c000f218>] (handle_IRQ+0x40/0x9c)
 r4:c0580c38 r3:000001a8
[<c000f1d8>] (handle_IRQ) from [<c0008594>] (gic_handle_irq+0x30/0x64)
 r6:ea1f1e70 r5:c058a86c r4:fa24010c r3:000000a0
[<c0008564>] (gic_handle_irq) from [<c00127c0>] (__irq_svc+0x40/0x50)
Exception stack(0xea1f1e70 to 0xea1f1eb8)
1e60:                                     ea120010 a0070113 00000001 00000005
1e80: 00000000 ea120010 a0070113 00000004 ea0007c0 eb2f6808 eb2f6800 ea1f1ec4
1ea0: ea1f1ec8 ea1f1eb8 bf221898 c04163d4 a0070113 ffffffff
 r7:ea1f1ea4 r6:ffffffff r5:a0070113 r4:c04163d4
[<c04163ac>] (_raw_spin_unlock_irqrestore) from [<bf221898>] (musb_mode_store+0x64/0x118 [musb_hdrc])
[<bf221834>] (musb_mode_store [musb_hdrc]) from [<c027fcb0>] (dev_attr_store+0x20/0x2c)
 r7:00000004 r6:ea1f1f78 r5:ea0007c0 r4:eb0d3ca8
[<c027fc90>] (dev_attr_store) from [<c01403bc>] (sysfs_kf_write+0x4c/0x50)
[<c0140370>] (sysfs_kf_write) from [<c0143db8>] (kernfs_fop_write+0xbc/0x154)
 r5:00000000 r4:00000000
[<c0143cfc>] (kernfs_fop_write) from [<c00e5400>] (vfs_write+0xb4/0x18c)
 r10:00000004 r9:ea1f0000 r8:00000000 r7:ea1f1f78 r6:b6f50000 r5:00000004
 r4:eb14c0c0
[<c00e534c>] (vfs_write) from [<c00e57c4>] (SyS_write+0x44/0x78)
 r10:00000004 r8:00000000 r7:b6f50000 r6:eb14c0c0 r5:00000000 r4:00000000
[<c00e5780>] (SyS_write) from [<c000e920>] (ret_fast_syscall+0x0/0x30)
 r10:00000000 r8:c000eaa4 r7:00000004 r6:b6e7fa80 r5:b6f50000 r4:00000004
---[ end trace 9ca6a37c8bf02d36 ]---
Comment 10 Tobias Jakobi 2014-05-01 11:45:47 UTC
Retested with 3.15.0-rc3 and the issue is still present. I get an almost identical backtrace when issuing the commands.
Comment 11 Tobias Jakobi 2014-10-11 20:37:09 UTC
Abandoning, since I don't own the device anymore.

Note You need to log in before you can comment on or make changes to this bug.