Skip to content

Commit a3ed167

Browse files
DhruvaG2000praneethbajjuri
authored andcommitted
feat: Add Release Specific LPM workarounds for AM62L
Add workarounds for AM62L LPM Signed-off-by: Dhruva Gole <[email protected]>
1 parent 151c760 commit a3ed167

File tree

3 files changed

+75
-0
lines changed

3 files changed

+75
-0
lines changed

source/devices/AM62LX/linux/Release_Specific.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ Release Specific
99
Release_Specific_Yocto_layer_Configuration
1010
Release_Specific_Migration_Guide
1111
Release_Specific_Kernel_Performance_Guide
12+
Release_Specific_Workarounds
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
###############################
2+
System Suspend Mode Workarounds
3+
###############################
4+
5+
ARM Trusted Firmware side changes
6+
*********************************
7+
8+
This patch updates the system suspend mode for the AM62L platform. After making the following changes, one
9+
needs to re-build the ARM Trusted Firmware and then re-package it in the :file:`tispl.bin` file to ensure
10+
the changes take effect. To learn more about TF-A and how to rebuild it, please refer to :ref:`_foundational-components-atf`.
11+
For rebuilding u-boot and generating the new :file:`tispl.bin` follow :ref:`Build-U-Boot-label`.
12+
13+
.. code-block:: diff
14+
15+
diff --git a/plat/ti/k3/common/am62l_psci.c b/plat/ti/k3/common/am62l_psci.c
16+
index 70f2aecdd..115729f4a 100644
17+
--- a/plat/ti/k3/common/am62l_psci.c
18+
+++ b/plat/ti/k3/common/am62l_psci.c
19+
@@ -133,7 +133,7 @@ static void am62l_pwr_domain_suspend(const psci_power_state_t *target_state)
20+
/* TODO: Pass the mode passed from kernel using s2idle
21+
* For now make mode=6 for RTC only + DDR and mdoe=0 for deepsleep
22+
*/
23+
- uint32_t mode = 0;
24+
+ uint32_t mode = 6;
25+
26+
core = plat_my_core_pos();
27+
proc_id = PLAT_PROC_START_ID + core;
28+
29+
The change is made in :file:`plat/ti/k3/common/am62l_psci.c`, which is the new PSCI driver for AM62L in Arm Trusted Firmware.
30+
The :func:`am62l_pwr_domain_suspend` function has been modified to change the default system suspend mode from Deep Sleep
31+
to RTC only + DDR.
32+
33+
The default mode indicates a deep sleep state, which provides the lowest latency wake-up but also consumes
34+
more power. In contrast, the new default mode, RTC only + DDR, offers a lower power consumption profile but at the cost
35+
of higher wake-up latency.
36+
37+
This change sets the default system suspend mode indication to 6, which corresponds to the RTC only + DDR mode.
38+
39+
This change is a temporary solution. A more robust solution is under development to pass a suspend parameter from the kernel
40+
by leveraging the s2idle mechanism.
41+
42+
Linux-side changes
43+
******************
44+
45+
Since there are a few new drivers in AM62L, they are yet to add suspend/resume support
46+
functionality in Linux. Hence, to avoid any blockers during suspend/resume of Linux
47+
make use of the :file:`k3-am62l3-evm-lpmdemo.dtb` instead of the regular :file:`k3-am62l3-evm.dtb`.
48+
49+
One can find the DT source of this file from
50+
`here <https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am62l3-evm-lpmdemo.dts?h=11.00.05>`__.
51+
52+
The build instructions for generating a DTB from DTS can be found here: :ref:`kernel_users_guide_compiling_the_device_tree_binaries`
53+
54+
The :file:`k3-am62l3-evm-lpmdemo.dtb` file disables many drivers which may not behave well during suspend/resume
55+
of the device. These are planned to be enabled in the future after fixing any suspend/resume related issues
56+
and thorough testing.
57+
58+
How-to suspend/resume
59+
*********************
60+
61+
To suspend the device, use the following command in Linux:
62+
63+
.. code-block:: console
64+
65+
$ echo mem > /sys/power/state
66+
67+
To resume the device, press the following button on the EVM:
68+
69+
.. image:: /images/am62l_lpm_wakeup_evm_pin.jpg
70+
71+
.. important::
72+
73+
Only the above button i.e. the RTC ext pin is wake up capable as of now. More wakeup sources
74+
will be added in future Linux SDK releases.
1.08 MB
Loading

0 commit comments

Comments
 (0)