This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Suspend issues with TPS65930 OTG in DM373x

Other Parts Discussed in Thread: OMAP3530

Hi All,

We are using custom board with Android Gingerbread 2.3.4 with 2.6.37 kernel version.

The suspend operation is working in following two cases.

  1. No devices connected to OTG port
  2. Mouse or Keyboard is connected to OTG port. Here OTG acts as Host.

Log:

[ 41.793640] request_suspend_state: sleep (0->3) at 41978576657 (2000-01-02 20:09:19.382537837 UTC)

[ 42.800018] stop_drawing_early_suspend: timeout waiting for userspace to stop drawing

[ 42.831939] PM: Syncing filesystems ... done.

[ 42.846221] Freezing user space processes ... (elapsed 0.01 seconds) done.

[ 42.873107] Freezing remaining freezable tasks ... (elapsed 0.03 seconds) done.

[ 42.914642] Suspending console(s) (use no_console_suspend to debug)

But the suspend is not working while connecting our device to the computer with OTG port. Here OTG acting as a client. I tried by disabling USB debugging option also. still it is not entering into suspend state.

Log:

[ 88.502136] request_suspend_state: sleep (0->3) at 54260467543 (2000-01-02 20:10:06.822265618 UTC)

[ 89.531341] stop_drawing_early_suspend: timeout waiting for userspace to stop drawing

[ 100.545257] android_usb gadget: high speed config #1: android

[ 100.720855] android_usb gadget: high speed config #1: android

[ 100.726989] android_usb gadget: common->fsg is NULL in fsg_setup at 628

[ 100.733886] ------------[ cut here ]------------

[ 100.738708] WARNING: at drivers/usb/gadget/f_mass_storage.c:468 fsg_setup+0x6c/0x114()

[ 100.746917] Modules linked in: wl12xx mac80211 cfg80211 compat sdmak lpm_omap3530 dsplinkk cmemk

[ 100.756103] Backtrace:

[ 100.758666] [<c00ae128>] (dump_backtrace+0x0/0x110) from [<c05a56b8>] (dump_stack+0x18/0x1c)

[ 100.767456] r6:000001d4 r5:c03adba0 r4:00000000 r3:c076709c

[ 100.773345] [<c05a56a0>] (dump_stack+0x0/0x1c) from [<c00d6854>] (warn_slowpath_common+0x54/0x6c)

[ 100.782592] [<c00d6800>] (warn_slowpath_common+0x0/0x6c) from [<c00d6890>] (warn_slowpath_null+0x24/0x2c)

[ 100.792541] r8:ffffffa1 r7:00000000 r6:00000000 r5:00000000 r4:00000000

[ 100.799346] r3:00000009

[ 100.802093] [<c00d686c>] (warn_slowpath_null+0x0/0x2c) from [<c03adba0>] (fsg_setup+0x6c/0x114)

[ 100.811126] [<c03adb34>] (fsg_setup+0x0/0x114) from [<c03a9b68>] (android_setup_config+0x3c/0x68)

[ 100.820373] r7:00000000 r6:ce87bbe4 r5:c078b868 r4:00000004

[ 100.826263] [<c03a9b2c>] (android_setup_config+0x0/0x68) from [<c03ab1d8>] (composite_setup+0xaf4/0xbc0)

[ 100.836151] r6:c078b858 r5:ce87bbe4 r4:ce256b64 r3:c03a9b2c

[ 100.842041] [<c03aa6e4>] (composite_setup+0x0/0xbc0) from [<c03a0894>] (musb_g_ep0_irq+0xae0/0xc40)

[ 100.851470] [<c039fdb4>] (musb_g_ep0_irq+0x0/0xc40) from [<c039f518>] (musb_interrupt+0xbe0/0xd2c)

[ 100.860809] [<c039e938>] (musb_interrupt+0x0/0xd2c) from [<c039f6d0>] (generic_interrupt+0x6c/0x98)

