Skip to content

Commit 5e5587c

Browse files
committed
chore(linux): Update jacinto lpm doc
Add flow diagram, hardware details to excercise LPM mode. Signed-off-by: Udit Kumar <[email protected]>
1 parent 6bb8848 commit 5e5587c

File tree

3 files changed

+109
-11
lines changed

3 files changed

+109
-11
lines changed
37.3 KB
Loading

source/images/jacinto_s2r_exit.png

29.8 KB
Loading

source/linux/Foundational_Components/Power_Management/pm_low_power_modes_socoff.rst

Lines changed: 109 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,107 @@ Low power modes
88
Overview
99
********
1010

11-
The following sections describe a high-level description of the different low power modes (LPM) supported on |__PART_FAMILY_NAME__| SoC (System on Chip).
12-
TI EVMs (Evaluation Modules) validate supported low power modes. Each mode needs evaluation based on power consumption and latency (the time it takes to wake-up to Active mode) requirements.
13-
There is a tradeoff between power and latency based on the mode. Users must select the appropriate low power mode at build time to fit the needs of the application. The default mode in the SDK is SoC off.
11+
A typical SoC, from power to HLOS (Linux here for example) takes around 20 seconds to boot (reaching till Linux prompt), when it is ready to
12+
run application.
13+
However, requirement is to run applications within 2-3 seconds of power-on. For this purpose, developers have implemented many custom optimizations,
14+
which do not scale from platform to platform.
1415

15-
In SDK offering, following low power modes are supported:
16+
In LPM state, partial SW state saved to DDR that helps in achieving faster boot.
1617

