Re: [PATCH v2 2/5] phy: qcom: qmp-pcie: Add multiple power-domains support

From: Dmitry Baryshkov

Date: Tue Mar 24 2026 - 17:20:55 EST


On Mon, Mar 23, 2026 at 12:15:29AM -0700, Qiang Yu wrote:
> The Glymur SoC's 3rd PCIe instance supports 8-lane mode using two PHYs in
> a bifurcated configuration. Each PHY has its own power domain (phy_gdsc)
> that must be powered on before initialization per hardware requirements.
>
> Current PHY power management assumes a single power domain per PHY,
> preventing proper setup for this dual-PHY scenario. Add support for
> multiple power domains by using devm_pm_domain_attach_list() to attach
> power domains manually, while maintaining compatibility with single
> power domain PHYs.
>
> Enable runtime PM to allow power domain control when the PCIe driver
> calls phy_power_on/phy_power_off:
>
> - Single power domain: QMP PHY platform device directly attaches to
> power domain and controls it during runtime resume/suspend
> - Multiple power domains: devm_pm_domain_attach_list() creates virtual
> devices as power domain suppliers, linked to the QMP PHY platform
> device as consumer
>
> This ensures power domains are properly attached and turned on/off
> for both single and multiple power domain configurations.
>
> Signed-off-by: Qiang Yu <qiang.yu@xxxxxxxxxxxxxxxx>
> ---
> drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>


--
With best wishes
Dmitry