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.

AM620-Q1: Deep Sleep & MCU only LPMs don't work with new SDK 11

Part Number: AM620-Q1

Tool/software:

Hello,

We are using new SDK 11. I've taken pre-build image for R5 DM (ti-dm for am62xx-lp).

SYSFW ABI: 4.0 (firmware rev 0x000b '11.0.7--v11.00.07 (Fancy Rat)')

When I'm trying to enter Deep Sleep or MCU Only , I have an error from ti-sci:

/home/user # echo mem >/sys/power/state
[  207.626412] PM: suspend entry (deep)
[  207.644474] Filesystems sync: 0.014 seconds
[  207.681605] Freezing user space processes
[  207.688258] Freezing user space processes completed (elapsed 0.002 seconds)
[  207.695325] OOM killer disabled.
[  207.698637] Freezing remaining freezable tasks
[  207.705249] Freezing remaining freezable tasks completed (elapsed 0.002 seconds)
[  207.712911] printk: Suspending console(s) (use no_console_suspend to debug)
[  207.726163] rtc-rv8803 1-0032: Voltage low, data is invalid.
[  208.041420] ==> ti_sci: dev system-controller@44043000, id 179, stat 1, constr resp = 2
[  208.041460] dwc3-am62 f910000.dwc3-usb: ti_sci_pd: ID:179 set device constraint.
[  208.041744] ==> ti_sci: dev system-controller@44043000, id 178, stat 1, constr resp = 2
[  208.041767] dwc3-am62 f900000.dwc3-usb: ti_sci_pd: ID:178 set device constraint.
[  208.042712] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
[  208.043040] am65-cpsw-nuss 8000000.ethernet eth1: Link is Down
[  208.049583] ==> ti_sci: dev system-controller@44043000, id 117, stat 1, constr resp = 2
[  208.049627] rtc-ti-k3 2b1f0000.rtc: ti_sci_pd: ID:117 set device constraint.
[  208.049972] ==> ti_sci: sleep resp = 0
[  208.049989] ti-sci 44043000.system-controller: Failed to prepare sleep
[  208.050006] ti-sci 44043000.system-controller: PM: dpm_run_callback(): platform_pm_suspend+0x0/0x6c returns -19
[  208.050065] ti-sci 44043000.system-controller: PM: failed to suspend: error -19
[  208.050088] PM: Some devices failed to suspend, or early wake event detected

I've added some extra printk-s with "==>".

3 dev constraints have been sent: 2 USBs + 1 rtc. It's the same like in your log from SDK docs: https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/latest/exports/docs/linux/Foundational_Components/Power_Management/pm_low_power_modes.html#deep-sleep

As I understad USBs are exceptions.

From MCU+ SDK src code:

./drivers/device_manager/rm_pm_hal/rm_pm_hal_src/pm/drivers/lpm/lpm_handler.c

                                /**
                                 * If device having constraints belongs to MAIN DEVGRP, then no lpm is possible
                                 * Exceptions: USB0 and USB1
                                 */
                                if (devgrp == MAIN_DEVGRP) {
                                        if ((i == USB0_DEV_ID) || (i == USB1_DEV_ID) || (i == USB0_ISO_DEV_ID) || (i == USB1_ISO_DEV_ID)) {

I've even tried to turn off the RTC, it hasn't helped.

Response from the DM is 0x0 = NACK instead of 0x2=ACK.

So, I've completely disabled (commented in the source code in ti_sci_pm_domains.c) sending the dev (wakeups ) constraints at all.

After this it works now: I can go to Deep Sleep and MCU Only (with latency constraint).

The questions are:

1. Do you know why it doesn't work with USBs?

2. Should it go to Deep sleep with internal  RTC dev 117 constraint?

3. I've also seen sending 3 UART constraints but I've manged to to turn it off by writing "disabled" to sys-fs power/wakeup. Is it possible disable it in DevTree?

4. Is it possible to disable USB constraints from device tree? I don't use wakeup-source propperty there.

Thank you in advance.

  • Hello,

    I'm looking into this so allow some time for me to replicate this on SDK 11.0. Please ping this thread by Tuesday if you don't get a response.

    Thanks,

    Anshu

  • Hello, Anshu!

    Any news?

  • Hello,

    We also are trying to wakeup from Partial-io (sdk11).

    [   69.509079] reboot: Power down
    [   69.512254] ti-sci 44043000.system-controller: /bus@f0000/bus@4000000/can@4e08000 identified as wakeup source for Partial-IO
    [   69.523475] ti-sci 44043000.system-controller: Entering Partial-IO because a powered wakeup-enabled device was found.
    ERROR:   Timeout waiting for thread SP_RESPONSE to fill
    ERROR:   Thread SP_RESPONSE verification failed (-60)
    ERROR:   Message receive failed (-60)
    ERROR:   Failed to get response (-60)
    ERROR:   Transfer send failed (-60)

    I've got strange errors.

    I've checked source code:

    static int tisci_sys_off_handler(struct sys_off_data *data)
    {
            struct ti_sci_info *info = data->cb_data;
            bool enter_partial_io = tisci_canuart_wakeup_enabled(info);
            int ret;
     
            if (!enter_partial_io)
                    return NOTIFY_DONE;
     
            ret = tisci_enter_partial_io(info);
     
            if (ret) {
                    dev_err(info->dev,
                                    "Failed to enter Partial-IO %pe, trying to do an emergency restart\n",
                            ERR_PTR(ret));
                    emergency_restart();
            }
     
            mdelay(5000);
            emergency_restart();
     
            return NOTIFY_DONE;
    }

    Do we really need emrgency restart here?

    mdelay(5000);
    emergency_restart();

    ?????????????????????????????

    From reboot.c:

    /**
     *      emergency_restart - reboot the system
     *
     *      Without shutting down any hardware or taking any locks
     *      reboot the system.  This is called when we know we are in
     *      trouble so this is our best effort to reboot.  This is
     *      safe to call in interrupt context.
     */
    void emergency_restart(void)
    {
            kmsg_dump(KMSG_DUMP_EMERG);
            system_state = SYSTEM_RESTART;
            machine_emergency_restart();
    }
    EXPORT_SYMBOL_GPL(emergency_restart);
    

    Best regards,

    Sergey.

  • Hi, I've read commit message that "mdelay(5000);       emergency_restart();" point must not be reached. But after exactly 5seconds I've got these errors. Looks like the system doesn't go to Partial-IO properly for some reason....