Skip to content

Commit 37ac9a6

Browse files
kwillis01cshilwant
authored andcommitted
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 <[email protected]>
1 parent 2cf3746 commit 37ac9a6

File tree

1 file changed

+39
-4
lines changed

1 file changed

+39
-4
lines changed

source/linux/Foundational_Components/Power_Management/pm_cpuidle.rst

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ transition to the selected state.
1818

1919
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX', 'J722S')
2020

21-
The A53 cores on |__PART_FAMILY_DEVICE_NAMES__| currently support only the Wait for Interrupt (WFI)
22-
C-state. This state gets enabled by default in the CPUIdle driver without
23-
requiring any additional DT configuration.
24-
2521
.. rubric:: Standby Mode
2622

2723
On |__PART_FAMILY_DEVICE_NAMES__| platforms, "Standby" mode is implemented through the Linux CPUIdle
@@ -33,6 +29,14 @@ transition to the selected state.
3329
When your device appears inactive, it is actually cycling in and out of this standby state
3430
many times per second, seamlessly managing power while remaining responsive.
3531

32+
.. rubric:: Enable Standby
33+
34+
In order to enable Standby the `k3-am62x-sk-lpm-standby.dtso
35+
<https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am62x-sk-lpm-standby.dtso?h=11.01.05>`__
36+
overlay should be applied. Refer to :ref:`How to enable DT overlays
37+
<howto_dt_overlays>` for more details. More information on what the overlay
38+
does is in the :ref:`linux-device-tree-label` section.
39+
3640
.. rubric:: Standby Implementation Architecture
3741

3842
For |__PART_FAMILY_DEVICE_NAMES__|, the Standby implementation involves a multi-layer architecture:
@@ -102,6 +106,37 @@ transition to the selected state.
102106

103107
- :file:`plat/ti/k3/common/k3_psci.c` - PSCI implementation for K3 platforms
104108

109+
.. _linux-device-tree-label:
110+
111+
.. rubric:: Linux Device Tree Implementation
112+
113+
In order to implement Standby in Linux, an idle-states node has to be added
114+
and then referenced by the CPU node. The `k3-am62x-sk-lpm-standby.dtso
115+
<https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am62x-sk-lpm-standby.dtso?h=11.01.05>`__
116+
can be used as a reference.
117+
118+
.. code-block:: dts
119+
120+
idle-states {
121+
entry-method = "psci";
122+
123+
CPU_SLEEP_0: stby {
124+
compatible = "arm,idle-state";
125+
idle-state-name = "standby";
126+
arm,psci-suspend-param = <0x00000001>;
127+
entry-latency-us = <100>;
128+
exit-latency-us = <50>;
129+
min-residency-us = <1000>;
130+
};
131+
};
132+
133+
134+
The ``entry-latency-us``, ``exit-latency-us``, and ``min-residency-us``
135+
properties are explained in depth `here
136+
<https://www.kernel.org/doc/Documentation/devicetree/bindings/arm/idle-states.txt>`__.
137+
The ``min-residency-us`` can be fine tuned to change the minimum amount of
138+
time Linux is in idle which can change the power savings.
139+
105140
.. rubric:: Driver Usage
106141

107142
CPUIdle works automatically once enabled in the kernel, with no user intervention required.

0 commit comments

Comments
 (0)