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.

AM62A7: Suspend/Deep Sleep support on the 09.01 SDK

Part Number: AM62A7

Is suspend/deep sleep supported on the AM62A with the 09.01 SDK? The linked e2e post mentions it was supported on the 09.00 SDK but I can't find any info for the later release.

  • Thanks. It looks like I got lost in the edgeai documentation and didn't know there was a separate processor-sdk-linux area.  I will give this a shot and get back to you.

  • Trying the rtcwake command is failing to suspend.  Looks like there is something in the message box?

    root@mitysom-am62ax:~# rtcwake -m mem -s 10
    rtcwake: wakeup from "mem" using /dev/rtc0 at Fri Apr 12 20:10:36 2024
    [  164.069192] PM: suspend entry (deep)
    [  164.073234] Filesystems sync: 0.000 seconds
    [  164.096130] remoteproc remoteproc0: stopped remote processor 79000000.r5f
    [  164.103920] Freezing user space processes
    [  164.109597] Freezing user space processes completed (elapsed 0.001 seconds)
    [  164.116650] OOM killer disabled.
    [  164.119887] Freezing remaining freezable tasks
    [  164.125501] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
    [  164.132904] printk: Suspending console(s) (use no_console_suspend to debug)
    [  164.157222] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    [  164.160443] omap8250 2800000.serial: PM domain pd:146 will not be powered off
    [  164.161875] omap-mailbox 29010000.mailbox: fifo 2 has unexpected unread messages
    [  164.161894] omap-mailbox 29010000.mailbox: PM: dpm_run_callback(): platform_pm_suspend+0x0/0x7c returns -16
    [  164.161921] omap-mailbox 29010000.mailbox: PM: failed to suspend: error -16
    [  164.161933] PM: Some devices failed to suspend, or early wake event detected
    [  164.165490] am65-cpsw-nuss 8000000.ethernet: set new flow-id-base 19
    [  164.176044] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:03] driver [Microchip KSZ9131 Gigabit PHY] (irq=POLL)
    [  164.176074] am65-cpsw-nuss 8000000.ethernet eth0: configuring for phy/rgmii-rxid link mode
    [  164.185424] am65-cpsw-nuss 8000000.ethernet eth1: PHY [8000f00.mdio:04] driver [Microchip KSZ9131 Gigabit PHY] (irq=POLL)
    [  164.185438] am65-cpsw-nuss 8000000.ethernet eth1: configuring for phy/rgmii-rxid link mode
    [  164.190396] usb-conn-gpio usb_microb_connector: repeated role: device
    [  164.506884] OOM killer enabled.
    [  164.510027] Restarting tasks ... done.
    [  164.515836] random: crng reseeded on system resumption
    [  164.521189] remoteproc remoteproc0: powering up 79000000.r5f
    [  164.526967] remoteproc remoteproc0: Booting fw image am62a-mcu-r5f0_0-fw, size 52148
    [  164.536139] rproc-virtio rproc-virtio.2.auto: assigned reserved memory node r5f-dma-memory@9b800000
    [  164.546797] virtio_rpmsg_bus virtio0: rpmsg host is online
    [  164.547471] virtio_rpmsg_bus virtio0: creating channel ti.ipc4.ping-pong addr 0xd
    [  164.552546] rproc-virtio rproc-virtio.2.auto: registered virtio0 (type 7)
    [  164.560374] virtio_rpmsg_bus virtio0: creating channel rpmsg_chrdev addr 0xe
    [  164.567022] remoteproc remoteproc0: remote processor 79000000.r5f is now up
    [  164.581074] PM: suspend exit
    

  • Hi Jonathan,

    Are you using a TI EVM or custom hardware?

    Did you use any of the Pre-Built images in the SDK? Only the Default Image will contain the M4 firmware.


    Thanks,

    Anshu

  • Sorry for the slow reply, the e2e was down last friday and I couldn't post a response.

    I am using our custom hardware.  I can retest this on the evm, though I'm unsure how this would affect the mailboxes.

    I tested this using the edgeai and the default tisdk image, and got the same error on both.

  • Testing the rtcwake on the evm using the edgeai image did work.

    Any idea which device this mailbox belongs to? 29010000.mailbox

    root@am62axx-evm:/opt/edgeai-gst-apps# rtcwake -s 10 -m mem -d rtc1
    rtcwake: wakeup from "mem" using rtc1 at Thu Jan  1 00:17:33 1970
    [ 1091.563681] PM: suspend entry (deep)
    [ 1091.567410] Filesystems sync: 0.000 seconds
    [ 1091.596693] remoteproc remoteproc1: stopped remote processor 79000000.r5f
    [ 1091.604020] Freezing user space processes
    [ 1091.609638] Freezing user space processes completed (elapsed 0.001 seconds)
    [ 1091.616637] OOM killer disabled.
    [ 1091.619856] Freezing remaining freezable tasks
    [ 1091.625579] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
    [ 1091.633066] printk: Suspending console(s) (use no_console_suspend to debug)
    [ 1091.652615] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
    [ 1091.656160] omap8250 2800000.serial: PM domain pd:146 will not be powered off
    [ 1091.662506] Disabling non-boot CPUs ...
    [ 1091.663901] psci: CPU1 killed (polled 4 ms)
    [ 1091.666756] psci: CPU2 killed (polled 0 ms)
    [ 1091.669313] psci: CPU3 killed (polled 0 ms)
    [ 1091.670128] Enabling non-boot CPUs ...
    [ 1091.670441] Detected VIPT I-cache on CPU1
    [ 1091.670509] GICv3: CPU1: found redistributor 1 region 0:0x00000000018a0000
    [ 1091.670560] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
    [ 1091.671304] CPU1 is up
    [ 1091.671528] Detected VIPT I-cache on CPU2
    [ 1091.671568] GICv3: CPU2: found redistributor 2 region 0:0x00000000018c0000
    [ 1091.671603] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
    [ 1091.672221] CPU2 is up
    [ 1091.672460] Detected VIPT I-cache on CPU3
    [ 1091.672504] GICv3: CPU3: found redistributor 3 region 0:0x00000000018e0000
    [ 1091.672547] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
    [ 1091.673217] CPU3 is up
    [ 1091.673696] ti-sci 44043000.system-controller: ti_sci_resume: wakeup source: 0x50
    [ 1091.682217] am65-cpsw-nuss 8000000.ethernet: set new flow-id-base 19
    [ 1091.696085] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [TI DP83867] (irq=POLL)
    [ 1091.696109] am65-cpsw-nuss 8000000.ethernet eth0: configuring for phy/rgmii-rxid link mode
    [ 1091.949447] OOM killer enabled.
    [ 1091.952591] Restarting tasks ... done.
    [ 1091.958696] random: crng reseeded on system resumption
    [ 1091.963978] remoteproc remoteproc1: powering up 79000000.r5f
    [ 1091.969769] remoteproc remoteproc1: Booting fw image am62a-mcu-r5f0_0-fw, size 52148
    [ 1091.983205] rproc-virtio rproc-virtio.7.auto: assigned reserved memory node r5f-dma-memory@9b800000
    [ 1091.993062] virtio_rpmsg_bus virtio1: rpmsg host is online
    [ 1091.993492] virtio_rpmsg_bus virtio1: creating channel ti.ipc4.ping-pong addr 0xd
    [ 1091.998692] rproc-virtio rproc-virtio.7.auto: registered virtio1 (type 7)
    [ 1092.006421] virtio_rpmsg_bus virtio1: creating channel rpmsg_chrdev addr 0xe
    [ 1092.012946] remoteproc remoteproc1: remote processor 79000000.r5f is now up
    [ 1092.027113] PM: suspend exit

  • Hi Jonathan,

    29010000.mailbox refers to mailbox0_cluster1: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi?h=ti-linux-6.1.y#n779

    We can try to disable the node in the device tree. I'll get back to you on a device tree patch to do this.

    Best Regards,

    Anshu

  • This change allowed me to put my device into sleep.

  • Is this "Hack" okay to keep in the kernel? Will it affect the DSP demos?

  • Hi Jonathan,

    Since the hack only changes the mailbox FIFOs, I wouldn't expect any impact on other functionalities if left enabled.

    Thanks,

    Anshu