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.

AM335X: System resumes from USB1_PHY without external trigger

Other Parts Discussed in Thread: SN74AUP1G17

I have a custom board with am335x, based on  on it.
I'm running linux 3.12.10-ti2013.12.01 from SDK 07.00.00.00.

When I set the system into standby mode with "echo standby > /sys/power/state", I get this output:

[  139.310366] PM: Syncing filesystems ... done.
[  139.316653] Freezing user space processes ... (elapsed 0.001 seconds) done.
[  139.325244] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[  139.334284] Suspending console(s) (use no_console_suspend to debug)
[  139.421915] PM: suspend of devices complete after 80.142 msecs
[  139.422732] PM: late suspend of devices complete after 0.798 msecs
[  139.423708] PM: noirq suspend of devices complete after 0.958 msecs
[  139.423789] PM: Successfully put all powerdomains to target state
[  139.423789] PM: Wakeup source USB1_PHY
[  139.438159] PM: noirq resume of devices complete after 14.312 msecs
[  139.438871] PM: early resume of devices complete after 0.583 msecs
[  139.439530] net eth0: initializing cpsw version 1.12 (0)
[  139.441171] libphy: PHY 4a101000.mdio:00 not found
[  139.441178] net eth0: phy 4a101000.mdio:00 not found on slave 0
[  139.441470] net eth0: phy found : id is : 0x221622
[  139.711328] PM: resume of devices complete after 272.421 msecs
[  139.782830] Restarting tasks ... done.

There is no device connected to the usb bus, as lsusb shows:
# lsusb
Bus 002 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I can stop the wakeup only by removing the usb hub from the wakeup sources:

echo disabled > /sys/bus/platform/devices/47401b00.usb-phy/power/wakeup

This issue is mentioned in the kernel release notes as LCPD-1191.
But I need a fix for this, since I have to wakeup for a usb fingerprint reader.
My kernel is 3.12.10-ti2013.12.01.

