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.