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.

AM625: AM625: not able to wakeup from Deep sleep

Part Number: AM625

Hello Team,

We are trying to implement Sleep and Wakeup on our custom board, we are trying to use MCU GPIO for waking up the device from Sleep (Suspend-to-RAM (Deep Sleep)).

We have connected MCU_GPIO0_16 to an external switch on our board and we are using this to generate interrupt on device while in Deep Sleep. When we press the switch we get high to low signal on the MCU_GPIO but we observe that the device is not waking up from sleep.

  • We tried keeping the status of mcu_gpio0 node as both 'okay' and 'reserved' in device tree. but we did not get any success in waking the device from sleep
  • And also not getting signal low on Deep Sleep on pin PMIC_LPM_EN0 (B7). It's staying high only.
  • Also devmem2 0x04084040 b 0x28254007 not setting-up the value. (logs given below)



    while we check on EVM, with same steps, device waking up and getting low signal on PMIC_LPM_EN0 pin also.

referring this link : https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1261500/am623-gpio-wake-up-time-from-linux-suspend-to-ram


Logs given below.

root@sm2s-am6254:~# devmem2 0x04084040 b 0x28254007
/dev/mem opened.
Memory mapped at address 0xffffa82a6000.
Read at address  0x04084040 (0xffffa82a6010): 0x07
Write at address 0x04084040 (0xffffa82a6010): 0x28254007, readback 0x07
root@sm2s-am6254:~# 
root@sm2s-am6254:~# 
root@sm2s-am6254:~# 
root@sm2s-am6254:~# devmem2 0x04084040             
/dev/mem opened.
Memory mapped at address 0xffffa6745000.
Read at address  0x04084040 (0xffffa6745010): 0x08214007
root@sm2s-am6254:~#
root@sm2s-am6254:~# devmem2 0x43018080 b 0x15
/dev/mem opened.
Memory mapped at address 0xffffaae96000.
Read at address  0x43018080 (0xffffaae96080): 0x10
Write at address 0x43018080 (0xffffaae96080): 0x15, readback 0x15
root@sm2s-am6254:~# echo mem > /sys/power/state
[  531.994747] PM: suspend entry (deep)
[  532.001363] Filesystems sync: 0.002 seconds
[  532.025424] remoteproc remoteproc0: stopped remote processor 5000000.m4fss
[  532.032817] Freezing user space processes
[  532.038867] Freezing user space processes completed (elapsed 0.001 seconds)
[  532.045903] OOM killer disabled.
[  532.049123] Freezing remaining freezable tasks
[  532.055045] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
[  532.062456] printk: Suspending console(s) (use no_console_suspend to debug)



Can you guide us how to wake up the device and let us know if any other changes need to be done for same.