Any hints are welcome.

  • I will forward this to the PM experts. They will respond directly here.
  • Hello Biser,
    has someone had a look on this issue?
    Regards
  • Hi Roland,

    Sorry for the delay. I am looking into this issue for you, and speaking with some other folks to get a correct answer. Will have an update shortly.

    Regards,

    Mike

  • Hello Mike,

    any progress on this issue?
    Sorry for the reminder, but it's urgent for me ...

    Regards,
    Roland
  • Roland,

    Understand your urgency. Since this issue has been known for some time, there may not be a simple fix.

    I assume the hub is soldered down on your board? Which usb hub device are you using?

    When this wakeup occurs, is the fingerprint reader connected? If not, what happens when you standby with the reader, or some other USB device connected and enumerated on the USB bus?

    Regards,
    Mike
  • Hello Mike,

    yes, we soldered our hub down on our board.

    Type is SCM USB2514.

    The fingerprintreader is connected to the Hub, but its power can be switched off.

    The wakeup occurs in either case, see below:

    Wakeup with connected fingerprintreader and usbstick:

    # lsusb;sleep 1;echo standby > /sys/power/state                                                      
    Bus 002 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 005: ID 147e:2016 Upek Biometric Touchchip/Touchstrip Fingerprint Sensor
    Bus 002 Device 006: ID 13fe:4100 Kingston Technology Company Inc. 
    [ 7808.764547] PM: Syncing filesystems ... done. [ 7808.770886] Freezing user space processes ... (elapsed 0.001 seconds) done. [ 7808.779487] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done. [ 7808.788484] Suspending console(s) (use no_console_suspend to debug) [ 7808.816876] PM: suspend of devices complete after 20.901 msecs [ 7808.817664] PM: late suspend of devices complete after 0.769 msecs [ 7808.818636] PM: noirq suspend of devices complete after 0.956 msecs [ 7808.818715] PM: Successfully put all powerdomains to target state [ 7808.818715] PM: Wakeup source USB1_PHY [ 7808.833060] PM: noirq resume of devices complete after 14.285 msecs [ 7808.833783] PM: early resume of devices complete after 0.593 msecs [ 7808.834697] net eth0: initializing cpsw version 1.12 (0) [ 7808.836301] libphy: PHY 4a101000.mdio:00 not found [ 7808.836308] net eth0: phy 4a101000.mdio:00 not found on slave 0 [ 7808.836631] net eth0: phy found : id is : 0x221622 [ 7809.102240] PM: resume of devices complete after 268.418 msecs [ 7809.173806] Restarting tasks ... done.

    Wakeup without connected fingerprintreader but with usbstick:

    lsusb;sleep 1;echo standby > /sys/power/state
    Bus 002 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 006: ID 13fe:4100 Kingston Technology Company Inc. 
    
    [ 8009.709728] PM: Syncing filesystems ... done.
    [ 8009.716138] Freezing user space processes ... (elapsed 0.001 seconds) done.
    [ 8009.724699] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
    [ 8009.733777] Suspending console(s) (use no_console_suspend to debug)
    [ 8009.764412] PM: suspend of devices complete after 23.201 msecs
    [ 8009.765222] PM: late suspend of devices complete after 0.791 msecs
    [ 8009.766185] PM: noirq suspend of devices complete after 0.946 msecs
    [ 8009.766261] PM: Successfully put all powerdomains to target state
    [ 8009.766261] PM: Wakeup source USB1_PHY
    [ 8009.780597] PM: noirq resume of devices complete after 14.276 msecs
    [ 8009.781313] PM: early resume of devices complete after 0.584 msecs
    [ 8009.782185] net eth0: initializing cpsw version 1.12 (0)
    [ 8009.783787] libphy: PHY 4a101000.mdio:00 not found
    [ 8009.783795] net eth0: phy 4a101000.mdio:00 not found on slave 0
    [ 8009.784106] net eth0: phy found : id is : 0x221622
    [ 8010.052046] PM: resume of devices complete after 270.692 msecs
    [ 8010.123613] Restarting tasks ... done.

    Wakeup with empty hub:

    root@am335x-evm:/home/testApp# lsusb;sleep 1;echo standby > /sys/power/state
    Bus 002 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    [ 8117.199923] PM: Syncing filesystems ... done. [ 8117.207202] Freezing user space processes ... (elapsed 0.001 seconds) done. [ 8117.215759] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done. [ 8117.224747] Suspending console(s) (use no_console_suspend to debug) [ 8117.312251] PM: suspend of devices complete after 80.059 msecs [ 8117.313034] PM: late suspend of devices complete after 0.762 msecs [ 8117.313991] PM: noirq suspend of devices complete after 0.938 msecs [ 8117.314068] PM: Successfully put all powerdomains to target state [ 8117.314068] PM: Wakeup source USB1_PHY [ 8117.328390] PM: noirq resume of devices complete after 14.260 msecs [ 8117.329078] PM: early resume of devices complete after 0.558 msecs [ 8117.329792] net eth0: initializing cpsw version 1.12 (0) [ 8117.331439] libphy: PHY 4a101000.mdio:00 not found [ 8117.331448] net eth0: phy 4a101000.mdio:00 not found on slave 0 [ 8117.331748] net eth0: phy found : id is : 0x221622 [ 8117.601766] PM: resume of devices complete after 272.653 msecs [ 8117.673285] Restarting tasks ... done.


    Kind regards,

    Roland

  • Hello Mike,

    we have measured the I2C data traffic from the hub to the processor.

    • When we reset the usb hub via reset pin, the system does not wake up from usb (not very surprising)
    • When there is nothing connected to the hub, there is also no periodic data traffic.
      There is little traffic, when we go into standby and (and immediately) wakeup.
    • When a usb-stick is connected, there is an 8 kHz signal on the I2C-Bus.

    We have no clue why the system wakes up immediately after standby, with Wakeup source USB1_PHY.
    Our Hub Type is SCM USB2514.

  • Roland,

    Unfortunately this is a known issue and we do not have a timeline for a fix.

    Are you able to workaround in software?

    If not, we may be able to propose a simple hardware workaround.

    Regards,
    Mike

  • Hello Mike,

    please tell me your hardware workaround.

    Regards,
    Roland

  • Roland,

    For USB High Speed devices, an out-of-band wake signal can be generated by connecting a single low-power Schmitt-trigger buffer from DP to a GPIO (TI SN74AUP1G17 would work).  To support legacy USB devices, you will need a second Schmitt-trigger buffer on DM to a GPIO.  Both Schmidtt-trigger outputs could be OR'd together to use a single GPIO.

    Possible issues:

    • Signal Integrity
    • Place buffer as close as possible to DP trace.
    • Ensure resulting stub is <50mils.
    • Ensure DP/DM are length matched to <200mils.
    • Recommended buffer is only 1.5pF typical capacitance….shouldn’t present a problem.
    • Power Consumption
    • Recommended buffer is 0.9uA MAX (static).
    • Recommended buffer is optimized for 3.3V operation, but supports 1.8V if GPIO bank requirements change.

    Assumptions

    • Wake is side-band in nature (GPIO is required)
    • This solution is not USB Compliant (in-band, resume timing, etc.
    • Toggle of DP is required to wake
    • VBUS sourced pull-up?

    Regards,
    Mike

    • Dear all,

      I just saw this thread that is closely related to this [1]. It's been more than one year since it was reported, there is any progress to provide a proper software fix? I tried to figure myself to source of the problem but from now I didn't find a solution.

      We're not able to change the hardware.

      Thanks,
      Enric

      [1] e2e.ti.com/.../594605