Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -33,6 +29,28 @@ 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

.. attention::

For this release, in order to enable Standby, it is required for this
`patch <https://github.com/ARM-software/arm-trusted-firmware/commit/7f5ff95b39cc64ea70206fa58fd3e5aae0c33e7d>`__
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
<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>`__
overlay should be applied. Refer to :ref:`How to enable DT overlays
<howto_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:
Expand Down Expand Up @@ -102,6 +120,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
<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>`__
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
<https://www.kernel.org/doc/Documentation/devicetree/bindings/arm/idle-states.txt>`__.
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.
Expand Down