[PATCH v9 9/9] PCI: dw-rockchip: Add system PM support
Manivannan Sadhasivam
manivannan.sadhasivam at oss.qualcomm.com
Sat Nov 7 08:36:40 PST 2026
On 2026-11-05 14:33 +0100, Sebastian Reichel wrote:
> Add system PM support for Rockchip PCIe Designware Controllers.
>
> I've tested this on the Rockchip RK3576 EVB1, the Radxa ROCK 4D
> and the ArmSom Sige5 boards.
>
> While I haven't experienced any issues, most of my tests have been done
> without any devices attached (i.e. default board without any extras), so
> there _might_ still be some problems. As system suspend does not work at
> all right now, I think it makes sense to get at least the basic
> configurations working as soon as possible as it will allow us to catch
> regressions by enabling system suspend in CI systems like KernelCI.
>
> Co-developed-by: Shawn Lin <shawn.lin at rock-chips.com>
> Signed-off-by: Shawn Lin <shawn.lin at rock-chips.com>
> Signed-off-by: Sebastian Reichel <sebastian.reichel at collabora.com>
> ---
> drivers/pci/controller/dwc/pcie-dw-rockchip.c | 102 ++++++++++++++++++++++++++
> 1 file changed, 102 insertions(+)
>
> diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> index a603475d4450..39faefaf568d 100644
> --- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> +++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> @@ -124,6 +124,7 @@ struct rockchip_pcie {
> struct gpio_desc *rst_gpio;
> struct regulator *vpcie3v3;
> struct irq_domain *irq_domain;
> + u32 intx;
> const struct rockchip_pcie_of_data *data;
> bool supports_clkreq;
> struct delayed_work trace_work;
> @@ -807,6 +808,7 @@ static int rockchip_pcie_configure_rc(struct platform_device *pdev,
>
> pp = &rockchip->pci.pp;
> pp->ops = &rockchip_pcie_host_ops;
> + pp->suspend_poweroff = true;
>
> ret = dw_pcie_host_init(pp);
> if (ret) {
> @@ -1030,6 +1032,100 @@ static int rockchip_pcie_rc_reset_root_port(struct pci_host_bridge *bridge,
> return ret;
> }
>
> +static int rockchip_pcie_suspend(struct device *dev)
> +{
> + struct rockchip_pcie *rockchip = dev_get_drvdata(dev);
> + struct dw_pcie *pci = &rockchip->pci;
> + int ret;
> +
> + if (rockchip->data->mode == DW_PCIE_EP_TYPE)
> + return 0;
> +
> + if (pci->suspended)
> + return 0;
This check looks wrong. 'suspended' flag is only set at the end of
dw_pcie_suspend_noirq() and is used as an indication to glue suspend callbacks
to turn off the resources or not. here is no way this can be set at the start
of tne glue suspend callback.
I'll drop this check while applying.
- Mani
More information about the Linux-rockchip
mailing list