Skip to content

Conversation

@DhruvaG2000
Copy link
Collaborator

Document all about s2idle and PSCI and how the whole stack helps us in selecting between low power modes on the TI AM62L

@DhruvaG2000 DhruvaG2000 changed the title feat(linux): Add s2idle docs [WIP][DNM] Add s2idle docs Dec 8, 2025
@github-actions
Copy link

github-actions bot commented Dec 8, 2025

New warnings found with rstcheck:

source/linux/Foundational_Components/Power_Management/pm_psci_s2idle.rst:25: (ERROR/3) Unexpected indentation.

* **System State:** (Optional) Power Down or Retention
4. **PSCI Enforcement:** The PSCI implementation verifies that all other cores in the requested node are indeed idle. If they are not, the request is denied (to prevent race conditions).

*************************************
Copy link
Member

Choose a reason for hiding this comment

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

The section identifier line should be of equal length to the section name.

Suspend-to-Idle (s2idle), also known as "freeze," is a generic, pure software, light-weight variant of system suspend.
In this state, the Linux kernel freezes user space tasks, suspends devices, and then puts all CPUs into their deepest available idle state.

**********************
Copy link
Member

Choose a reason for hiding this comment

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

The section identifier line should be of equal length to the section name.


**************************
OS Initiated (OSI) Mode
**************************
Copy link
Member

Choose a reason for hiding this comment

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

The section identifier line should be of equal length to the section name.

Document all about s2idle and PSCI and how the whole stack
helps us in selecting between low power modes on the TI AM62L

Signed-off-by: Dhruva Gole <d-gole@ti.com>
@DhruvaG2000
Copy link
Collaborator Author

@cshilwant , and rest I'll mark the PR ready for review once it has undergone LPM team internal review. Till then requesting you to hold off reviews.
This is going to be a major documentation update for AM62L PM story hence might take some time to get reviews and complete.

Thanks!

S2Idle vs Deep Sleep (mem)
**********************************

On ARM64 platforms, both ``s2idle`` and ``deep`` states can achieve similar power savings (e.g., suspending to RAM / DDR Self-Refresh).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
On ARM64 platforms, both ``s2idle`` and ``deep`` states can achieve similar power savings (e.g., suspending to RAM / DDR Self-Refresh).
On ARM64 platforms, ``deep`` states (suspend-to-RAM) and ``idle`` states can achieve similar power savings.

The eg here could be confusing since it is at the end of the sentence so it is not clear that you're referring to the deep states. Either it could be removed or the suggestion could be implemented.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ack, willfix

On ARM64 platforms, both ``s2idle`` and ``deep`` states can achieve similar power savings (e.g., suspending to RAM / DDR Self-Refresh).
The primary differences lie in the software execution flow, specifically how CPUs are managed and which PSCI APIs are invoked.

.. list-table:: S2Idle vs Deep Sleep (ARM64)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it necessary to specify ARM64 platforms since you already specified ARM64 previously and this page will (presumably) only be used in ARM64 platforms?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ack, willfix

- **Offlined**: Non-boot CPUs are hot-unplugged (removed) from the system via ``CPU_OFF``.

* - **Entry Path**
- **cpuidle**: Uses the standard CPU idle framework and governance. It runtime suspends each driver to make sure it's idle.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- **cpuidle**: Uses the standard CPU idle framework and governance. It runtime suspends each driver to make sure it's idle.
- **cpuidle**: Uses the standard CPU idle framework and governance. Each driver is put into an idle state by runtime suspend.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ack, willfix

Comment on lines +34 to +35
- **Kept Online**: Non-boot CPUs are put into a deep idle state but remain logically online.
- **Offlined**: Non-boot CPUs are hot-unplugged (removed) from the system via ``CPU_OFF``.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- **Kept Online**: Non-boot CPUs are put into a deep idle state but remain logically online.
- **Offlined**: Non-boot CPUs are hot-unplugged (removed) from the system via ``CPU_OFF``.
- **Online**: Non-boot CPUs are put into a deep idle state but remain logically online.
- **Offline**: Non-boot CPUs are hot-unplugged (removed) from the system via ``CPU_OFF``.

Changing it to be this way looks nicer and its easier to compare the differences imo. The explanations are good and get across the differences so the headings can become simpler


* - **Entry Path**
- **cpuidle**: Uses the standard CPU idle framework and governance. It runtime suspends each driver to make sure it's idle.
- **suspend_ops**: Uses platform-specific suspend operations like each driver's suspend ops. No governor involvement.
Copy link
Contributor

Choose a reason for hiding this comment

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

No governor involvement. kind of makes it sound like there is a governor but it is not being used.

**********************

The Power State Coordination Interface (PSCI) is an ARM-defined standard that acts as the fundamental
enabler for s2idle on ARM platforms. PSCI defines a standardized firmware interface that allows the
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we denote ARM64 platforms earlier in the doc, could this confuse readers to think that this only applies to ARM platforms but not ARM64 platforms?

In this state, the Linux kernel freezes user space tasks, suspends devices, and then puts all CPUs into their deepest available idle state.

**********************************
S2Idle vs Deep Sleep (mem)
Copy link
Contributor

Choose a reason for hiding this comment

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

Wondering if this whole section should be moved to be the last / one of the last sections? I think explaining PSCI would be good to do before going into comparisons on how it operates differently than Deep Sleep

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ack

5. Thaw tasks

The `cpuidle` driver calls the PSCI `CPU_SUSPEND` API to transition the CPU (and potentially
higher-level topology nodes like clusters) into a low-power state. The effectiveness of s2idle
Copy link
Contributor

Choose a reason for hiding this comment

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

Assume the reader doesn't know what the topology nodes / clusters are. This should either be explained or the information in the parenthesis should be removed.

2. Suspend devices
|
v
3. cpuidle driver -----------> CPU_SUSPEND (SMC/HVC)
Copy link
Contributor

Choose a reason for hiding this comment

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

What is SMC/HVC?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok will add explanation for secure monitor call.

Comment on lines +83 to +84
| Enter low-power
| hardware state
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| Enter low-power
| hardware state
| CPU enters low-power
| hardware state

Only suggesting this because I think the cpuidle to PSCI firmware can be a little confusing.

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.

8 participants