Re: [PATCH] PCI: qcom: avoid duplicate PERST# GPIO acquisition in legacy path
From: Manivannan Sadhasivam
Date: Tue May 26 2026 - 10:47:07 EST
On Tue, May 26, 2026 at 05:02:30PM +0530, Kathiravan Thirumoorthy wrote:
> Commit deed8aec62dc ("PCI: qcom: Handle mixed PERST#/PHY DT
> configuration") handles the case where the PHY is moved to the Root
> Port node while PERST# remains in the RC node by acquiring the PERST#
> GPIO during Root Port parsing.
>
> However, on platforms such as IPQ5424, both PERST# and PHY are
> described under the RC node and are intended to be handled via the
> legacy binding path. Since PERST# is already acquired during Root Port
> parsing, attempting to acquire it again in the legacy path fails,
> resulting in probe failures as shown below:
>
> [ 1.571859] qcom-pcie 18000000.pcie: probe with driver qcom-pcie failed with error -16
> [ 1.571909] qcom-pcie 10000000.pcie: probe with driver qcom-pcie failed with error -16
> [ 1.571973] qcom-pcie 20000000.pcie: probe with driver qcom-pcie failed with error -16
>
> Fix this by removing the redundant GPIO acquisition from
> qcom_pcie_parse_legacy_binding() and reusing the PERST# descriptor
> obtained in qcom_pcie_parse_ports().
>
> While at it, move the warning message to qcom_pcie_parse_perst() to
> avoid polluting dmesg when the legacy binding is used.
>
> Fixes: deed8aec62dc ("PCI: qcom: Handle mixed PERST#/PHY DT configuration")
> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@xxxxxxxxxxxxxxxx>
> ---
> drivers/pci/controller/dwc/pcie-qcom.c | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
> index 11fc60489892..77cbd204ac5c 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom.c
> @@ -1824,6 +1824,7 @@ static int qcom_pcie_parse_perst(struct qcom_pcie *pcie,
> int ret;
>
> if (pcie->reset) {
> + dev_warn(dev, "Reusing PERST# from Root Complex node. DT needs to be fixed!\n");
This will cause spat for each child node. So switched to dev_warn_once() and
squashed this fix to the offending commit, thanks!
- Mani
--
மணிவண்ணன் சதாசிவம்