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.

AM62P: Suspend failure with 12.01.00.05 Linux Kernel

Part Number: AM62P
Other Parts Discussed in Thread: AM625

After an update of the Linux kernel from  '12.01.00.04' to  '12.01.00.05' (Linux 6.18)  we noticed a regression on the suspend resume.

Linux mainline is also working fine.

The issue is present on both AM62P and AM625.

Here the logs from AM62P (full logs: job_1240392.log )

kern  :info  : [  776.992791] PM: suspend entry (deep)
kern  :info  : [  776.993334] Filesystems sync: 0.000 seconds
kern  :info  : [  777.080319] Freezing user space processes
kern  :info  : [  777.110048] Freezing user space processes completed (elapsed 0.029 seconds)
kern  :info  : [  777.110080] OOM killer disabled.
kern  :info  : [  777.110085] Freezing remaining freezable tasks
kern  :info  : [  777.111422] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
kern  :info  : [  777.465050] am65-cpsw-nuss 8000000.ethernet end0: Link is Down
kern  :err   : [  777.473946] ti-sci 44043000.system-controller: Failed to prepare sleep
kern  :err   : [  777.480547] ti-sci 44043000.system-controller: PM: dpm_run_callback(): platform_pm_suspend returns -19
kern  :err   : [  777.489883] ti-sci 44043000.system-controller: PM: failed to suspend: error -19
kern  :err   : [  777.497454] PM: Some devices failed to suspend, or early wake event detected
kern  :info  : [  777.522722] am65-cpsw-nuss 8000000.ethernet: set new flow-id-base 19
kern  :info  : [  777.537844] am65-cpsw-nuss 8000000.ethernet end0: PHY [8000f00.mdio:00] driver [TI DP83867] (irq=387)
kern  :info  : [  777.539553] am65-cpsw-nuss 8000000.ethernet end0: configuring for phy/rgmii-rxid link mode
kern  :warn  : [  777.628365] usb-conn-gpio connector: repeated role: device
kern  :info  : [  777.711157] OOM killer enabled.
kern  :info  : [  777.711184] Restarting tasks: Starting
kern  :info  : [  777.715251] Restarting tasks: Done
kern  :notice: [  777.715415] random: crng reseeded on system resumption
kern  :info  : [  777.715858] PM: suspend exit
  • Hi fd, 

    Are you testing on a TI EVM or on custom hardware?

    Does this error occur consistently? Can you provide the DM Firmware version?

    Best Regards,

    Anshu

  • Are you testing on a TI EVM or on custom hardware?

    custom HW. The issue is happening with both Verdin AM62 and with Verdin AM62P. You have the DT for both in your linux kernel tree.

    it's not obvious for me to test on the TI SK boards.

    Does this error occur consistently?

    Yes, the issue is systematic

    Can you provide the DM Firmware version?

    SYSFW ABI: 4.0 (firmware rev 0x000c '12.0.2--v12.00.02 (Clever Cat)')

    I have attached the full logs in the first message, you should be able to find more data there, if you need.

  • Hi fd, 

    Let me review the test logs with the software development team and see which patches got merged between the releases. I will get back to you by end of day Thursday.

    Best Regards,

    Anshu

  • Hi fd,

    Can you apply this patch and share the logs again?

    diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
    index 5bbfcc36eb8ef..9c4b43e9bed82 100644
    --- a/drivers/base/power/main.c
    +++ b/drivers/base/power/main.c
    @@ -1593,9 +1593,12 @@ static void dpm_propagate_wakeup_to_parent(struct device *dev)
     
     	spin_lock_irq(&parent->power.lock);
     
    -	if (device_wakeup_path(dev) && !parent->power.ignore_children)
    +	if (device_wakeup_path(dev) && !parent->power.ignore_children) {
     		parent->power.wakeup_path = true;
     
    +		dev_info(parent, "DEBUG: dpm_suspend: device is parent of a wakeup source\n");
    +	}
    +
     	spin_unlock_irq(&parent->power.lock);
     }
     
    @@ -1951,9 +1954,12 @@ static void device_suspend(struct device *dev, pm_message_t state, bool async)
      End:
     	if (!error) {
     		dev->power.is_suspended = true;
    -		if (device_may_wakeup(dev))
    +		if (device_may_wakeup(dev)) {
     			dev->power.wakeup_path = true;
     
    +			dev_info(dev, "DEBUG: dpm_suspend: device may wakeup due to being in the wakeup_path\n");
    +		}
    +
     		dpm_propagate_wakeup_to_parent(dev);
     		dpm_clear_superiors_direct_complete(dev);
     	}
    diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c
    index 0c21a2fdec8d9..8b118b5c349bd 100644
    --- a/drivers/pmdomain/ti/ti_sci_pm_domains.c
    +++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c
    @@ -91,6 +91,8 @@ static inline void ti_sci_pd_set_wkup_constraint(struct device *dev)
     		 * If device can wakeup using IO daisy chain wakeups,
     		 * we do not want to set a constraint.
     		 */
    +		dev_info(dev, "DEBUG: device may wakeup or in wakeup path\n");
    +
     		if (device_out_band_wakeup(dev)) {
     			dev_dbg(dev, "%s: has out of band wakeup, not setting constraints\n", \
     					__func__);

    Best Regards,

    Anshu

  • Thanks for the suggestion, I'll have a look in the next few days (this week I am not sure I have the time).

    Were you able to test on some TI EVK / SK platform? The issue is not present there?

  • Hi fd,

    We didn't test on a EVM now, but the development team noted they observed a similar error during their work sometime ago. They started the debug process with the same patch I shared.

    Best Regards,

    Anshu