From cbf50bcf306660324519118133a2d762c6f32b34 Mon Sep 17 00:00:00 2001 From: Kendall Willis Date: Mon, 14 Jul 2025 13:03:08 -0500 Subject: [PATCH 1/2] feat(pm_cpuidle): Enable Standby with overlay To enable Standby, an overlay needs to be applied to Linux that adds an idle-state node. Denote what it takes to enable Standby and explain the overlay. Signed-off-by: Kendall Willis --- .../Power_Management/pm_cpuidle.rst | 43 +++++++++++++++++-- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/source/linux/Foundational_Components/Power_Management/pm_cpuidle.rst b/source/linux/Foundational_Components/Power_Management/pm_cpuidle.rst index a419dd3c2..2ee47daac 100644 --- a/source/linux/Foundational_Components/Power_Management/pm_cpuidle.rst +++ b/source/linux/Foundational_Components/Power_Management/pm_cpuidle.rst @@ -18,10 +18,6 @@ transition to the selected state. .. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX', 'J722S') - The A53 cores on |__PART_FAMILY_DEVICE_NAMES__| currently support only the Wait for Interrupt (WFI) - C-state. This state gets enabled by default in the CPUIdle driver without - requiring any additional DT configuration. - .. rubric:: Standby Mode On |__PART_FAMILY_DEVICE_NAMES__| platforms, "Standby" mode is implemented through the Linux CPUIdle @@ -33,6 +29,14 @@ transition to the selected state. When your device appears inactive, it is actually cycling in and out of this standby state many times per second, seamlessly managing power while remaining responsive. + .. rubric:: Enable Standby + + In order to enable Standby the `k3-am62x-sk-lpm-standby.dtso + `__ + overlay should be applied. Refer to :ref:`How to enable DT overlays + ` for more details. More information on what the overlay + does is in the :ref:`linux-device-tree-label` section. + .. rubric:: Standby Implementation Architecture For |__PART_FAMILY_DEVICE_NAMES__|, the Standby implementation involves a multi-layer architecture: @@ -102,6 +106,37 @@ transition to the selected state. - :file:`plat/ti/k3/common/k3_psci.c` - PSCI implementation for K3 platforms + .. _linux-device-tree-label: + + .. rubric:: Linux Device Tree Implementation + + In order to implement Standby in Linux, an idle-states node has to be added + and then referenced by the CPU node. The `k3-am62x-sk-lpm-standby.dtso + `__ + can be used as a reference. + + .. code-block:: dts + + idle-states { + entry-method = "psci"; + + CPU_SLEEP_0: stby { + compatible = "arm,idle-state"; + idle-state-name = "standby"; + arm,psci-suspend-param = <0x00000001>; + entry-latency-us = <100>; + exit-latency-us = <50>; + min-residency-us = <1000>; + }; + }; + + + The ``entry-latency-us``, ``exit-latency-us``, and ``min-residency-us`` + properties are explained in depth `here + `__. + The ``min-residency-us`` can be fine tuned to change the minimum amount of + time Linux is in idle which can change the power savings. + .. rubric:: Driver Usage CPUIdle works automatically once enabled in the kernel, with no user intervention required. From 518515e08a3df5a9ffb4cd3701b278bfc679d4f1 Mon Sep 17 00:00:00 2001 From: Kendall Willis Date: Mon, 14 Jul 2025 13:09:19 -0500 Subject: [PATCH 2/2] feat(pm_cpuidle): Add workaround to enable Standby In the current release of SDK 11.1, Standby needs an additonal ARM Trusted Firmware patch to enable Standby. Signed-off-by: Kendall Willis --- .../Power_Management/pm_cpuidle.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/source/linux/Foundational_Components/Power_Management/pm_cpuidle.rst b/source/linux/Foundational_Components/Power_Management/pm_cpuidle.rst index 2ee47daac..822bae5a4 100644 --- a/source/linux/Foundational_Components/Power_Management/pm_cpuidle.rst +++ b/source/linux/Foundational_Components/Power_Management/pm_cpuidle.rst @@ -31,6 +31,20 @@ transition to the selected state. .. rubric:: Enable Standby + .. attention:: + + For this release, in order to enable Standby, it is required for this + `patch `__ + to be applied to ARM Trusted Firmware. + + After applying the patch, ATF will need to be re-built and then + re-packaged in the :file:`tispl.bin` file to ensure the changes take + effect. U-Boot provides the :file:`tispl.bin` file, so U-Boot will need + to be re-built after TF-A. To learn more about TF-A and how to rebuild + it, please refer to :ref:`foundational-components-atf`. For rebuilding + U-Boot and generating the new :file:`tispl.bin` follow + :ref:`Build-U-Boot-label`. + In order to enable Standby the `k3-am62x-sk-lpm-standby.dtso `__ overlay should be applied. Refer to :ref:`How to enable DT overlays