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.

PROCESSOR-SDK-AM57X: sleep mode

Part Number: PROCESSOR-SDK-AM57X
Other Parts Discussed in Thread: AM5718

Hi all,

I am using board : TMDXIDKAM5718 ,

 SDK version: ti-processor-sdk-linux-am57xx-evm-06.03.00.106

i am working sleep mode. 

i tried  as below link

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

(echo mem > /sys/power/state)

it's not working  and i want work on sleep mode in gpio.

could you please help me to fix this issue and input for gpio sleep mode.

thanks and regards

chandana

  • Hi Chandana,

    What is the target power state you want to reach with low power mode?


    it's not working  and i want work on sleep mode in gpio.

    could you please help me to fix this issue and input for gpio sleep mode.

    I really did not understand this. Please elaborate. Do you want to wake up using GPIO?

    Low power mode support is very minimal on AM57xx.

    Best Regards,
    Keerthy

  • hi keerthy 

    thanks for response .

    it's not working  and i want work on sleep mode in gpio.

    could you please help me to fix this issue and input for gpio sleep mode.

    I really did not understand this. Please elaborate. Do you want to wake up using GPIO?

    i tried for suspend using  (echo mem > /sys/power/state) this command but i got below error

    output log:

    root@am57xx-evm:~# echo mem > /sys/power/state
    [ 4698.722000] PM: suspend entry (deep)
    [ 4698.725607] PM: Syncing filesystems ... done.
    [ 4698.738880] Freezing user space processes ... (elapsed 0.001 seconds) done.
    [ 4698.747881] OOM killer disabled.
    [ 4698.751208] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
    [ 4698.759906] Suspending console(s) (use no_console_suspend to debug)
    [ 4698.782906] pruss 4b280000.pruss: unconfigured system_events[63-0] = 00000600,04500000
    [ 4698.782917] pruss 4b280000.pruss: unconfigured host_intr = 0x00000155
    [ 4698.782929] remoteproc remoteproc5: stopped remote processor 4b2b4000.pru
    [ 4698.783092] net eth4: stopped
    [ 4698.783211] pruss 4b280000.pruss: unconfigured system_events[63-0] = 00600000,08a00000
    [ 4698.783219] pruss 4b280000.pruss: unconfigured host_intr = 0x000002aa
    [ 4698.783229] remoteproc remoteproc6: stopped remote processor 4b2b8000.pru
    [ 4698.783611] net eth5: stopped
    [ 4698.783868] cpsw 48484000.ethernet eth0: Link is Down
    [ 4699.791702] omap-rproc 40800000.dsp: suspend failed -62
    [ 4699.791722] dpm_run_callback(): platform_pm_suspend+0x0/0x5c returns -62
    [ 4699.791730] PM: Device 40800000.dsp failed to suspend: error -62
    [ 4699.791739] PM: Some devices failed to suspend, or early wake event detected
    [ 4699.792178] net eth0: initializing cpsw version 1.15 (0)
    [ 4699.912477] Micrel KSZ9031 Gigabit PHY 48485000.mdio:00: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=48485000.mdio:)
    [ 4699.914384] net eth1: initializing cpsw version 1.15 (0)
    [ 4700.032555] Micrel KSZ9031 Gigabit PHY 48485000.mdio:01: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=48485000.mdio:)
    [ 4700.033460] iep ptp bc clkid -1
    [ 4700.033566] remoteproc remoteproc5: powering up 4b2b4000.pru
    [ 4700.033580] remoteproc remoteproc5: Booting fw image ti-pruss/am57xx-pru0-prueth-fw.elf, size 7228
    [ 4700.033755] pruss 4b280000.pruss: configured system_events[63-0] = 00000600,04500000
    [ 4700.033764] pruss 4b280000.pruss: configured intr_channels = 0x000000d5 host_intr = 0x00000155
    [ 4700.033774] remoteproc remoteproc5: remote processor 4b2b4000.pru is now up
    [ 4700.034413] net eth4: started
    [ 4700.034489] remoteproc remoteproc6: powering up 4b2b8000.pru
    [ 4700.034501] remoteproc remoteproc6: Booting fw image ti-pruss/am57xx-pru1-prueth-fw.elf, size 7256
    [ 4700.034652] pruss 4b280000.pruss: configured system_events[63-0] = 00600000,08a00000
    [ 4700.034661] pruss 4b280000.pruss: configured intr_channels = 0x0000032a host_intr = 0x000002aa
    [ 4700.034669] remoteproc remoteproc6: remote processor 4b2b8000.pru is now up
    [ 4700.035419] net eth5: started
    [ 4700.173276] ata1: SATA link down (SStatus 0 SControl 300)
    [ 4700.255266] OOM killer enabled.
    [ 4700.258420] Restarting tasks ... done.
    [ 4700.298195] PM: suspend exit
    -sh: echo: write error: Timer expired

    thanks and regards

    chandana

  • Hi Chandana,

    As mentioned earlier AM574x does not support very deep sleep states.

    You need to add no_console_suspend to your bootargs & also the below command:

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

    Then:

    echo mem > /sys/power/state will wake up from UART.

    If no further questions please click on verify answer.

    Best Regards,
    Keerthy

  • hi keerthy,

    thanks for your response 

    i am working on am5718 processor.

    can i try as above reply.

    what is procedure for wake up from gpio? 

    thanks and regards

    chandana 

  • Hi keerthy,

    i tried as above reply 

    i got  echo: write error: Device or resource busy

    1.u-boot => setenv bootargs $(bootargs) no_console_suspend

    2.root@am57xx-evm:~# echo enabled >/sys/devices/platform/44000000.ocp/48020000.serial/tty/ttyS2/power/wakeup

    3. root@am57xx-evm:~# echo mem > /sys/power/state

    log:

    [ 177.181904] PM: suspend entry (deep)

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

    [ 185.823505] Freezing user space processes ... (elapsed 0.001 seconds) done.

    [ 185.831860] OOM killer disabled.

    [ 185.835100] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.

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

    [ 185.912183] pruss 4b280000.pruss: unconfigured system_events[63-0] = 00000600,04500000

    [ 185.912194] pruss 4b280000.pruss: unconfigured host_intr = 0x00000155

    [ 185.912207] remoteproc remoteproc5: stopped remote processor 4b2b4000.pru

    [ 185.912399] net eth4: stopped

    [ 185.912517] pruss 4b280000.pruss: unconfigured system_events[63-0] = 00600000,08a00000

    [ 185.912524] pruss 4b280000.pruss: unconfigured host_intr = 0x000002aa

    [ 185.912535] remoteproc remoteproc6: stopped remote processor 4b2b8000.pru

    [ 185.912979] net eth5: stopped

    [ 185.913305] cpsw 48484000.ethernet eth0: Link is Down

    [ 186.961664] omap-rproc 58820000.ipu: suspend failed -16

    [ 186.961683] dpm_run_callback(): platform_pm_suspend+0x0/0x5c returns -16

    [ 186.961691] PM: Device 58820000.ipu failed to suspend: error -16

    [ 186.961700] PM: Some devices failed to suspend, or early wake event detected

    [ 186.962205] net eth0: initializing cpsw version 1.15 (0)

    [ 187.082192] Micrel KSZ9031 Gigabit PHY 48485000.mdio:00: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=48485000.mdio:)

    [ 187.084249] net eth1: initializing cpsw version 1.15 (0)

    [ 187.202393] Micrel KSZ9031 Gigabit PHY 48485000.mdio:01: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=48485000.mdio:)

    [ 187.203293] iep ptp bc clkid -1

    [ 187.203396] remoteproc remoteproc5: powering up 4b2b4000.pru

    [ 187.203409] remoteproc remoteproc5: Booting fw image ti-pruss/am57xx-pru0-prueth-fw.elf, size 7228

    [ 187.203589] pruss 4b280000.pruss: configured system_events[63-0] = 00000600,04500000

    [ 187.203598] pruss 4b280000.pruss: configured intr_channels = 0x000000d5 host_intr = 0x00000155

    [ 187.203607] remoteproc remoteproc5: remote processor 4b2b4000.pru is now up

    [ 187.204215] net eth4: started

    [ 187.204292] remoteproc remoteproc6: powering up 4b2b8000.pru

    [ 187.204303] remoteproc remoteproc6: Booting fw image ti-pruss/am57xx-pru1-prueth-fw.elf, size 7256

    [ 187.204454] pruss 4b280000.pruss: configured system_events[63-0] = 00600000,08a00000

    [ 187.204462] pruss 4b280000.pruss: configured intr_channels = 0x0000032a host_intr = 0x000002aa

    [ 187.204471] remoteproc remoteproc6: remote processor 4b2b8000.pru is now up

    [ 187.205221] net eth5: started

    [ 187.314839] ata1: SATA link down (SStatus 0 SControl 300)

    [ 187.424644] OOM killer enabled.

    [ 187.427794] Restarting tasks ... done.

    [ 187.468266] PM: suspend exit

    -sh: echo: write error: Device or resource busy

    thanks and regards

    chandana 

  • hi keerthy

    You need to add no_console_suspend to your bootargs & also the below command:

    i tried as below

    => setenv bootargs $(bootargs) no_console_suspend
    => saveenv
    Saving Environment to FAT... Error: allocating new dir entry
    OK
    =>

    i am facing this error. could you please help me 

    thanks and regards

    chandana

  • Chandana,

    As i mentioned earlier, suspend to RAM are not fully supported on AM57. So if you can elaborate on your use case
    we can decide on the feasibility.

    Even if saveenv fails you can boot to kernel and check cat /proc/cmdline.

    You should see no_console_suspend there.

    - Keerthy

  • Hi keerthy,

    thanks for your response

    Even if saveenv fails you can boot to kernel and check cat /proc/cmdline.

    You should see no_console_suspend there.

    i tried as above i couldn't  able to see no_console_suspend 

    root@am57xx-evm:~# cat /proc/cmdline
    console=ttyS2,115200n8 root=PARTUUID=05447f80-02 rw rootfstype=ext4 rootwait

    thanks and regards

    chandana

  • Hi keerthy,

    i am waiting for your response.

    i tried in uEnv.txt file i added console=no_console_suspend. as below

    console=no_console_suspend
    nfsargs=setenv bootargs console=${console} root=/dev/nfs nfsroot=${serverip}:${rootpath} rw ip=192.168.1.174:::::eth0

    root@am57xx-evm:~# cat /proc/cmdline 

    console=no_console_suspend root=PARTUUID=e536967e-02 rw rootfstype=ext4 rootwait
    root@am57xx-evm:~# echo mem > /sys/power/state
    -sh: echo: write error: Device or resource busy

    could you please help me in this 

    thanks & reagrds

    chandana

  • Chandana,

    Assuming your zImage & dtb is in the boot folder of your rootfs, Can you try the below:

    setenv bootargs console=ttyO2,115200n8 root=/dev/mmcblk0p2 rootwait earlyprintk debug loglevel=8 no_console_suspend
    setenv bootcmd 'mmc dev 0; ext4load mmc 0:2 0x81000000 /boot/zImage; ext4load mmc 0:2 0x81800000 /boot/am571x-idk.dtb; bootz 81000000 - 81800000'
    boot

    Boot to Linux with the above & give:

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

    Finally, echo mem > /sys/power/state.

    I am still not able to understand your final use case.

    Best Regards,
    Keerthy

  • Hi keerthy,

    thanks for your response 

    yes, zimage and dtb is in the boot folder of rootfs.

    setenv bootargs console=ttyO2,115200n8 root=/dev/mmcblk0p2 rootwait earlyprintk debug loglevel=8 no_console_suspend
    setenv bootcmd 'mmc dev 0; ext4load mmc 0:2 0x81000000 /boot/zImage; ext4load mmc 0:2 0x81800000 /boot/am571x-idk.dtb; bootz 81000000 - 81800000'
    boot

    i tried as you told but after boot command kernal is not booting properly keep on running  as below

    out log of after boot command :

    [ 949.638710] systemd-journald[88]: Sent WATCHDOG=1 notification.
    [ 949.646366] systemd-journald[88]: Journal effective settings seal=no compress=yes compress_threshold_bytes=512B
    [ 949.656620] systemd-journald[88]: Journal effective settings seal=no compress=yes compress_threshold_bytes=512B
    [ 1009.640471] systemd-journald[88]: Journal effective settings seal=no compress=yes compress_threshold_bytes=512B
    [ 1009.651030] systemd-journald[88]: Journal effective settings seal=no compress=yes compress_threshold_bytes=512B
    [ 1009.662160] systemd-journald[88]: Journal effective settings seal=no compress=yes compress_threshold_bytes=512B
    [ 1009.672554] systemd-journald[88]: Journal effective settings seal=no compress=yes compress_threshold_bytes=512B
    [ 1009.683343] systemd-journald[88]: Journal effective settings seal=no compress=yes compress_threshold_bytes=512B
    [ 1009.693698] systemd-journald[88]: Journal effective settings seal=no compress=yes compress_threshold_bytes=512B
    [ 1009.704108] systemd-journald[88]: Journal effective settings seal=no compress=yes compress_threshold_bytes=512B
    [ 1009.714320] systemd-journald[88]: Journal effective settings seal=no compress=yes compress_threshold_bytes=512B
    [ 1069.638712] systemd-journald[88]: Sent WATCHDOG=1 notification.
    [ 1069.646383] systemd-journald[88]: Journal effective settings seal=no compress=yes compress_threshold_bytes=512B
    [ 1069.656636] systemd-journald[88]: Journal effective settings seal=no compress=yes compress_threshold_bytes=512B

    I am still not able to understand your final use case.

    use case: keep the system in sleep mode and weak up through gpio or uart

    thanks and regards 

    chandana

  • Chandana,

    You will not gain much by suspending on AM57xx as the A72 will not reach deep sleep states.
    That is the point i am trying to make here. In general when the Linux is idle then A15 will
    be doing WFI any case. I do not have AM571x currently so am unable to reproduce the issue.

    setenv bootargs console=ttyO2,115200n8 root=PARTUUID=05447f80-02 rw rootfstype=ext4 rootwait earlyprintk debug loglevel=8 no_console_suspend
    setenv bootcmd 'mmc dev 0; ext4load mmc 0:2 0x81000000 /boot/zImage; ext4load mmc 0:2 0x81800000 /boot/am571x-idk.dtb; bootz 81000000 - 81800000'
    boot

    Try with the above.

    - Keerthy

  • hi keerthy,

    thanks for your response 

    You will not gain much by suspending on AM57xx as the A72 will not reach deep sleep states.

    i am not working on a72. i am working on a15.

    could you please explain me why it will not reach deep sleep state

    setenv bootargs console=ttyO2,115200n8 root=PARTUUID=05447f80-02 rw rootfstype=ext4 rootwait earlyprintk debug loglevel=8 no_console_suspend
    setenv bootcmd 'mmc dev 0; ext4load mmc 0:2 0x81000000 /boot/zImage; ext4load mmc 0:2 0x81800000 /boot/am571x-idk.dtb; bootz 81000000 - 81800000'
    boot

    i tried as you told but after boot command kernel boot is hanged as below log

    output log:

    [ 4.510783] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [ 4.517443] [drm] No driver support for vblank timestamp query.
    [ 4.523417] [drm] Cannot find any crtc or sizes
    [ 4.528660] [drm] Initialized omapdrm 1.0.0 20110917 for omapdrm.0 on minor 0
    [ 4.536300] hctosys: unable to open rtc device (rtc0)
    [ 4.542069] ALSA device list:
    [ 4.545050] No soundcards found.
    [ 4.549091] Waiting for root device PARTUUID=05447f80-02...
    [ 5.601783] [drm] Cannot find any crtc or sizes

    thanks and regards

    chandana

  • i am not working on a72. i am working on a15.

    I meant A15. Deep sleep power states are not supported on AM57xx SDK. I do not
    have the AM5718 hardware at my disposal. I have am574x and the above mentioned commands work for me.

    - Keerthy

  • Hi keerthy,

    thanks for your response 

    I meant A15. Deep sleep power states are not supported on AM57xx SDK.

    i didn't got this, what is mean by sdk (uboot or first stage bootloader)

    qns:

    1. what changes i have to do to achieve sleep state?

    2. do i need to patch the kernal or it is a hardware limitation?

    thanks and regards

    chandana

  • Chandana,

    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

    "Core domain will idle only when USB idles which will mean USB will not be able to wake up. Hence only MPU is suspended and resumed currently."

    Best Regards,
    Keerthy