-
Notifications
You must be signed in to change notification settings - Fork 77
Lpm update #610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Lpm update #610
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's use "Decrypt" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,18 +8,107 @@ | |
| Overview | ||
| ******** | ||
|
|
||
| The following sections describe a high-level description of the different low power modes (LPM) supported on |__PART_FAMILY_NAME__| SoC (System on Chip). | ||
| 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. | ||
| 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. | ||
| 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 | ||
|
Check warning on line 11 in source/linux/Foundational_Components/Power_Management/pm_low_power_modes_socoff.rst
|
||
| run application. | ||
| However, requirement is to run applications within 2-3 seconds of power-on. For this purpose, developers have implemented many custom optimizations, | ||
| that do not scale from platform to platform. | ||
|
|
||
| In SDK offering, following low power modes are supported: | ||
| In LPM state, partial SW state saved to DDR that helps in achieving faster boot. | ||
|
Check warning on line 16 in source/linux/Foundational_Components/Power_Management/pm_low_power_modes_socoff.rst
|
||
|
|
||
| #. SoC off | ||
| #. I/O Only Plus DDR | ||
| 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). | ||
|
|
||
| +---------------------+---------------+---------------+-------------------------+-----------------------+ | ||
| | **Low power Mode** | **SoC State** | **DDR State** | **Retained SW context** | **Lost SW context** | | ||
|
Check warning on line 21 in source/linux/Foundational_Components/Power_Management/pm_low_power_modes_socoff.rst
|
||
| +---------------------+---------------+---------------+-------------------------+-----------------------+ | ||
| | SOC OFF | Power off | Self Refresh | HLOS driver and apps | All fws (R5/M/C) core | | ||
|
Check warning on line 23 in source/linux/Foundational_Components/Power_Management/pm_low_power_modes_socoff.rst
|
||
| +---------------------+---------------+---------------+-------------------------+-----------------------+ | ||
| | I/O only Plus DDR | Power off | Self Refresh | HLOS driver and apps | All fws (R5/M/C) core | | ||
|
Check warning on line 25 in source/linux/Foundational_Components/Power_Management/pm_low_power_modes_socoff.rst
|
||
| | | except wakeup | | | | | ||
| | | I/O | | | | | ||
| +---------------------+---------------+---------------+-------------------------+-----------------------+ | ||
|
|
||
| Based upon the requirement of power consumption and latency (the time it takes to wake-up to Active mode), | ||
| users can select the appropriate low power mode at **build time** to fit the needs of their application. | ||
| The default mode in the SDK is **SOC OFF**. | ||
|
|
||
| LPM entry overview | ||
| ================== | ||
| After detecting the condition to enter standby, applications interacting with remote firmware shall be closed | ||
| before entering standby. | ||
|
|
||
| This section explains the high-level software flow of low power modes entry. | ||
|
|
||
| .. image:: /images/jacinto_s2r_entry.png | ||
|
|
||
| LPM exit overview | ||
| ================= | ||
| On receiving wakeup trigger, PMIC will restore power to SoC and SoC resume process will exit DDR from self-refresh mode and restore the | ||
| saved software context. | ||
| As part of resume process, firmwares of remote cores will be reloaded, therefore application interacting with remote firmware shall be started again. | ||
| This section explains the high-level software flow of low power modes exit. | ||
|
|
||
| .. image:: /images/jacinto_s2r_exit.png | ||
|
|
||
|
|
||
| ********************* | ||
| How to Test LPM modes | ||
| ********************* | ||
| To test LPM modes, one needs to ensure that software and hardware configurations are correct. | ||
| The following sections have details regarding the hardware and software configurations on TI EVMs. | ||
|
|
||
| Hardware modifications | ||
| ====================== | ||
|
|
||
| .. ifconfig:: CONFIG_part_variant in ('J784S4') | ||
|
|
||
| Following board modifications are needed to validate SOC_OFF and IO_ONLY_PLUS_DDR low power modes on the J784S4 EVM. | ||
|
|
||
| - 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. | ||
| - Remove R965, R1167, R1170, and R1169, During DDR RET, RESET must be pulled high. | ||
| - R658 moved to R659 | ||
|
|
||
| .. ifconfig:: CONFIG_part_variant in ('J7200') | ||
|
|
||
| By default, SOC_OFF mode can be validated on J7200 EVM without any hardware changes. | ||
| 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. | ||
|
|
||
| - Remove R74 and place it at R610. This will pull the signal high. | ||
|
|
||
| Software modifications | ||
| ====================== | ||
| TI’s K3 Jacinto family of SoCs have a concept of boardcfg that can be used to configure certain parameters at build time. | ||
| By default, SOC_OFF mode enabled by default in SDK. | ||
| IO_ONLY_PLUS_DDR mode can be enabled by changing boardcfg in u-boot at build time. | ||
|
|
||
| The low power mode is set statically at build time in “lpm_cfg” section of the power management board config. | ||
| In the u-boot source tree the boardcfg is present at: | ||
|
|
||
| .. ifconfig:: CONFIG_part_variant in ('J7200') | ||
|
|
||
| board/ti/j721e/pm-cfg_j7200.yaml | ||
| `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>`_ . | ||
|
|
||
| .. ifconfig:: CONFIG_part_variant in ('J784S4') | ||
|
|
||
| board/ti/j784s4/pm-cfg.yaml | ||
| `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>`_ . | ||
|
|
||
| In above board config file, default lpm_mode is 0x5 (SOC_OFF) and suspend_initiator is 0xA (A72_0 host). | ||
|
|
||
| To set the LPM mode as IO_RET_PLUS_DDR, change lpm_mode to 0x2. | ||
|
|
||
| Sample code is available at | ||
| https://gist.github.com/uditkumarti/fd0dfe8aa3dc094aadafecab67048307 | ||
|
|
||
| The lpm mode value can be picked up from: | ||
| https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html | ||
|
|
||
| Testing | ||
| ======= | ||
| Below section explains, how to test supported LPM modes | ||
|
|
||
| ******* | ||
| SoC off | ||
| ******* | ||
| ------- | ||
|
|
||
| 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. | ||
|
|
||
|
|
@@ -57,10 +146,10 @@ | |
| Press SW15 push button on J784S4 evm. | ||
|
|
||
|
|
||
| ***************** | ||
| I/O only Plus DDR | ||
| ***************** | ||
| IO_ONLY_PLUS_DDR mode | ||
| --------------------- | ||
|
|
||
| Use u-boot build after changing lpm_mode to 0x2, in boardconfig file. | ||
| In I/O only plus DDR, only the I/O pins remain active while the system turns off the rest of SoC. | ||
|
|
||
| #. Low power consumption: IO Only Plus DDR mode can save a significant amount of power, especially in battery-powered | ||
|
|
@@ -143,3 +232,12 @@ | |
| [ 41.416506] PM: suspend exit | ||
| root@<machine>-evm:~# | ||
| root@<machine>-evm:~# | ||
|
|
||
| ***************** | ||
| Known limitations | ||
| ***************** | ||
| 1. Only A core as suspend master supported and tested with Linux. | ||
| 2. The LPM feature is not supported on HS-SE variant J784S4. | ||
| 3. If PCIe is being used, the resume latency increases by 1 sec for every PCIe instance, If EP is not connected. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. EP?.. Is it better to have this as Endpoint, wouldn't it be confusing EP alone ?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. EP is standard term |
||
| 4. Remote core firmwares are getting loaded by Linux on resume. | ||
| 5. MCU domain R5 core, cannot be used in split mode. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This core cannot be used in split mode only to exercise LPM sequence correct ? So, isn't this a known issue rather than limitation.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Its limitation rather than issue |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: Let's use IO_RET everywhere and not IO-RET in this pic.