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/AM3358: Support for wakeup from DeepSleep [Suspend to RAM]

Part Number: AM3358
Other Parts Discussed in Thread: TMDXEVM3358

Tool/software: Linux

Hi TI Team,

We are able to put the system in standby and wake-up with UART and USB interrupt sources.

Commands for enabling the wake sources:

echo enabled > /sys/devices/platform/ocp/44e09000.serial/tty/ttyO0/power/wakeup

echo enabled > /sys/devices/platform/ocp/47400000.usb/47401300.usb-phy/power/wakeup

echo 1 > /sys/power/pm_debug_messages

echo standby > /sys/power/state

with the above commands system is going to suspend & resuming (when we insert pendrive or any key press keyborad)

Same steps followed to put the system in deepsleep with the command

echo mem > /sys/power/state

System is going to suspend but it is not resuming from the deep sleep ,though configured UART & USB as a wake up resource 

In TRM it is observed that wake up functionality is supported from deep sleep

But in one of the TI wiki it is mentioned wake up from deep sleep is not supported yet()

Could you please confirm whether the wake up from deep sleep is supported or not?

If it is supported what are the configuration/changes are required?

Note:- we used CM3 firmware version (am335x-pm-firmware.elf)0x192 & am335x-bone-scale-data.bin firmware.

  • Hi,

    Please post what processor you are using - OMAP, Jacinto 5, or AM335x. Also post the Linux version you use.
  • Hi,

    Since you did not respond to my questions, I suppose that you have solved your problem, therefore I am closing this thread. If this is not correct please post here the answers to my questions from my previous post.
  • Hi Biser,

    Thank you for your reply.
    Using AM3358 sitara processor & the kernel version is 4.14.40.
    Sorry for the late reply


    Thanks,
    Viswa
  • Viswa,

    Do you use kernel 4.14.40 that comes with AM335x TI PSDK Linux v5.00? If yes, DeepSleep0 is supported there, please refer to the below user guide:

    software-dl.ti.com/.../Foundational_Components_Kernel_Drivers.html

    Regards,
    Pavel
  • Hi Pavel,

    Thank you for your reply

    Currently we are using the kernel 4.14.40 that comes with AM335x TI PSDK Linux v5.00.

    but still we are seeing the issue ...resume is not happening from deepsleep0

    Thanks,

    Viswa
  • Hi Pavel,

    Thank you for reply

    Currently using the kernel 4.14.40 that comes with AM335x TI PSDK Linux v5.00.

    still we are seeing the issue ...resume is not happening from deepsleep0

    Note:- RTC has been disabled in our board. is it required for deepsleep support on AM3358

    Thanks,

    Viswa
  • Viswa,

    For wake up source from AM335x DeepSleep0 state, you should use:

    - UART
    - GPIO0
    - Touchscreen

    You can also use RTC alarm event, but RTC is optional and you can disable it for DeepSleep0 mode.

    Check below pointers for debug hints:

    processors.wiki.ti.com/.../Debugging_AM335x_Suspend-Resume_Issues
    www.ti.com/.../sprac74a.pdf
    processors.wiki.ti.com/.../AM335x_Schematic_Checklist

    Regards,
    Pavel
  • Hi Pavel,

    Resume is working in standby mode, system is able to resume from suspend through UART & USB wake sources.
    When we write "mem" to "/sys/power/state" CPU is being suspended which we have verified through debug logs.
    However from deepsleep resume is not happening through UART or USB. We think this is because of peripheral power domain(PD_PER) shut down as per deepsleep power mode specified in the TRM.
    We have loaded am335x-pm-firmware.elf 0x192 version & am335x-bone-scale-data.bin firmware and made sure that CM3 is up and running.
    In the deepsleep state any interrupt from external wake up sources should wake the CPU with the help of CM3 , which is not happening.
    Ours is automotive SoC DRA604 which is used on a CSB(Daughter board). So, we don't have touch screen.

    Could you suggest any debug options for CM3.
    Meanwhile will check with our hardware team regarding the constraints as mentioned in the link shared by you.


    Thanks,
    Viswa
  • Viswa,

    Which UART module you are using? DeepSleep0 can resume only by UART0. UART0 belongs to PD_WKUP. Check below AM335x TRM section:

    8.1.4.5 Wakeup Sources/Events

    Regards,
    Pavel
  • Hi Pavel,

    we are using UART0 as a wake up resource in both standby & deepsleep0
    It worked in standby mode but not from deepsleep0

    Thanks,
    Viswa
  • Viswa,

    I tested deepsleep0/mem mode on AM335x TI EVM TMDXEVM3358 with PSDK 5.02 (kernel 4.14.79, pre-built binaries) and UARt wakeup from deepsleep0 is working fine:

    root@am335x-evm:~# echo mem > /sys/power/state
    [  125.447670] PM: suspend entry (deep)
    [  125.451321] PM: Syncing filesystems ... done.
    [  126.154674] Freezing user space processes ... (elapsed 0.004 seconds) done.
    [  126.165762] OOM killer disabled.
    [  126.169232] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
    [  126.178417] Suspending console(s) (use no_console_suspend to debug)
    [  126.344738] pm33xx pm33xx: PM: Successfully put all powerdomains to target state
    [  126.344738] PM: Wakeup source UART
    [  126.369528] net eth0: initializing cpsw version 1.12 (0)
    [  126.467935] Atheros 8031 ethernet 4a101000.mdio:00: attached PHY driver [Atheros 8031 ethernet] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
    [  126.649385] OOM killer enabled.
    [  126.652553] Restarting tasks ... done.
    [  126.696856] PM: suspend exit
    root@am335x-evm:~#

    I am attaching the full boot up log:

    am335x_pm_log

    Check the boot up log and compare with yours, check for differences related to power management and CM3 firmware.

    You can check what HW/SW differences you have between AM335x EVM and your custom board and check how these differences impact the wake-up procedure.

    Check also if below wiki pages will be in help:

    Check also the pdf file attached in below e2e post, it has some good debug hints:

    You can also put no_console_suspend in your boot args, thus you might have more debug messages that can point you to the root cause.

    Regards,
    Pavel

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

    Regards,
    Pavel