[PATCH V4 00/11] pci-imx6: Add support for parsing the reset property in new Root Port binding
From: Sherry Sun <hidden>
Date: 2026-02-09 08:23:44
Also in:
imx, linux-devicetree, linux-pci, lkml
This patch set adds support for parsing the reset property in new Root Port binding in pci-imx6 driver, similar to the implementation in the qcom pcie driver[1]. Also introduce generic helper functions to parse Root Port device tree nodes and extract common properties like reset GPIOs. This allows multiple PCI host controller drivers to share the same parsing logic. Define struct pci_host_port to hold common Root Port properties and add pci_host_common_parse_ports() to parse Root Port nodes from device tree, pci_host_common_delete_ports() to cleanup the port lists. The plan is to add the wake-gpio property to the root port in subsequent patches. Also, the vpcie-supply property will be moved to the root port node later based on the refactoring patch set for the PCI pwrctrl framework[2]. The initial idea is to adopt the Manivannan’s recent PCIe M.2 KeyE connector support patch set[3] and PCI power control framework patches[2], and extend them to the pcie-imx6 driver. Since the new M.2/pwrctrl model is implemented based on Root Ports and requires the pwrctrl driver to bind to a Root Port device, we need to introduce a Root Port child node on i.MX boards that provide an M.2 connector. To follow a more standardized DT structure, it also makes sense to move the reset-gpios and wake-gpios properties into the Root Port node. These signals logically belong to the Root Port rather than the host bridge, and placing them there aligns with the new M.2/pwrctrl model. Regarding backward compatibility, as Frank suggested, I will not remove the old reset-gpio property from existing DTS files to avoid function break. For new i.MX platforms — such as the upcoming i.MX952-evk will add vpcie-supply, reset-gpios, and wake-gpios directly under the Root Port node. Therefore, driver updates are needed to support both the legacy properties and the new standardized Root Port based layout. [1] https://lore.kernel.org/linux-pci/20250702-perst-v5-0-920b3d1f6ee1@qti.qualcomm.com/ (local) [2] https://lore.kernel.org/linux-pci/20260115-pci-pwrctrl-rework-v5-0-9d26da3ce903@oss.qualcomm.com/ (local) [3] https://lore.kernel.org/linux-pci/20260112-pci-m2-e-v4-0-eff84d2c6d26@oss.qualcomm.com/ (local) Signed-off-by: Sherry Sun <redacted> --- Changes in V4: 1. Add common helpers for parsing Root Port properties in pci-host-common.c in patch#2. 2. Call common pci_host_common_parse_ports() and pci_host_common_delete_ports() in pci-imx6 driver. 3. Use PCIE_T_PVPERL_MS and PCIE_RESET_CONFIG_WAIT_MS instead of magic number 100 in patch#3 as Manivannan suggested. 4. Use "PERST#" instead of "PCIe reset" for the reset gpio lable in patch#3. Changes in V3: 1. Improve the patch#2 commit message as Frank suggested. 2. Add Reviewed-by tag for patch#1. Changes in V2: 1. Improve the patch#1 commit message as Frank suggested. 2. Also mark the reset-gpio-active-high property as deprecated in imx6q-pcie DT binding as Rob suggested. 3. The imx_pcie_delete_ports() has been moved up so that the imx_pcie_parse_ports() can call this helper function in error handling. 4. Keep the old reset-gpio property in the host bridge node for the existing dts files and add comments to avoid confusion. --- Sherry Sun (11): dt-bindings: PCI: fsl,imx6q-pcie: Add reset GPIO in Root Port node PCI: host-generic: Add common helpers for parsing Root Port properties PCI: imx6: Add support for parsing the reset property in new Root Port binding arm: dts: imx6qdl: Add Root Port node and PERST property arm: dts: imx6sx: Add Root Port node and PERST property arm: dts: imx7d: Add Root Port node and PERST property arm64: dts: imx8mm: Add Root Port node and PERST property arm64: dts: imx8mp: Add Root Port node and PERST property arm64: dts: imx8mq: Add Root Port node and PERST property arm64: dts: imx8dxl/qm/qxp: Add Root Port node and PERST property arm64: dts: imx95: Add Root Port node and PERST property .../bindings/pci/fsl,imx6q-pcie.yaml | 32 ++++++++ .../arm/boot/dts/nxp/imx/imx6qdl-sabresd.dtsi | 5 ++ arch/arm/boot/dts/nxp/imx/imx6qdl.dtsi | 11 +++ .../arm/boot/dts/nxp/imx/imx6qp-sabreauto.dts | 5 ++ arch/arm/boot/dts/nxp/imx/imx6sx-sdb.dtsi | 5 ++ arch/arm/boot/dts/nxp/imx/imx6sx.dtsi | 11 +++ arch/arm/boot/dts/nxp/imx/imx7d-sdb.dts | 5 ++ arch/arm/boot/dts/nxp/imx/imx7d.dtsi | 11 +++ .../boot/dts/freescale/imx8-ss-hsio.dtsi | 11 +++ arch/arm64/boot/dts/freescale/imx8dxl-evk.dts | 5 ++ arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi | 5 ++ arch/arm64/boot/dts/freescale/imx8mm.dtsi | 11 +++ arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 5 ++ arch/arm64/boot/dts/freescale/imx8mp.dtsi | 11 +++ arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 10 +++ arch/arm64/boot/dts/freescale/imx8mq.dtsi | 22 ++++++ arch/arm64/boot/dts/freescale/imx8qm-mek.dts | 10 +++ .../boot/dts/freescale/imx8qm-ss-hsio.dtsi | 22 ++++++ arch/arm64/boot/dts/freescale/imx8qxp-mek.dts | 5 ++ .../boot/dts/freescale/imx95-15x15-evk.dts | 5 ++ .../boot/dts/freescale/imx95-19x19-evk.dts | 10 +++ arch/arm64/boot/dts/freescale/imx95.dtsi | 22 ++++++ drivers/pci/controller/dwc/pci-imx6.c | 69 +++++++++++++---- drivers/pci/controller/pci-host-common.c | 75 +++++++++++++++++++ drivers/pci/controller/pci-host-common.h | 17 +++++ 25 files changed, 386 insertions(+), 14 deletions(-) -- 2.37.1