PCI: qcom: Add D3cold support
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected] change-id 20251229-d3cold-bf99921960bbVersions newest first
- v5 Latest5 patches 18 repliesApplied
- v45 patches 0 repliesSuperseded
- v35 patches 6 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 5 patches | 16 replies | Superseded | |
| v1 | 3 patches | 13 replies | Superseded |
Changes in v5 from the cover letter
- Add additional checks for legacy, integrated endpoints also as pointed
by sashiko.
- for older platforms we need to read LTSSM state from ELBI regitsers, updated the code to read elbi regitser by sashiko.
- Couple of nits by sashiko.
- Link to v4: https://lore.kernel.org/r/[email protected]
Patches in v5 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | PCI: host-common: Add helper to determine host bridge D3cold eligibilitydrivers/ drivers/ | +73 | 3 replies | |
| 2/5 | PCI: qcom: Add .get_ltssm() helperdrivers/ | +31 | 0 replies | |
| 3/5 | PCI: qcom: Power down PHY via PARF_PHY_CTRL before disabling rails/clocksdrivers/ | +35 | 0 replies | |
| 4/5 | PCI: dwc: Use common D3cold eligibility helper in suspend pathdrivers/ drivers/ | +8 | 3 replies | |
| 5/5 | PCI: qcom: Add D3cold supportdrivers/ | +95 | 5 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.
Cover letter [PATCH v5 0/5] PCI: qcom: Add D3cold support
This series adds support for putting Qualcomm PCIe host bridges into D3cold when downstream conditions allow it, and introduces a small common helper to determine D3cold eligibility based on endpoint state.
On Qualcomm platforms, PCIe host controllers are currently kept powered even when there are no active endpoints (i.e. all endpoints are already in PCI_D3hot). This prevents the SoC from entering deeper low‑power states such as CXPC.
While PCIe D3cold support exists in the PCI core, host controller drivers lack a common mechanism to determine whether it is safe to power off the host bridge without breaking active devices or wakeup functionality. As a result, controllers either avoid entering D3cold or depend on rough, driver‑specific workarounds.
This series addresses that gap.
1. Introduces pci_host_common_can_enter_d3cold(), a helper that determines whether a host bridge may enter D3cold based on downstream PCIe endpoint state. The helper permits D3cold only when all *active* endpoints are already in PCI_D3hot, and any wakeup‑enabled endpoint supports PME from D3cold.
2. Updates the Designware PCIe host driver to use this helper in the suspend_noirq() path, replacing the existing heuristic that blocked D3cold whenever L1 ASPM was enabled.
3. Enables D3cold support for Qualcomm PCIe controllers by wiring them into the DesignWare common suspend/resume flow and explicitly powering down controller resources when all endpoints are in D3hot.
The immediate outcome of this series is that Qualcomm PCIe host bridges can enter D3cold when all endpoints are in D3hot.
This is a necessary but not sufficient step toward unblocking CXPC. With this series applied, CXPC can be achieved on systems with no attached NVMe devices. Support for NVMe‑attached systems requires additional changes in NVMe driver, which are being worked on separately.
Tested on:
- Qualcomm Lemans EVK, Monaco & sc7280 platforms.
Validation steps:
- Boot without NVMe attach:
* PCIe host enters D3cold during suspend
* SoC is able to reach CXPC provided other drivers also remove their votes as part of suspend.
---
Changes in v5:
- Add additional checks for legacy, integrated endpoints also as pointed
by sashiko.
- for older platforms we need to read LTSSM state from ELBI regitsers, updated the code to read elbi regitser by sashiko.
- Couple of nits by sashiko.
- Link to v4: https://lore.kernel.org/r/[email protected]
Changes in v4:
- Added new argument to the API to know if there is any device with
wakeup enabled and pme can be generated in D3cold. we need this info
to decide to turn off power to device or not.
- Couple of nits in commit text (Mani).
- Link to v3: https://lore.kernel.org/r/[email protected]
Changes in v3:
- Changed the function name from pci_host_common_can_enter_d3cold() to pci_host_common_d3cold_possible() (Mani).
- Couple of nits for commit text, newlines etc(Mani).
- Removed -ETIMEDOUT check and added -ENODEV & -EIO(Mani).
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- Updated the cover letter (Bjorn Andersson)
- Add get_ltssm helper function to read LTSSM state from parf.
- Allow D3cold if there is no driver enabled for a endpoint.
- Added a seperate patch to make phy down in deinit part to avoid power leakage.
- Revert icc bw voting if resume fails(Bjorn Andersson).
- Link to v1: https://lore.kernel.org/r/[email protected]
To: Will Deacon <[email protected]>
To: Lorenzo Pieralisi <[email protected]>
To: Krzysztof Wilczyński <[email protected]>
To: Manivannan Sadhasivam <[email protected]>
To: Rob Herring <[email protected]>
To: Bjorn Helgaas <[email protected]>
To: Jingoo Han <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
Krishna Chaitanya Chundru (5):
PCI: host-common: Add helper to determine host bridge D3cold eligibility
PCI: qcom: Add .get_ltssm() helper
PCI: qcom: Power down PHY via PARF_PHY_CTRL before disabling rails/clocks
PCI: dwc: Use common D3cold eligibility helper in suspend path
PCI: qcom: Add D3cold support
drivers/pci/controller/dwc/pcie-designware-host.c | 15 +- drivers/pci/controller/dwc/pcie-designware.h | 1 + drivers/pci/controller/dwc/pcie-qcom.c | 224 ++++++++++++++++------ drivers/pci/controller/pci-host-common.c | 71 +++++++ drivers/pci/controller/pci-host-common.h | 2 + 5 files changed, 242 insertions(+), 71 deletions(-)
---
base-commit: 3b3bea6d4b9c162f9e555905d96b8c1da67ecd5b
change-id: 20251229-d3cold-bf99921960bb
Best regards,
Signature · 1 line
Krishna Chaitanya Chundru <[email protected]>