Re: [PATCH] clk: qcom: gcc-eliza: Use retention for PCIe power domains

From: Manivannan Sadhasivam

Date: Tue Oct 27 2026 - 23:29:51 EST


On Tue, Oct 20, 2026 at 03:41:54PM +0300, Abel Vesa wrote:
> On 26-10-14 14:09:04, Loic Poulain wrote:
> > On Wed, Oct 14, 2026 at 1:59 PM Abel Vesa <abel.vesa@xxxxxxxxxxxxxxxx> wrote:
> > >
> > > On 26-10-12 14:58:43, Jagadeesh Kona wrote:
> > > >
> > > >
> > > > On 10/12/2026 1:29 AM, Abel Vesa wrote:
> > > > > When resuming from system suspend on Eliza CQS EVK, gcc_pcie_0_gdsc
> > > > > gets stuck off when powering back on, preventing the system from resuming.
> > > > >
> > > > > Use retention for all four PCIe GDSCs, as on SM8550, to preserve their
> > > > > state across suspend and allow the system to resume.
> > > > >
> > > > > Fixes: 3d356ab4a1ec ("clk: qcom: Add support for Global clock controller on Eliza")
> > > > > Assisted-by: LLM
> > > > > Signed-off-by: Abel Vesa <abel.vesa@xxxxxxxxxxxxxxxx>
> > > > > ---
> > > > > drivers/clk/qcom/gcc-eliza.c | 8 ++++----
> > > > > 1 file changed, 4 insertions(+), 4 deletions(-)
> > > > >
> > > >
> > > >
> > > > Hi Abel,
> > > >
> > > > Using PWRSTS_RET_ON keeps the GDSC forever ON after first enable and the GDSC never
> > > > collapses.
> > > >
> > > > For similar issue on Lemans (pcie_0_gdsc gets stuck off when powering back on), picking
> > > > the below changes from PCIE side helped to power ON the GDSC properly without any issue.
> > > >
> > > > https://lore.kernel.org/all/20260728-hotplug_pci-v1-1-d1f38cfb9122@xxxxxxxxxxxxxxxx/
> > > > https://lore.kernel.org/all/20260729071514.859778-1-manivannan.sadhasivam@xxxxxxxxxxxxxxxx/
> > > >
> > > > Can you please try if above changes are helping on Eliza also?
> > >
> > > Thanks for the hint. Mani's patch (v2) is already upstream, so just enabling
> > > CONFIG_HOTPLUG_PCI_PCIE did the trick.
> > >
> > > Suspend/resume works fine now on Eliza, so this patch can be ignored then.
> >
> > So should the retention configuration above be conditional on
> > CONFIG_HOTPLUG_PCI_PCIE, or should we simply depend on
> > CONFIG_HOTPLUG_PCI_PCIE?
>
> None. I think QCOM_PCIE should select it.

Nope. It should be selected by defconfig [1].

Just to clarify on how the hotplug support is fixing this issue. Once we enable
the hotplug driver, the Root Port will be allowed to enter D3Hot during suspend,
which is a pre-requisite for powering off the PCIe devices and the controller.
So once all the conditions are satisfied, the controller and devices will be
powered off. So even if the PCIe GDSC gets powered off at the end of suspend, it
won't affect PCIe devices as they already lost their power. So we don't need
GDSC retention.

But that being said, if any of the PCIe devices support wakeup like WOL from
D3Hot, then we do not power off the controller and devices. In that case, GDSC
retention would be required to keep the controller/device state intact. You can
reproduce this issue by enabling wakeup for the PCIe device from sysfs and
attempt suspend.

So to cleanly fix this issue, we need the PCIe controller driver to signal
retention state to the GDSC driver or the GDSC driver has to figure this on its
own and configure retention accordingly.

- Mani

[1] https://lore.kernel.org/all/20260728-hotplug_pci-v1-1-d1f38cfb9122@xxxxxxxxxxxxxxxx/

--
மணிவண்ணன் சதாசிவம்