Skip to content

fix(pm_psci_s2idle): Update and enhance s2idle docs#750

Open
ti-scaria wants to merge 1 commit into
TexasInstruments:masterfrom
ti-scaria:s2idle_update
Open

fix(pm_psci_s2idle): Update and enhance s2idle docs#750
ti-scaria wants to merge 1 commit into
TexasInstruments:masterfrom
ti-scaria:s2idle_update

Conversation

@ti-scaria

Copy link
Copy Markdown
Contributor

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.

};
};

**Why Domain Grouping is Needed:**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this removed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add some note about wakeup source also?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something for no console suspend

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think here is good enough as it is totally linked to mode selection

@StaticRocket StaticRocket left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Comment on lines +422 to +423
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: eligible

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.

@akashdeep-ti akashdeep-ti Jul 21, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add small line saying that MAIN UART has out of band wakeup.

@kwillis01 kwillis01 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(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]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
└─> 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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>
@github-actions
github-actions Bot requested review from r-vignesh and vishalmti July 22, 2026 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants