Re: [PATCH v13 0/5] firmware: ti_sci: Introduce system suspend support
From: Roger Quadros
Date: Thu Oct 10 2024 - 04:34:03 EST
Hi Markus
On 07/10/2024 09:08, Markus Schneider-Pargmann wrote:
> Abstract
> ********
>
> This series introduces necessary ti_sci driver functionality to support
> various Suspend-to-RAM modes on TI AM62 family of devices. These Low
> Power Modes include Deep Sleep and MCU Only as described in section
> "6.2.4 Power Modes" of the AM62P Technical Reference Manual [0].
>
> Summary
> *******
>
> This series is a restructuring and rebase of the patch series by
> Dave Gerlach [1] and Dhruva Gole [2]. It applies on top of Linux
> 6.12-rc1.
>
> The kernel triggers entry to Low Power Mode through the mem suspend
> transition with the following:
>
> * At the bootloader stage, one is expected to package the TIFS stub
> which then gets pulled into the Tightly coupled memory of the Device
> Mgr (DM) R5 when it starts up. If using U-Boot, then it requires
> tispl.bin to contain the TIFS stub. Refer to documentation in upstream
> u-boot[3] for further details. The supported firmware version is from
> TI Processor SDK >= 10.00 ie. tag 10.00.04 from ti-linux-firmware [4].
>
> * Use a TF-A binary that supports PSCI_SYSTEM_SUSPEND call. This causes
> system to use PSCI system suspend as last step of mem sleep.
>
> * We add support for the TISCI_MSG_QUERY_FW_CAPS message, used to retrieve
> the firmware capabilities of the currently running system firmware [6].
> Sysfw version >= 10.00.04 support LPM_DM_MANAGED capability, where
> Device Mgr firmware now manages which low power mode is chosen. Going
> forward, this is the default configuration supported for TI AM62 family
> of devices. The state chosen by the DM can be influenced by sending
> constraints using the new LPM constraint APIs. (Patch 1)
>
> * The firmware requires that the OS sends a TISCI_MSG_PREPARE_SLEEP
> message in order to provide details about suspend. The ti_sci driver
> must send this message to firmware with the above information
> included, which it does during the driver suspend handler when
> PM_MEM_SUSPEND is the determined state being entered. The mode being
> sent depends on whether firmware capabilities have support for
> LPM_DM_MANAGED feature. Legacy firmware or those supporting other
> modes can extend the mode selection logic as needed. (Patch 2)
>
> * We also add the remaining TISCI Low Power Mode messages required for
> inquiring wake reason and managing LPM constraints as part of a new PM
> ops. These messages are part of the TISCI PM Low Power Mode API [5].
> (Patch 3)
>
> * Finally if any CPUs have PM QoS resume latency constraints set, we
> aggregate these and set the TISCI system-wide latency constraint.
> (Patch 4)
>
> Testing
> *******
>
> This series can for example be tested with a am62a-lp-sk board.
Tested on am62-sk.
Tested-by: Roger Quadros <rogerq@xxxxxxxxxx>
>
> For am62a-lp-sk all usb nodes have to be disabled at the moment (usbss0,
> usb0, usbss1 and usb1). There is currently an issue with USB Link Power
> Management and turning off the USB device which is being worked on.
Or you can this patch [1].
[1] https://lore.kernel.org/all/20241009-am62-lpm-usb-v2-1-da26c0cd2b1e@xxxxxxxxxx/
cheers,
-roger
--
cheers,
-roger