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.

Linux/AM5728: Quick suspend and wake

Part Number: AM5728
Other Parts Discussed in Thread: TMDSEVM572X

Tool/software: Linux

Hi TI,

I am using TI AM572x EVM board without the touchscreen attachment.

I would like to quickly suspend the CPU from the command line and wake it again (from the command line). I am accessing the command line from the serial interface. I am guessing that "standby" could be used like below.

$ echo standby > /sys/power/state

But, I am not sure how to wake it back? from the command line? Could you please throw some light on this?

I am using 4.4.32 kernel.

root@am57xx-evm:~/temperature# uname -a
Linux am57xx-evm 4.4.32-gadde2ca9f8 #1 SMP PREEMPT Wed Dec 14 19:14:12 EST 2016 armv7l GNU/Linux

Thank you for your time.

  • Hi Solid,

    Do you use 4.4.32 kernel that is coming with AM57x PSDK Linux v3.02?

    You can resume AM57x device from UART console. Refer to the below wiki for details:

    processors.wiki.ti.com/.../Linux_Core_Power_Management_User's_Guide_(v4.4)

    Regards,
    Pavel
  • Thank you Pavel. I am using the 4.4.32 kernel from Linux SDK.

    I enabled the UART capability by the following command.

    echo enabled > /sys/devices/platform/44000000.ocp/48020000.serial/tty/ttyS2/power/wakeup

    Then entered the deep sleep state 0 (standby mode is not supported) with the following command.

    echo mem > /sys/power/state

    It works for the first time. I mean, I was able to enter the deepsleep state and come out of it. But when I go to the deepsleep state again and try to wake up, it does not wake up and requires me to push the reset button.

    I checked the /sys/devices/platform/44000000.ocp/48020000.serial/tty/ttyS2/power/wakeup file before going into the deepsleep state for the second time. It is still enabled.

    Any ideas, why it behaves like this?

    Thank you once again.
  • Solid,

    I have tried on my side, I have TMDSEVM572X rev A.20, I am using PSDK Linux 5.01 (kernel 4.14.67, pre-built binaries).

    I see that quick suspend/resume (try 3 times) is working fine, see below log:

    root@am57xx-evm:~# echo enabled > /sys/devices/platform/44000000.ocp/48020000.serial/tty/ttyS2/power/wakeup
    root@am57xx-evm:~# echo mem > /sys/power/state
    [ 69.261059] PM: suspend entry (deep)
    [ 69.264655] PM: Syncing filesystems ... done.
    [ 70.777857] Freezing user space processes ... (elapsed 0.001 seconds) done.
    [ 70.786205] OOM killer disabled.
    [ 70.789442] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
    [ 70.798121] Suspending console(s) (use no_console_suspend to debug)
    [ 71.053633] Disabling non-boot CPUs ...
    [ 71.102678] Successfully put all powerdomains to target state
    [ 71.102720] Enabling non-boot CPUs ...
    [ 71.102787] CPU1: smp_ops.cpu_die() returned, trying to resuscitate
    [ 71.103134] CPU1 is up
    [ 71.119723] omap-iommu 58882000.mmu: 58882000.mmu: version 2.1
    [ 71.124104] net eth0: initializing cpsw version 1.15 (0)
    [ 71.241396] Micrel KSZ9031 Gigabit PHY 48485000.mdio:01: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=48485000.mdio:01, irq=POLL)
    [ 71.243244] cpts ptp bc clkid 0
    [ 71.243271] net eth1: initializing cpsw version 1.15 (0)
    [ 71.361593] Micrel KSZ9031 Gigabit PHY 48485000.mdio:02: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=48485000.mdio:02, irq=POLL)
    [ 71.452382] ata1: SATA link down (SStatus 0 SControl 300)
    [ 71.769608] usb 1-1: reset high-speed USB device number 2 using xhci-hcd
    [ 72.194859] OOM killer enabled.
    [ 72.198009] Restarting tasks ... done.
    [ 72.208188] PM: suspend exit
    root@am57xx-evm:~# echo mem > /sys/power/state
    [ 75.031237] PM: suspend entry (deep)
    [ 75.034833] PM: Syncing filesystems ... done.
    [ 76.033928] Freezing user space processes ... (elapsed 0.001 seconds) done.
    [ 76.042443] OOM killer disabled.
    [ 76.045682] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
    [ 76.054348] Suspending console(s) (use no_console_suspend to debug)
    [ 76.322890] Disabling non-boot CPUs ...
    [ 76.371938] Successfully put all powerdomains to target state
    [ 76.371978] Enabling non-boot CPUs ...
    [ 76.372044] CPU1: smp_ops.cpu_die() returned, trying to resuscitate
    [ 76.372405] CPU1 is up
    [ 76.388679] omap-iommu 58882000.mmu: 58882000.mmu: version 2.1
    [ 76.393060] net eth0: initializing cpsw version 1.15 (0)
    [ 76.511416] Micrel KSZ9031 Gigabit PHY 48485000.mdio:01: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=48485000.mdio:01, irq=POLL)
    [ 76.513445] cpts ptp bc clkid 0
    [ 76.513471] net eth1: initializing cpsw version 1.15 (0)
    [ 76.631569] Micrel KSZ9031 Gigabit PHY 48485000.mdio:02: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=48485000.mdio:02, irq=POLL)
    [ 76.722373] ata1: SATA link down (SStatus 0 SControl 300)
    [ 77.039571] usb 1-1: reset high-speed USB device number 2 using xhci-hcd
    [ 77.464777] OOM killer enabled.
    [ 77.467927] Restarting tasks ... done.
    [ 77.485947] PM: suspend exit
    root@am57xx-evm:~# echo mem > /sys/power/state
    [ 89.961036] PM: suspend entry (deep)
    [ 89.964633] PM: Syncing filesystems ... done.
    [ 90.977146] Freezing user space processes ... (elapsed 0.001 seconds) done.
    [ 90.985528] OOM killer disabled.
    [ 90.988766] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
    [ 90.997391] Suspending console(s) (use no_console_suspend to debug)
    [ 91.252838] Disabling non-boot CPUs ...
    [ 91.302035] Successfully put all powerdomains to target state
    [ 91.302097] Enabling non-boot CPUs ...
    [ 91.302162] CPU1: smp_ops.cpu_die() returned, trying to resuscitate
    [ 91.302530] CPU1 is up
    [ 91.319268] omap-iommu 58882000.mmu: 58882000.mmu: version 2.1
    [ 91.323764] net eth0: initializing cpsw version 1.15 (0)
    [ 91.441595] Micrel KSZ9031 Gigabit PHY 48485000.mdio:01: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=48485000.mdio:01, irq=POLL)
    [ 91.443592] cpts ptp bc clkid 0
    [ 91.443619] net eth1: initializing cpsw version 1.15 (0)
    [ 91.561768] Micrel KSZ9031 Gigabit PHY 48485000.mdio:02: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=48485000.mdio:02, irq=POLL)
    [ 91.652372] ata1: SATA link down (SStatus 0 SControl 300)
    [ 91.969772] usb 1-1: reset high-speed USB device number 2 using xhci-hcd
    [ 92.394418] OOM killer enabled.
    [ 92.397568] Restarting tasks ... done.
    [ 92.414991] PM: suspend exit

    I am using UART console for wakeup.

    I will suggest you to try your EVM with PSDK 5.02 or PSDK 5.01 versions.

    Regards,
    Pavel
  • If you have no more questions related to the subject of this e2e thread, please close/verify/resolve this thread.

    Regards,
    Pavel
  • Hi Pavel,

    I have similar problem on TDA2X EVM board (VSDK v3.5).

    I have tried the commands , the logs message:

    ===================================

    Arago Project http://arago-project.org dra7xx-evm ttyS0

    Arago 2016.12 dra7xx-evm ttyS0

    dra7xx-evm login: root
    root@dra7xx-evm:~# [   43.057636] random: nonblocking pool is initialized

    root@dra7xx-evm:~# echo enabled > /sys/devices/platform/44000000.ocp/48020000.serial/tty/ttyS2/power/wakeup
    root@dra7xx-evm:~# echo mem > /sys/power/state
    [   80.097578] PM: Syncing filesystems ... done.
    [   80.128512] Freezing user space processes ... (elapsed 0.001 seconds) done.
    [   80.136942] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
    [   80.145711] Suspending console(s) (use no_console_suspend to debug)

    ========================================================

    I need reset the power then restart system.

    Could you teach me how to fix the issue of wakeup? Thanks.

    BR,

    Sam Hsieh

  • Hi Sam Hsieh,

    Sorry, I am not able to help with TDA2X EVM board (VSDK v3.5). You need to open new e2e thread for your issue.

    Regards,
    Pavel