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.

TMDSIDK574: Suspend/Resume function [Linux]

Part Number: TMDSIDK574

Hi team,

 

Mu customer would like to implement suspend/resume function on AM574x.

Referring to the Processor SDK Linux Software Developer’s Guide, “3.3.4.20. Power Management”, AM57x is supported device.

 

They succeeded to suspend, but cannot resume.

Could you please help debugging? What needed to be done to implement resume function on AM574x?

 

Best regards,

Kurumi

  • Kurumi-san,

    a) no_console_suspend in bootargs
    b) enable UART wakeup capability.
          echo enabled > /sys/devices/platform/44000000.ocp/48020000.serial/tty/ttyS2/power/wakeup
    c) echo mem > /sys/power/state

    Have you followed the above steps?


    You need to add no_console_suspend to your bootargs & also enable the wakeup.

    BTW the AM574x does not support deep sleep unlike AM437x. So This will not be a big power saving feature.

    - Keerthy

  • Hi Keerthy-san,

    Thank you so much for the quick response, and also for the advice.

    The customer tried above mentioned a)b)c) but it failed. 

    I'd like to share the log offline. Could you please check the email?

    Best regards,

    Kurumi

  • Hi Keerthy-san,

    I set no_console_suspend using the below commands from the U-Boot prompt::

    setenv args_mmc "run finduuid;setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootfste=ext4 rootwait no_console_suspend"
    saveenv

    Then from kernel prompt: echo enabled > /sys/devices/platform/44000000.ocp/48020000.serial/tty/ttyS2/power/wakeup

    echo mem > /sys/power/state
    [ 76.032982] PM: suspend entry (deep)
    [ 76.036579] PM: Syncing filesystems ... done.
    [ 79.251072] Freezing user space processes ... (elapsed 0.001 seconds) done.
    [ 79.259381] OOM killer disabled.
    [ 79.262619] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
    [ 79.413311] pruss 4b280000.pruss: unconfigured system_events[63-0] = 00000600,04500000
    [ 79.421272] pruss 4b280000.pruss: unconfigured host_intr = 0x00000155
    [ 79.427769] remoteproc remoteproc6: stopped remote processor 4b2b4000.pru
    [ 79.434752] net eth2: stopped
    [ 79.437845] pruss 4b280000.pruss: unconfigured system_events[63-0] = 00600000,08a00000
    [ 79.445849] pruss 4b280000.pruss: unconfigured host_intr = 0x000002aa
    [ 79.452323] remoteproc remoteproc7: stopped remote processor 4b2b8000.pru
    [ 79.459560] net eth3: stopped
    [ 79.477041] Disabling non-boot CPUs ...
    [ 79.533160] IRQ173: set affinity failed(-22).
    [ 79.543548] Powerdomain (eve2_pwrdm) didn't enter target state 0
    [ 79.543548] Powerdomain (eve1_pwrdm) didn't enter target state 0
    [ 79.543548] Could not enter target state in pm_suspend
    [ 79.543548] A possible cause could be an old bootloader - try u-boot >= v2012.07
    [ 79.543587] Enabling non-boot CPUs ...
    [ 79.547430] CPU1: smp_ops.cpu_die() returned, trying to resuscitate
    [ 79.554162] CPU1 is up

    [ 79.564309] net eth0: initializing cpsw version 1.15 (0)
    [ 79.693138] Micrel KSZ9031 Gigabit PHY 48485000.mdio:00: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=48485000.mdio:00, irq=POLL)
    [ 79.708866] net eth1: initializing cpsw version 1.15 (0)
    [ 79.833534] Micrel KSZ9031 Gigabit PHY 48485000.mdio:01: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=48485000.mdio:01, irq=POLL)
    [ 79.848037] iep ptp bc clkid -1
    [ 79.851289] remoteproc remoteproc6: powering up 4b2b4000.pru
    [ 79.857027] remoteproc remoteproc6: Booting fw image ti-pruss/am57xx-pru0-prueth-fw.elf, size 7228
    [ 79.866206] pruss 4b280000.pruss: configured system_events[63-0] = 00000600,04500000
    [ 79.874028] pruss 4b280000.pruss: configured intr_channels = 0x000000d5 host_intr = 0x00000155
    [ 79.882704] remoteproc remoteproc6: remote processor 4b2b4000.pru is now up
    [ 79.890275] net eth2: started
    [ 79.893374] remoteproc remoteproc7: powering up 4b2b8000.pru
    [ 79.899090] remoteproc remoteproc7: Booting fw image ti-pruss/am57xx-pru1-prueth-fw.elf, size 7256
    [ 79.908249] pruss 4b280000.pruss: configured system_events[63-0] = 00600000,08a00000
    [ 79.916053] pruss 4b280000.pruss: configured intr_channels = 0x0000032a host_intr = 0x000002aa
    [ 79.919306] ata1: SATA link down (SStatus 0 SControl 300)
    [ 79.924724] remoteproc remoteproc7: remote processor 4b2b8000.pru is now up
    [ 79.937709] net eth3: started
    [ 79.951272] OOM killer enabled.
    [ 79.954517] Restarting tasks ... done.
    [ 79.961030] PM: suspend exit
    root@am57xx-evm:~#
    root@am57xx-evm:~# echo mem > /sys/power/state
    [ 93.362980] PM: suspend entry (deep)
    [ 93.366577] PM: Syncing filesystems ... done.
    [ 93.433351] Freezing user space processes ... (elapsed 0.001 seconds) done.
    [ 93.441628] OOM killer disabled.
    [ 93.445406] Freezing remaining freezable tasks ... (elapsed 0.000 seconds) done.
    [ 93.468835] pruss 4b280000.pruss: unconfigured system_events[63-0] = 00000600,04500000
    [ 93.476827] pruss 4b280000.pruss: unconfigured host_intr = 0x00000155
    [ 93.483352] remoteproc remoteproc6: stopped remote processor 4b2b4000.pru
    [ 93.490311] net eth2: stopped
    [ 93.493427] pruss 4b280000.pruss: unconfigured system_events[63-0] = 00600000,08a00000
    [ 93.501383] pruss 4b280000.pruss: unconfigured host_intr = 0x000002aa
    [ 93.507905] remoteproc remoteproc7: stopped remote processor 4b2b8000.pru
    [ 93.515096] net eth3: stopped
    [ 93.532259] Disabling non-boot CPUs ...
    [ 93.573119] IRQ173: set affinity failed(-22).
    [ 93.579717] Powerdomain (eve2_pwrdm) didn't enter target state 0
    [ 93.579717] Powerdomain (eve1_pwrdm) didn't enter target state 0
    [ 93.579717] Could not enter target state in pm_suspend
    [ 93.579717] A possible cause could be an old bootloader - try u-boot >= v2012.07
    [ 93.579752] Enabling non-boot CPUs ...
    [ 93.583658] CPU1: smp_ops.cpu_die() returned, trying to resuscitate
    [ 93.590383] CPU1 is up

    [ 93.600655] net eth0: initializing cpsw version 1.15 (0)
    [ 93.723296] Micrel KSZ9031 Gigabit PHY 48485000.mdio:00: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=48485000.mdio:00, irq=POLL)
    [ 93.738966] net eth1: initializing cpsw version 1.15 (0)
    [ 93.863285] Micrel KSZ9031 Gigabit PHY 48485000.mdio:01: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=48485000.mdio:01, irq=POLL)
    [ 93.877788] iep ptp bc clkid -1
    [ 93.881041] remoteproc remoteproc6: powering up 4b2b4000.pru
    [ 93.886778] remoteproc remoteproc6: Booting fw image ti-pruss/am57xx-pru0-prueth-fw.elf, size 7228
    [ 93.895958] pruss 4b280000.pruss: configured system_events[63-0] = 00000600,04500000
    [ 93.903782] pruss 4b280000.pruss: configured intr_channels = 0x000000d5 host_intr = 0x00000155
    [ 93.912458] remoteproc remoteproc6: remote processor 4b2b4000.pru is now up
    [ 93.920041] net eth2: started
    [ 93.923142] remoteproc remoteproc7: powering up 4b2b8000.pru
    [ 93.924205] ata1: SATA link down (SStatus 0 SControl 300)
    [ 93.928859] remoteproc remoteproc7: Booting fw image ti-pruss/am57xx-pru1-prueth-fw.elf, size 7256
    [ 93.943418] pruss 4b280000.pruss: configured system_events[63-0] = 00600000,08a00000
    [ 93.951206] pruss 4b280000.pruss: configured intr_channels = 0x0000032a host_intr = 0x000002aa
    [ 93.959878] remoteproc remoteproc7: remote processor 4b2b8000.pru is now up
    [ 93.967449] net eth3: started
    [ 93.981304] OOM killer enabled.
    [ 93.984527] Restarting tasks ... done.
    [ 93.997292] PM: suspend exit
    root@am57xx-evm:~#

    I do not see any hang but there are power domains that do not enter idle. Suspend to RAM is not functional on AM57xx. Only the A15 enters some low power state core domain does not enter low power mode.

    https://software-dl.ti.com/processor-sdk-linux/esd/docs/06_03_00_106/linux/Foundational_Components/Kernel/Kernel_Drivers/Power_Management.html?highlight=sleep

    So not much power savings will be done.

    Regards,
    Keerthy

  • Hi Keerthy-san,

    Thank you so much for testing with the board. I understand it should not have any hang. But not effective for power saving, either.

    Best regards,

    Kurumi