fix(pm_psci_s2idle): Update and enhance s2idle docs#750
Conversation
| }; | ||
| }; | ||
|
|
||
| **Why Domain Grouping is Needed:** |
There was a problem hiding this comment.
The points were not very accurate. Explained the power-domain component here and how its used in a different section below
| their deepest idle state? | ||
| 2. **Which idle state can be entered?** — Of the states available for this domain, | ||
| which is the deepest one whose total latency (entry + exit) fits within the | ||
| current QoS constraint? |
There was a problem hiding this comment.
can we add some note about wakeup source also?
There was a problem hiding this comment.
Yes, I'll add a note on how enabling/disabling wakeup sources can affect the selection
| ``WKUP_PD`` is a sibling of ``MAIN_PD`` (not a child), ``MAIN_PD`` can still | ||
| enter DeepSleep. This is why the RTC+DDR section in :ref:`lpm_modes` requires | ||
| disabling USB wakeup sources — DeepSleep works regardless, but RTC+DDR requires | ||
| ``WKUP_PD`` to be idle too. |
There was a problem hiding this comment.
Something for no console suspend
There was a problem hiding this comment.
Where should we keep the warning regarding the no_console_suspend parameter. Should we only keep it here or mention in the main LPM page as well
There was a problem hiding this comment.
i think here is good enough as it is totally linked to mode selection
StaticRocket
left a comment
There was a problem hiding this comment.
There are other places where active voice should be used
| * **CLUSTER_PD** (Cluster Power Domain): Cluster-level power domain that groups multiple CPUs | ||
|
|
||
| These power domains inform CPUIdle about which non-critical domains can be disabled when all cores within them are idle. | ||
| These power domains tell CPUIdle which non-critical domains to disable when all cores within them are idle. |
There was a problem hiding this comment.
| These power domains tell CPUIdle which non-critical domains to disable when all cores within them are idle. | |
| These power domains tell CPUIdle what non-critical domains to disable when all cores within them are idle. |
|
|
||
|
|
||
| The idle state associated with each domain is the state that domain enters when all | ||
| of its children are powered off. This determines the deepest low power mode the |
There was a problem hiding this comment.
| of its children are powered off. This determines the deepest low power mode the | |
| of its children are off. This determines the deepest low power mode the |
| This mapping is what the kernel uses at runtime to determine whether a power domain | ||
| can be powered off. If any device assigned to a domain is still active, that domain |
There was a problem hiding this comment.
| This mapping is what the kernel uses at runtime to determine whether a power domain | |
| can be powered off. If any device assigned to a domain is still active, that domain | |
| This mapping lets the kernel determine at runtime when to turn off a power domain. | |
| If any device assigned to a domain is still active, that domain |
| ====================== | ||
| The Linux kernel's PM QoS (Quality of Service) framework allows drivers and applications to | ||
| specify maximum acceptable wakeup latency. These constraints directly influence what idle | ||
| state are elligible for entry during s2idle. |
| Here's how it would look like: (The testqos.c program is shown further below, which helps set the | ||
| `/dev/cpu_wakeup_latency` QoS constraint.) | ||
| When a wakeup source is enabled/disabled, and also depending on the wakeup source being in-band/out-of-band, | ||
| the genpd framework may choose to power off or keep on the the associated devices. |
There was a problem hiding this comment.
good update, can you add the exact behavior of genpd for these two cases (maybe add in 2 points) so that our documentation is complete on its own
| 500 ms constraint, so DeepSleep is the deepest permitted state. | ||
|
|
||
| **Example: Deep Sleep Mode Selection:** | ||
| **Example 2: Active USB blocks RTC+DDR but DeepSleep still possible** |
There was a problem hiding this comment.
For new changes, keep RTC + I/O + DDR (old ones are already taken care by kendall in her PR)
|
|
||
| .. warning:: | ||
|
|
||
| When disabling **serial UART** as a wakeup source, do not disable ``console_suspend`` in the kernel command line. |
There was a problem hiding this comment.
Add small line saying that MAIN UART has out of band wakeup.
kwillis01
left a comment
There was a problem hiding this comment.
I really like the changes to the content, I think it will make it easier for users to read and implement in their system.
One big thing to note is I think we should go step by step in explaining how to set the CPU wakeup latency constraints. We should first explain what they are, the program needed to set them, and then how it is used.
|
|
||
| On TI K3 platforms with OSI mode enabled, s2idle can dynamically enter deep power states | ||
| (standby, Deep Sleep, RTC+DDR) that power down the MAIN domain. This creates a hybrid scenario: | ||
| (standby, Deep Sleep, RTC+I/O+DDR) that power down the MAIN domain. This creates a hybrid scenario: |
There was a problem hiding this comment.
| (standby, Deep Sleep, RTC+I/O+DDR) that power down the MAIN domain. This creates a hybrid scenario: | |
| (standby, DeepSleep, RTC + I/O + DDR) that power down the MAIN domain. This creates a hybrid scenario: |
| ├──> Timers | ||
| ├──> SDHCI controllers | ||
| └──> USB controllers | ||
| SOC_PD [idle: RTC+I/O+DDR] |
There was a problem hiding this comment.
| SOC_PD [idle: RTC+I/O+DDR] | |
| SOC_PD [idle: RTC + I/O + DDR] |
| 4. The deepest eligible state is selected | ||
|
|
||
| * **cpu_sleep_1 (PowerDown)**: CPU is powered down with context loss | ||
| Writing a latency value (in microseconds) to ``/dev/cpu_wakeup_latency`` does the following: |
There was a problem hiding this comment.
I think instead of diving right into writing to /dev/cpu_wakeup_latency, instead this part should start by explaining that to create a global CPU wakeup latency constraint the device file of /dev/cpu_wakeup_latency needs to be held open for the constraint to be “active”. Then show the example program of how to do that (test_qos.c). Then after those are explained, show and explain the example of using test_qos.c to determine the low power mode.
| * Min residency: 500ms | ||
| * Use case: Short to moderate idle periods with faster resume requirements | ||
| The value ``0x7a120`` (500,000 μs = 500ms) allows all CPU-level idle states. At the system domain | ||
| level, Deep Sleep (350ms total: 250ms entry + 100ms exit) is allowed while RTC+I/O+DDR (900ms total: |
There was a problem hiding this comment.
| level, Deep Sleep (350ms total: 250ms entry + 100ms exit) is allowed while RTC+I/O+DDR (900ms total: | |
| level, DeepSleep (350ms total: 250ms entry + 100ms exit) is allowed while RTC + I/O + DDR (900ms total: |
| * Exit latency: 600ms | ||
| * Min residency: 1000ms | ||
| * Use case: Long idle periods requiring maximum power savings | ||
| The Device Tree defines multiple idle states at each level of the hierarchy, each with different |
There was a problem hiding this comment.
| The Device Tree defines multiple idle states at each level of the hierarchy, each with different | |
| The device tree defines multiple idle states at each level of the hierarchy, each with different |
| Examples | ||
| ======== | ||
|
|
||
| **Example 1: Latency constraint forces Deep Sleep instead of RTC+I/O+DDR** |
There was a problem hiding this comment.
| **Example 1: Latency constraint forces Deep Sleep instead of RTC+I/O+DDR** | |
| **Example 1: Latency constraint forces Deep Sleep instead of RTC + I/O + DDR** |
| during long idle periods. | ||
| Result: System enters DeepSleep | ||
|
|
||
| Even though RTC+I/O+DDR offers lower power, its 900 ms total latency exceeds the |
There was a problem hiding this comment.
| Even though RTC+I/O+DDR offers lower power, its 900 ms total latency exceeds the | |
| Even though RTC + I/O + DDR offers lower power, its 900 ms total latency exceeds the |
| 500 ms constraint, so DeepSleep is the deepest permitted state. | ||
|
|
||
| **Example: Deep Sleep Mode Selection:** | ||
| **Example 2: Active USB blocks RTC+I/O+DDR but DeepSleep still possible** |
There was a problem hiding this comment.
| **Example 2: Active USB blocks RTC+I/O+DDR but DeepSleep still possible** | |
| **Example 2: Active USB blocks RTC + I/O + DDR but DeepSleep still possible** |
| └─> main_sleep_deep (DeepSleep): SELECTED | ||
|
|
||
| SOC_PD: WKUP_PD cannot power off (USB0 active) | ||
| └─> main_sleep_rtcddr (RTC+I/O+DDR): REJECTED |
There was a problem hiding this comment.
| └─> main_sleep_rtcddr (RTC+I/O+DDR): REJECTED | |
| └─> main_sleep_rtcddr (RTC + I/O + DDR): REJECTED |
|
|
||
| The active USB device only blocks ``SOC_PD`` from powering off. Since | ||
| ``WKUP_PD`` is a sibling of ``MAIN_PD`` (not a child), ``MAIN_PD`` can still | ||
| enter DeepSleep. This is why the RTC+I/O+DDR section in :ref:`lpm_modes` requires |
There was a problem hiding this comment.
| enter DeepSleep. This is why the RTC+I/O+DDR section in :ref:`lpm_modes` requires | |
| enter DeepSleep. This is why the RTC + I/O + DDR section in :ref:`lpm_modes` requires |
Update the s2idle docs with the correct AM62L power domain hierarchy and idle states derived from the latest release. Rewrite the mode selection logic by including the components involved and how they are used. Signed-off-by: Scaria Kochidanadu <s-kochidanadu@ti.com>
Update the s2idle docs with the correct AM62L power domain hierarchy and idle states derived from the latest release.
Rewrite the mode selection explanation for clarity.