AM3358: Unable to enter suspend

Part Number: AM3358

I'm trying to enter suspend using the am3358 (Beaglebone Black) using Processor SDK 11.02.

I've rebuilt the kernel with the following options:

# Firmware Loading from rootfs
CONFIG_FW_LOADER_USER_HELPER=y
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y

# AMx3 Power Config Options
CONFIG_MAILBOX=y
CONFIG_OMAP2PLUS_MBOX=y
CONFIG_WKUP_M3_RPROC=y
CONFIG_SOC_TI=y
CONFIG_WKUP_M3_IPC=y
CONFIG_TI_EMIF_SRAM=y
CONFIG_AMX3_PM=y

CONFIG_RTC_DRV_OMAP=y

But it seems there are issues with booting up the wkup m3 core.

root@am335x-evm:~# dmesg | grep wkup
[    1.680913] PM: Cannot get wkup_m3_ipc handle
[    1.805493] remoteproc remoteproc0: wkup_m3 is available
[    2.723269] PM: Cannot get wkup_m3_ipc handle
[    2.874030] remoteproc remoteproc0: powering up wkup_m3
[    2.917625] PM: Cannot get wkup_m3_ipc handle
[    2.961731] PM: Cannot get wkup_m3_ipc handle
[    2.968221] PM: Cannot get wkup_m3_ipc handle
[    3.015180] PM: Cannot get wkup_m3_ipc handle
[    3.035017] PM: Cannot get wkup_m3_ipc handle
[    3.095032] PM: Cannot get wkup_m3_ipc handle
[   13.331155] PM: Cannot get wkup_m3_ipc handle
[   21.514724] PM: Cannot get wkup_m3_ipc handle
[   21.711047] PM: Cannot get wkup_m3_ipc handle
[   21.859337] PM: Cannot get wkup_m3_ipc handle
[   21.995909] PM: Cannot get wkup_m3_ipc handle
[   22.127539] PM: Cannot get wkup_m3_ipc handle
[   22.219413] PM: Cannot get wkup_m3_ipc handle
[   22.323951] PM: Cannot get wkup_m3_ipc handle
[   22.601972] PM: Cannot get wkup_m3_ipc handle
[   23.569870] PM: Cannot get wkup_m3_ipc handle
[   23.750187] PM: Cannot get wkup_m3_ipc handle
[   23.856166] PM: Cannot get wkup_m3_ipc handle
[   23.999483] PM: Cannot get wkup_m3_ipc handle
[   24.078026] PM: Cannot get wkup_m3_ipc handle
[   24.803425] PM: Cannot get wkup_m3_ipc handle
[   25.083868] PM: Cannot get wkup_m3_ipc handle
[   25.153624] PM: Cannot get wkup_m3_ipc handle
[   25.233292] PM: Cannot get wkup_m3_ipc handle
[   25.273790] PM: Cannot get wkup_m3_ipc handle
[   26.065364] PM: Cannot get wkup_m3_ipc handle
[   64.537538] wkup_m3_ipc 44e11324.wkup_m3_ipc: rproc_boot failed
[  207.745729] PM not initialized for pm33xx, wkup_m3_ipc, or am335x-pm-firmware.elf
root@am335x-evm:~# echo mem > /sys/power/state
[ 9025.411745] PM: suspend entry (s2idle)
[ 9025.416360] Filesystems sync: 0.000 seconds
[ 9025.443805] Freezing user space processes
[ 9025.452633] Freezing user space processes completed (elapsed 0.004 seconds)
[ 9025.459688] OOM killer disabled.
[ 9025.463075] Freezing remaining freezable tasks
[ 9025.468936] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
[ 9025.476547] PM not initialized for pm33xx, wkup_m3_ipc, or am335x-pm-firmware.elf
[ 9025.486950] OOM killer enabled.
[ 9025.490118] Restarting tasks ... done.
[ 9025.503004] random: crng reseeded on system resumption
[ 9025.510754] PM: suspend exit
-sh: echo: write error: Invalid argument

I also see that the firmware already exists in the following path: /lib/firmware/am335x-pm-firmware.elf

Please suggest how to resolve so I can enter suspend.

  • Hi Sabeeh,

    I'm checking internally if we tested LPM on AM335x on this release.

    Can you check a few things?

    1. Is the remoteproc driver is enabled?

    2. Does dmesg | grep -i "CM3 Firmware" return anything?

    3. Have you tested it on any other SDK version? I want to see if it regressed between versions.

    4. Can you also enable these sysfs configs and test it again? I'm looking to see if there is a driver preventing the m3_ipc driver from working.

    $ echo 0 > /sys/module/printk/parameters/console_suspend
    $ echo 8 > /proc/sys/kernel/printk
    $ echo 1 > /sys/power/pm_print_times # ifdef CONFIG_PM_SLEEP_DEBUG in kernel config
    $ echo 1 > /sys/power/pm_debug_messages #ifdef CONFIG_PM_SLEEP_DEBUG in kernel config

    Best Regards,

    Anshu



  • Hi Anshu,

    1. Is the remoteproc driver is enabled?

    How can I confirm? I imagine it's a built-in kernel setting. I do see the following, so looks working to me:

    root@am335x-evm:/usr/share/cc33xx# dmesg | grep remoteproc
    [    1.810798] remoteproc remoteproc0: wkup_m3 is available
    [    2.884088] remoteproc remoteproc0: powering up wkup_m3
    [    2.889525] remoteproc remoteproc0: Direct firmware load for am335x-pm-firmware.elf failed with error -2
    [    2.933958] remoteproc remoteproc0: Falling back to sysfs fallback for: am335x-pm-firmware.elf
    [   24.888801] remoteproc remoteproc1: 4a334000.pru is available
    [   24.929426] remoteproc remoteproc2: 4a338000.pru is available
    [   64.533223] remoteproc remoteproc0: request_firmware failed: -110
    

    2. Does dmesg | grep -i "CM3 Firmware" return anything?

    No, using this exact command does not return anything.

    3. Have you tested it on any other SDK version? I want to see if it regressed between versions.

    I have tested it on Processor SDK 9 some time ago where it was not working either, but I don't have any logs for that. My understanding from some other e2e threads was this LPM was working after SDK 9.

    4. Can you also enable these sysfs configs and test it again? I'm looking to see if there is a driver preventing the m3_ipc driver from working.

    I tried testing with CONFIG_PM_SLEEP_DEBUG and the cc33xx driver started to fail FW download. Let me try to analyze further and I will get back to you.

    However, if it is confirmed on your side that LPM is tested and working then clearly the issue is with some contention on the cc33xx driver.

  • Thanks Sabeeh,

    I'm still looking through our internal test results and will get back to you.

  • Hi Sabeeh,

    Looks like LPM was working on the 11.x baseline from the internal test results.

    How can I confirm? I imagine it's a built-in kernel setting.

    [    1.810798] remoteproc remoteproc0: wkup_m3 is available
    [    2.884088] remoteproc remoteproc0: powering up wkup_m3
    [    2.889525] remoteproc remoteproc0: Direct firmware load for am335x-pm-firmware.elf failed with error -2
    [    2.933958] remoteproc remoteproc0: Falling back to sysfs fallback for: am335x-pm-firmware.elf

    This indicates to me that remoteproc is working.

    However, if it is confirmed on your side that LPM is tested and working then clearly the issue is with some contention on the cc33xx driver.

    It doesn't seem like the cc33x driver was enabled during the log.

    As a first step, can you try with SDK 11 without the cc33x just to see if its working for you? So we can establish a working base line.

    Best Regards,

    Anshu