[ 100.870239] [<c039f664>] (generic_interrupt+0x0/0x98) from [<c010d35c>] (handle_IRQ_event+0x68/0x178)

[ 100.879821] r6:0000005c r5:0000005c r4:ce8e8740 r3:c07a60c0

[ 100.885742] [<c010d2f4>] (handle_IRQ_event+0x0/0x178) from [<c010f608>] (handle_level_irq+0xb8/0x128)

[ 100.895324] [<c010f550>] (handle_level_irq+0x0/0x128) from [<c009f07c>] (asm_do_IRQ+0x7c/0xa0)

[ 100.904296] r5:00000000 r4:0000005c

[ 100.908020] [<c009f000>] (asm_do_IRQ+0x0/0xa0) from [<c05a7874>] (__irq_svc+0x34/0x80)

[ 100.916259] Exception stack(0xce87bce0 to 0xce87bd28)

[ 100.921508] bce0: 00000000 d4fc2f97 00000061 00000001 c05b0ed4 000000a9 00000000 c0104204

[ 100.930023] bd00: ce87bde4 c0730588 c05b0efc ce87bd54 00000069 ce87bd28 c010423c c0105184

[ 100.938537] bd20: 60000013 ffffffff

[ 100.942169] r5:fa200000 r4:ffffffff

[ 100.945892] [<c0105158>] (T.666+0x0/0x78) from [<c01051fc>] (each_symbol+0x2c/0x144)

[ 100.953948] [<c01051d0>] (each_symbol+0x0/0x144) from [<c0105348>] (find_symbol+0x34/0x64)

[ 100.962554] [<c0105314>] (find_symbol+0x0/0x64) from [<c0105d7c>] (resolve_symbol+0x4c/0xd0)

[ 100.971343] r5:bfaa5790 r4:bf0c1dc8

[ 100.975067] [<c0105d30>] (resolve_symbol+0x0/0xd0) from [<c0105eb8>] (simplify_symbols+0xb8/0x248)

[ 100.984375] r8:ce87a000 r7:00000000 r6:ce87bef4 r5:bfab2060 r4:bf0c1dc8

[ 100.991363] [<c0105e00>] (simplify_symbols+0x0/0x248) from [<c01063f0>] (load_module+0x3a8/0xf6c)

[ 101.000610] [<c0106048>] (load_module+0x0/0xf6c) from [<c0107000>] (sys_init_module+0x4c/0x1bc)

[ 101.009674] [<c0106fb4>] (sys_init_module+0x0/0x1bc) from [<c00a9b40>] (ret_fast_syscall+0x0/0x30)

[ 101.018981] r7:00000080 r6:00000000 r5:be86386c r4:0001b6dc

[ 101.024902] ---[ end trace 1b75b31a2719ed20 ]---

[ 101.196929] android_usb gadget: high speed config #1: android

[ 101.373168] android_usb gadget: high speed config #1: android

After removing USB otg cable from computer:

Log:

[ 161.313690] register value 81

[ 161.317657] Disconnected register value d

[ 161.321868] USB Power Supply Changed

[ 161.339050] musb android_usb gadget disconnected.

[ 161.367034] PM: Syncing filesystems ... done.

[ 161.396728] Freezing user space processes ... (elapsed 0.02 seconds) done.

[ 161.424591] Freezing remaining freezable tasks ... (elapsed 0.03 seconds) done.

[ 161.466217] Suspending console(s) (use no_console_suspend to debug)

I saw some limitation in

TI-Android-GingerBread-2.3.4-DevKit-2.1 PortingGuides

at http://processors.wiki.ti.com/index.php/TI-Android-GingerBread-2.3.4-DevKit-2.1_PortingGuides#Power_Management_Framework_in_Kernel

Limitations:

1. In Suspend, If USB OTG cable is connected, it makes Powerdomain (core_pwrdm) not entering to sleep State

  • Still this limitation is there? Do you have any patches for this?

Can you please help me on this?

Thanks,

Naresh