17-
#. SoC off
18-
#. I/O Only Plus DDR
18+
The following sections describe a high-level description of the different low power modes (LPM) supported on |__PART_FAMILY_DEVICE_NAMES__| SoC (System on Chip).
19+
20+
+---------------------+---------------+---------------+-------------------------+-----------------------+
21+
| **Low power Mode** | **SoC State** | **DDR State** | **Retained SW context** | **Lost SW context** |
22+
+---------------------+---------------+---------------+-------------------------+-----------------------+
23+
| SOC OFF | Power off | Self Refresh | HLOS driver and apps | All fws (R5/M/C) core |
24+
+---------------------+---------------+---------------+-------------------------+-----------------------+
25+
| I/O only Plus DDR | Power off | Self Refresh | HLOS driver and apps | All fws (R5/M/C) core |
26+
| | except wakeup | | | |
27+
| | I/O | | | |
28+
+---------------------+---------------+---------------+-------------------------+-----------------------+
29+
30+
Based upon the requirement of power consumption and latency (the time it takes to wake-up to Active mode),
31+
users can select the appropriate low power mode at **build time** to fit the needs of their application.
32+
The default mode in the SDK is **SOC OFF**.
33+
34+
LPM entry overview
35+
==================
36+
After detecting the condition to enter standby, applications interacting with remote firmware shall be closed
37+
before entering standby.
38+
39+
This section explains the high-level software flow of low power modes entry.
40+
41+
.. image:: /images/jacinto_s2r_entry.png
42+
43+
LPM exit overview
44+
=================
45+
On receiving wakeup trigger, PMIC will restore power to SoC and SoC resume process will exit DDR from self-refresh mode and restore the
46+
saved software context.
47+
As part of resume process, firmwares of remote cores will be reloaded, therefore application interacting with remote firmware shall be started again.
48+
This section explains the high-level software flow of low power modes exit.
49+
50+
.. image:: /images/jacinto_s2r_exit.png
51+
52+
53+
*********************
54+
How to Test LPM modes
55+
*********************
56+
To test LPM modes, one needs to ensure that software and hardware configurations are correct.
57+
The following sections have details regarding the hardware and software configurations on TI EVMs.
58+
59+
Hardware modifications
60+
======================
61+
62+
.. ifconfig:: CONFIG_part_variant in ('J784S4')
63+
64+
Following board modifications are needed to validate SOC_OFF and IO_ONLY_PLUS_DDR low power modes on the J784S4 EVM.
65+
66+
- Change R534 from pull-down to pull-up to VCCA_3V3 side of C320, VDD_IO_1V8 powered down so that VDD1_DDR_1V8 also powers down unless EN remains high.
67+
- Remove R965, R1167, R1170, and R1169, During DDR RET, RESET must be pulled high.
68+
- R658 moved to R659
69+
70+
.. ifconfig:: CONFIG_part_variant in ('J7200')
71+
72+
By default, SOC_OFF mode can be validated on J7200 EVM without any hardware changes.
73+
In case IO_ONLY_PLUS_DDR mode needs to be tested,user needs to do the following board modification. These modifications will not impact SOC_OFF mode.
74+
75+
- Remove R74 and place it at R610. This will pull the signal high.
76+
77+
Software modifications
78+
======================
79+
TI’s K3 Jacinto family of SoCs have a concept of boardcfg that can be used to configure certain parameters at build time.
80+
By default, SOC_OFF mode enabled by default in SDK.
81+
IO_ONLY_PLUS_DDR mode can be enabled by changing boardcfg in u-boot at build time.
82+
83+
The low power mode is set statically at build time in “lpm_cfg” section of the power management board config.
84+
In the u-boot source tree the boardcfg is present at:
85+
86+
.. ifconfig:: CONFIG_part_variant in ('J7200')
87+
88+
board/ti/j721e/pm-cfg_j7200.yaml
89+
`J7200 board config <https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/board/ti/j721e/pm-cfg_j7200.yaml?h=ti-u-boot-2025.01>`_ .
90+
91+
.. ifconfig:: CONFIG_part_variant in ('J784S4')
92+
93+
board/ti/j784s4/pm-cfg.yaml
94+
`J784s4 board config <https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/board/ti/j784s4/pm-cfg.yaml?h=ti-u-boot-2025.01>`_ .
95+
96+
In above board config file, default lpm_mode is 0x5 (SOC_OFF) and suspend_initiator is 0xA (A72_0 host).
97+
98+
To set the LPM mode as IO_RET_PLUS_DDR, change lpm_mode to 0x2.
99+
100+
Sample code is available at
101+
https://gist.github.com/uditkumarti/fd0dfe8aa3dc094aadafecab67048307
102+
103+
The lpm mode value can be picked up from:
104+
https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html
105+
106+
Testing
107+
=======
108+
Below section explains, how to test supported LPM modes
19109

20-
*******
21110
SoC off
22-
*******
111+
-------
23112

24113
In SoC off low power mode, DDR retains partial software context (Mainly HLOS - High Level Operating System, Linux in this case) powering off the rest of SoC. This can save a significant amount of boot time, because it does not reinitialize whole kernel as it is already present in DDR.
25114

@@ -57,10 +146,10 @@ To exit from SoC off,
57146
Press SW15 push button on J784S4 evm.
58147

59148

60-
*****************
61-
I/O only Plus DDR
62-
*****************
149+
IO_ONLY_PLUS_DDR mode
150+
---------------------
63151

152+
Use u-boot build after changing lpm_mode to 0x2, in boardconfig file.
64153
In I/O only plus DDR, only the I/O pins remain active while the system turns off the rest of SoC.
65154

66155
#. Low power consumption: IO Only Plus DDR mode can save a significant amount of power, especially in battery-powered
@@ -143,3 +232,12 @@ Resume flow,
143232
[ 41.416506] PM: suspend exit
144233
root@<machine>-evm:~#
145234
root@<machine>-evm:~#
235+
236+
*****************
237+
Known limitations
238+
*****************
239+
1. Only A core as suspend master supported and tested with Linux.
240+
2. The LPM feature is not supported on HS-SE variant J784S4.
241+
3. If PCIe is being used, the resume latency increases by 1 sec for every PCIe instance, If EP is not connected.
242+
4. Remote core firmwares are getting loaded by Linux on resume.
243+
5. MCU domain R5 core, cannot be used in split mode.

0 commit comments

Comments
 (0)