Update and enhance the LPM documentation#751
Conversation
| The AM62L platform supports multiple low power modes that can be selected by modifying the | ||
| TF-A firmware. The mode is controlled by the ``mode`` variable in the :func:`am62l_pwr_domain_suspend` |
There was a problem hiding this comment.
| The AM62L platform supports multiple low power modes that can be selected by modifying the | |
| TF-A firmware. The mode is controlled by the ``mode`` variable in the :func:`am62l_pwr_domain_suspend` | |
| The AM62L platform supports multiple low power modes. The TF-A firmware sets the | |
| active mode through the ``mode`` variable in the :func:`am62l_pwr_domain_suspend` | |
| function. The following table lists all available modes: |
Active voice
| full cold boot is required on wakeup. | ||
|
|
||
| - **Suspend to RAM**: The system suspends with DDR RAM context retained. State is | ||
| restored on resume without a full cold boot, resulting in significantly lower wakeup |
There was a problem hiding this comment.
| restored on resume without a full cold boot, resulting in significantly lower wakeup | |
| restored on resume without a full hardware restart, resulting in significantly lower wakeup |
| | Without the disabling USB as a wakeup source, the system will not resume cleanly and result in a usb driver crash on resume, | ||
| while using the [deep] path. | ||
| | For the [s2idle] path, the system will not enter RTC Only + DDR mode if USB0 or USB1 is enabled as a wakeup source, and enter | ||
| Deepsleep mode instead. | ||
|
|
| +==============+===========================+==============================================+ | ||
| | 0 | DeepSleep | Default mode. Low latency, higher power | | ||
| +--------------+---------------------------+----------------------------------------------+ | ||
| | 6 | RTC Only + DDR | Lowest power with DDR retention | |
| +--------------+---------------------------+----------------------------------------------+ | ||
| | 6 | RTC Only + DDR | Lowest power with DDR retention | | ||
| +--------------+---------------------------+----------------------------------------------+ | ||
| | 8 | DSS DeepSleep | DeepSleep with Display Subsystem powered | |
|
|
||
| | **Suspend to RAM Mode** | ||
| | - RTC Only Plus DDR | ||
| | - Deep Sleep |
There was a problem hiding this comment.
Can you add DSS + DeepSleep also
| { | ||
| uint32_t core, proc_id; | ||
| - uint32_t mode = 0; | ||
| + uint32_t mode = 6; |
There was a problem hiding this comment.
Are you sure that this modification is sufficient to hardcode mode value to 6?
For my understanding, we assign mode = am62l_lpm_state but this instruction is executed only for S2idle, right?
There was a problem hiding this comment.
Yes, the mode = am62l_lpm_state is only executed for the s2idle path. For the deep, we only need to make the above change
Reword the documentation to be generic for changing the selected low power mode in ATF. Add information about the new low power mode DSS plus Deepsleep and how it can be selected. Signed-off-by: Scaria Kochidanadu <s-kochidanadu@ti.com>
Add the documentation for using s2idle method for selecting and entering Low power modes. Enhancing the documentation by distinguishing between the power-off and suspend-to-ram LPMs available. Signed-off-by: Scaria Kochidanadu <s-kochidanadu@ti.com>
| - **Power Off**: The system enters a complete poweroff state. DDR context is lost and a | ||
| full hardware restart is required on wakeup. |
There was a problem hiding this comment.
This sort of makes it sound like the user will have to do a full hardware restart upon wakeup. Maybe reword to be something along the lines of "DDR context is lost and upon wakeup, the system executes a full hardware restart"
| full hardware restart is required on wakeup. | ||
|
|
||
| - **Suspend to RAM**: The system suspends with DDR RAM context retained. State is | ||
| restored on resume without a full hardware restart, resulting in significantly lower wakeup |
There was a problem hiding this comment.
IMO leave out "without a full hardware restart"
| Selecting the Suspend to RAM Entry Mechanism | ||
| ============================================ | ||
|
|
||
| When entering Suspend to RAM via ``echo mem > /sys/power/state``, the kernel selects the |
There was a problem hiding this comment.
| When entering Suspend to RAM via ``echo mem > /sys/power/state``, the kernel selects the | |
| When entering suspend to RAM via ``echo mem > /sys/power/state``, the kernel selects the |
| When entering Suspend to RAM via ``echo mem > /sys/power/state``, the kernel selects the | ||
| low power mode to enter based on the value of ``/sys/power/mem_sleep``: | ||
|
|
||
| - ``deep`` — uses the System Suspend path, and is the default mode. |
There was a problem hiding this comment.
| - ``deep`` — uses the System Suspend path, and is the default mode. | |
| - ``deep`` — uses the system suspend path; selected by default. |
| - ``deep`` — uses the System Suspend path, and is the default mode. | ||
| Always enters the hardcoded mode selected in the firmware during build time, | ||
| which is **DeepSleep** mode by default. | ||
| - ``s2idle`` — uses the Suspend-to-Idle path via PSCI, which allows the platform firmware(TF-A) to select the deepest available mode. |
There was a problem hiding this comment.
| - ``s2idle`` — uses the Suspend-to-Idle path via PSCI, which allows the platform firmware(TF-A) to select the deepest available mode. | |
| - ``s2idle`` — uses the Suspend-to-Idle path via PSCI, which allows the platform firmware (TF-A) to select the deepest available mode. |
|
|
||
| .. note:: | ||
|
|
||
| Without the disabling USB as a wakeup source, the system will not resume cleanly and result in a usb driver crash on resume, |
There was a problem hiding this comment.
| Without the disabling USB as a wakeup source, the system will not resume cleanly and result in a usb driver crash on resume, | |
| Without the disabling USB as a wakeup source, upon resume the USB driver will crash and the system will not resume |
| For the [s2idle] path, the system will not enter RTC + I/O + DDR mode if USB0 or USB1 is enabled as a wakeup source, and enter | ||
| Deepsleep mode instead. |
There was a problem hiding this comment.
| For the [s2idle] path, the system will not enter RTC + I/O + DDR mode if USB0 or USB1 is enabled as a wakeup source, and enter | |
| Deepsleep mode instead. | |
| For the [s2idle] path, if USB0 or USB1 is enabled as a wakeup source the system will enter DeepSleep instead of RTC + I/O + DDR. |
| DeepSleep is the default mode entered using the [deep] path in `/sys/power/mem_sleep`. | ||
|
|
||
| | To enter DeepSleep mode using the [s2idle] path, set the cpu latency constraint between that of DeepSleep(350ms) and RTC + I/O + DDR(900ms) mode. | ||
| | Use the following command to set the constraint to 500ms, which will allow the system to enter DeepSleep mode. |
There was a problem hiding this comment.
Add a sentence that says to refer to the standby documentation on how setting the constraint works to choose modes.
| re-build the ARM Trusted Firmware and then re-package it in the :file:`tispl.bin` file to ensure | ||
| the changes take effect. To learn more about TF-A and how to rebuild it, see :ref:`foundational-components-atf`. | ||
| For rebuilding U-Boot and generating the new :file:`tispl.bin` follow :ref:`Build-U-Boot-label`. | ||
| The AM62L platform supports multiple low power modes. The TF-A firmware sets the |
There was a problem hiding this comment.
Replace TF-A acronym then you can use it later in the docs
| The AM62L platform supports multiple low power modes. The TF-A firmware sets the | |
| The AM62L platform supports multiple low power modes. ARM Trusted Firmware (TF-A) sets the |
| +--------------+---------------------------+----------------------------------------------+ | ||
|
|
||
| To change the low power mode, modify the ``mode`` value in the TF-A source code as shown below. | ||
| After making the changes, re-build the ARM Trusted Firmware and then re-package it in the |
There was a problem hiding this comment.
| After making the changes, re-build the ARM Trusted Firmware and then re-package it in the | |
| After making the changes, re-build TF-A and then re-package it in the |
Commit 1 adds the new Low power mode in the workaround page
Commit 2 is adding documentation for s2idle method and also enhacing the current LPM docs