Thanks and regards,
Ishan

  • Hi Ishan,

    Which SDK version are you using?

    Can you clarify what you are trying to do with devmem2 0x04084040 b 0x28254007?

    Based on the PMIC signal voltage being high, the device may not be in deep sleep rather it hangs prior to that point. I don't think the wake-up source is an issue.

    To get further in debugging this, we would need to trace the transactions in/out of the DM firmware. Can you follow this E2E FAQ?: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1323581/faq-processor-sdk-am62x-how-can-we-debug-deep-sleep-on-am62x-using-sysfw-trace

    Best Regards,
    Anshu

  • Hey Anshu, 

    Thanks the reply.

    with devmem2 0x04084040 b 0x28254007, trying to set 29th(WKUP_EN) and 18th(RXactive) bit of register MCU_PADCFG_CTRL0_CFG0_PADCONFIG16




    I'll get back to you once i get DM firmware logs.


    Thanks and regards,
    Ishan

  • Hi Ishan,

    Thanks for the update. Can you also share which SDK version you are using? This would be helpful to know for debugging.

    Best Regards,

    Anshu

  • Hi Anshu, 

    We are using version SDK 9.0.


    Thanks and regards,
    Ishan

  • Hi Ishan,

    Thank you. We can examine the logs when available. Let me know if you have any questions in the mean time.

    Best Regards,

    Anshu

  • Hey Anshu,

    Thanks for the replay,

    There was some problematic in tfa/u-boot.

    Now we are getting signal low on Deep Sleep on pin PMIC_LPM_EN0 (B7). and not getting any error while going into sleep, So SOC going into sleep properly.


    Now for wake-up, we are using pin C6 (MCU_GPIO0_11). We have external pull-up on this pin.

    device tree entry for wake-up source given below.

    /{
     mcu_gpio_key {
                    compatible = "gpio-keys";
                    autorepeat;
                    pinctrl-names = "default";
                    pinctrl-0 = <&wake_mcugpio1_pins_default>;
                    interrupt-parent = <&mcu_gpio0>;
                    interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
                    switch {
                            label = "MCUGPIO";
                            linux,code = <143>;
                            gpios = <&mcu_gpio0 11 GPIO_ACTIVE_HIGH>;
                            wakeup-source;
                    };
            };
    };
    
    
    &mcu_pmx0{
    wake_mcugpio1_pins_default: wake-mcugpio1-pins-default {
                    pinctrl-single,pins = <
                            AM62X_MCU_IOPAD(0x002C, PIN_INPUT, 7) /* (C6) MCU_GPIO0_11 */
                    >;
            };
    
    };
    
    &mcu_gpio_intr {
            status = "okay";
    };
    
    &mcu_gpio0 {
            status = "okay";
    };
    



    When i give pulse low to the pin C6 (MCU_GPIO0_11), board is getting reboot. logs given below for the reference

    root@sm2s-am6254:~# 
    root@sm2s-am6254:~# 
    root@sm2s-am6254:~# 
    root@sm2s-am6254:~# cat /sys/class/remoteproc/remoteproc0/state
    running
    root@sm2s-am6254:~# devmem2 0x43018080 b 0x15
    /dev/mem opened.
    Memory mapped at address 0xffff9a809000.
    Read at address  0x43018080 (0xffff9a809080): 0x10
    Write at address 0x43018080 (0xffff9a809080): 0x15, readback 0x15
    root@sm2s-am6254:~# 
    root@sm2s-am6254:~# devmem2 0x0408402C             
    /dev/mem opened.
    Memory mapped at address 0xffff8e526000.
    Read at address  0x0408402C (0xffff8e52602c): 0x00050007
    root@sm2s-am6254:~# 
    root@sm2s-am6254:~# echo mem > /sys/power/state
    [ 1368.906580] PM: suspend entry (deep)
    [ 1368.913058] Filesystems sync: 0.002 seconds
    [ 1368.937440] remoteproc remoteproc0: stopped remote processor 5000000.m4fss
    [ 1368.944764] Freezing user space processes
    [ 1368.950779] Freezing user space processes completed (elapsed 0.001 seconds)
    [ 1368.957800] OOM killer disabled.
    [ 1368.961018] Freezing remaining freezable tasks
    [ 1368.966885] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
    [ 1368.974296] printk: Suspending console(s) (use no_console_suspend to debug)
    
    U-Boot SPL 2023.04-g379572d4a1-dirty (Mar 01 2024 - 18:07:56 +0530)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
    SPL initial stack usage: 13376 bytes
    Trying to boot from MMC2
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Loading Environment from MMC... *** Warning - No MMC card found, using default environment
    
    Starting ATF on ARM64 core...
    



    Please guide us, how can we wake-up the soc successfully ?



    Thanks and regards,
    Ishan

  • Hi Ishan,

    I am in trainings this week so responses will be delayed. I will review this as soon as I can.

    Best Regards,

    Anshu

  • Hi Ishan,

    We've noticed this occur when there is unexpected behavior from the PMIC. Will try to get confirmation from the Software Dev team about it.

    Thanks,

    Anshu

  • Hi Ishan,

    Just to confirm, have you re-enabled the IO_ISOLATION in the ti_sci.c driver? In the debugging guide, we instructed to use a hack.

    Best Regards,

    Anshu