Devicetree
 help / color / mirror / Atom feed
* [PATCH v1] arm64: dts: imx94: Add Root Port node and PERST property
@ 2026-06-04  2:24 hongxing.zhu
  2026-06-04  2:31 ` sashiko-bot
  2026-06-04  3:32 ` Sherry Sun
  0 siblings, 2 replies; 3+ messages in thread
From: hongxing.zhu @ 2026-06-04  2:24 UTC (permalink / raw)
  To: sherry.sun, robh, krzk+dt, conor+dt, frank.li, s.hauer, festevam
  Cc: kernel, devicetree, imx, linux-arm-kernel, linux-kernel,
	Richard Zhu, Richard Zhu

From: Richard Zhu <hongxing.zhu@oss.nxp.com>

Since describing the PCIe PERST# property under Host Bridge node is now
deprecated, it is recommended to add it to the Root Port node, so
creating the Root Port node and add the reset-gpios property in Root
Port.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx94.dtsi     | 11 +++++++++++
 arch/arm64/boot/dts/freescale/imx943-evk.dts | 10 ++++++++++
 arch/arm64/boot/dts/freescale/imx943.dtsi    | 11 +++++++++++
 3 files changed, 32 insertions(+)
---
Since the patch-set [1] issued by Sherry had been landed. Add according
changes on i.MX943 board too.
[1] https://lkml.org/lkml/2026/6/1/1461

diff --git a/arch/arm64/boot/dts/freescale/imx94.dtsi b/arch/arm64/boot/dts/freescale/imx94.dtsi
index 1f9035e6cf159..dfbb73603cb24 100644
--- a/arch/arm64/boot/dts/freescale/imx94.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx94.dtsi
@@ -1411,6 +1411,17 @@ pcie0: pcie@4c300000 {
 			power-domains = <&scmi_devpd IMX94_PD_HSIO_TOP>;
 			fsl,max-link-speed = <3>;
 			status = "disabled";
+
+			pcie0_port0: pcie@0 {
+				compatible = "pciclass,0604";
+				device_type = "pci";
+				reg = <0x0 0x0 0x0 0x0 0x0>;
+				bus-range = <0x01 0xff>;
+
+				#address-cells = <3>;
+				#size-cells = <2>;
+				ranges;
+			};
 		};
 
 		pcie0_ep: pcie-ep@4c300000 {
diff --git a/arch/arm64/boot/dts/freescale/imx943-evk.dts b/arch/arm64/boot/dts/freescale/imx943-evk.dts
index 7cfd424689507..ed3abd3e76e56 100644
--- a/arch/arm64/boot/dts/freescale/imx943-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx943-evk.dts
@@ -1034,12 +1034,17 @@ &pcie0 {
 		 <&pcie_ref_clk>;
 	clock-names = "pcie", "pcie_bus", "pcie_phy", "pcie_aux",
 		      "ref", "extref";
+	/* This property is deprecated, use reset-gpios from the Root Port node. */
 	reset-gpio = <&pcal6416_i2c3_u46 3 GPIO_ACTIVE_LOW>;
 	vpcie3v3aux-supply = <&reg_m2_wlan>;
 	supports-clkreq;
 	status = "okay";
 };
 
+&pcie0_port0 {
+	reset-gpio = <&pcal6416_i2c3_u46 3 GPIO_ACTIVE_LOW>;
+};
+
 &pcie0_ep {
 	pinctrl-0 = <&pinctrl_pcie0>;
 	pinctrl-names = "default";
@@ -1058,12 +1063,17 @@ &pcie1 {
 		 <&pcie_ref_clk>;
 	clock-names = "pcie", "pcie_bus", "pcie_phy", "pcie_aux",
 		      "ref", "extref";
+	/* This property is deprecated, use reset-gpios from the Root Port node. */
 	reset-gpio = <&pcal6416_i2c3_u46 1 GPIO_ACTIVE_LOW>;
 	vpcie3v3aux-supply = <&reg_slot_pwr>;
 	supports-clkreq;
 	status = "okay";
 };
 
+&pcie1_port0 {
+	reset-gpio = <&pcal6416_i2c3_u46 1 GPIO_ACTIVE_LOW>;
+};
+
 &pcie1_ep {
 	pinctrl-0 = <&pinctrl_pcie1>;
 	pinctrl-names = "default";
diff --git a/arch/arm64/boot/dts/freescale/imx943.dtsi b/arch/arm64/boot/dts/freescale/imx943.dtsi
index cf5b3dbb47ff7..01152fd0efa5e 100644
--- a/arch/arm64/boot/dts/freescale/imx943.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx943.dtsi
@@ -255,6 +255,17 @@ pcie1: pcie@4c380000 {
 			power-domains = <&scmi_devpd IMX94_PD_HSIO_TOP>;
 			fsl,max-link-speed = <3>;
 			status = "disabled";
+
+			pcie1_port0: pcie@0 {
+				compatible = "pciclass,0604";
+				device_type = "pci";
+				reg = <0x0 0x0 0x0 0x0 0x0>;
+				bus-range = <0x01 0xff>;
+
+				#address-cells = <3>;
+				#size-cells = <2>;
+				ranges;
+			};
 		};
 
 		pcie1_ep: pcie-ep@4c380000 {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] arm64: dts: imx94: Add Root Port node and PERST property
  2026-06-04  2:24 [PATCH v1] arm64: dts: imx94: Add Root Port node and PERST property hongxing.zhu
@ 2026-06-04  2:31 ` sashiko-bot
  2026-06-04  3:32 ` Sherry Sun
  1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-06-04  2:31 UTC (permalink / raw)
  To: hongxing.zhu; +Cc: conor+dt, devicetree, robh, Frank.Li, imx

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The newly added Root Port PERST# properties incorrectly use `reset-gpio` instead of `reset-gpios`, causing the PCI core to silently ignore them, violating DT schema, and falling back to the deprecated legacy binding.
--

commit 10fdcd113cd4d5825e1430558167b9577d3cf633
Author: Richard Zhu <hongxing.zhu@oss.nxp.com>

arm64: dts: imx94: Add Root Port node and PERST property

This commit adds Root Port nodes to the i.MX943 PCIe controllers and attempts
to migrate the PERST reset property from the host bridge to these new Root
Port nodes.

> diff --git a/arch/arm64/boot/dts/freescale/imx943-evk.dts b/arch/arm64/boot/dts/freescale/imx943-evk.dts
> index 7cfd424689507..ed3abd3e76e56 100644
> --- a/arch/arm64/boot/dts/freescale/imx943-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx943-evk.dts
> @@ -1034,12 +1034,17 @@ &pcie0 {

[ ... ]

> +	/* This property is deprecated, use reset-gpios from the Root Port node. */
>  	reset-gpio = <&pcal6416_i2c3_u46 3 GPIO_ACTIVE_LOW>;
>  	vpcie3v3aux-supply = <&reg_m2_wlan>;
>  	supports-clkreq;
>  	status = "okay";
>  };
>  
> +&pcie0_port0 {
> +	reset-gpio = <&pcal6416_i2c3_u46 3 GPIO_ACTIVE_LOW>;
> +};

[Severity: Medium]
The commit message mentions adding the reset-gpios property, but is it
intended to use reset-gpio here instead?

The Linux PCI core function pci_host_common_parse_perst() explicitly parses
the Root Port's reset GPIO using of_property_present(np, "reset-gpios"),
which strictly checks for the plural form.

Because of this typo, will the Root Port's PERST GPIO be ignored, causing
the driver to fall back to imx_pcie_parse_legacy_binding() to parse the
deprecated legacy property left on the Host Bridge node? This appears to
defeat the migration effort and violate the PCI bus DT schema.

>  
>  &pcie0_ep {

[ ... ]

> @@ -1058,12 +1063,17 @@ &pcie1 {

[ ... ]

> +	/* This property is deprecated, use reset-gpios from the Root Port node. */
>  	reset-gpio = <&pcal6416_i2c3_u46 1 GPIO_ACTIVE_LOW>;
>  	vpcie3v3aux-supply = <&reg_slot_pwr>;
>  	supports-clkreq;
>  	status = "okay";
>  };
>  
> +&pcie1_port0 {
> +	reset-gpio = <&pcal6416_i2c3_u46 1 GPIO_ACTIVE_LOW>;
> +};

[Severity: Medium]
Does this also suffer from the same typo as the pcie0_port0 node?

Using reset-gpio instead of reset-gpios will likely cause this property
to be similarly ignored by the PCI core's Root Port parser.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260604022420.120294-1-hongxing.zhu@oss.nxp.com?part=1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH v1] arm64: dts: imx94: Add Root Port node and PERST property
  2026-06-04  2:24 [PATCH v1] arm64: dts: imx94: Add Root Port node and PERST property hongxing.zhu
  2026-06-04  2:31 ` sashiko-bot
@ 2026-06-04  3:32 ` Sherry Sun
  1 sibling, 0 replies; 3+ messages in thread
From: Sherry Sun @ 2026-06-04  3:32 UTC (permalink / raw)
  To: Hongxing Zhu (OSS), robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, Frank Li, s.hauer@pengutronix.de,
	festevam@gmail.com
  Cc: kernel@pengutronix.de, devicetree@vger.kernel.org,
	imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Hongxing Zhu

> Subject: [PATCH v1] arm64: dts: imx94: Add Root Port node and PERST
> property
> 
> From: Richard Zhu <hongxing.zhu@oss.nxp.com>
> 
> Since describing the PCIe PERST# property under Host Bridge node is now
> deprecated, it is recommended to add it to the Root Port node, so creating the
> Root Port node and add the reset-gpios property in Root Port.
> 
> Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
> ---
>  arch/arm64/boot/dts/freescale/imx94.dtsi     | 11 +++++++++++
>  arch/arm64/boot/dts/freescale/imx943-evk.dts | 10 ++++++++++
>  arch/arm64/boot/dts/freescale/imx943.dtsi    | 11 +++++++++++
>  3 files changed, 32 insertions(+)
> ---
> Since the patch-set [1] issued by Sherry had been landed. Add according
> changes on i.MX943 board too.
> [1] https://lkml.org/lkml/2026/6/1/1461
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx94.dtsi
> b/arch/arm64/boot/dts/freescale/imx94.dtsi
> index 1f9035e6cf159..dfbb73603cb24 100644
> --- a/arch/arm64/boot/dts/freescale/imx94.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx94.dtsi
> @@ -1411,6 +1411,17 @@ pcie0: pcie@4c300000 {
>  			power-domains = <&scmi_devpd
> IMX94_PD_HSIO_TOP>;
>  			fsl,max-link-speed = <3>;
>  			status = "disabled";
> +
> +			pcie0_port0: pcie@0 {
> +				compatible = "pciclass,0604";
> +				device_type = "pci";
> +				reg = <0x0 0x0 0x0 0x0 0x0>;
> +				bus-range = <0x01 0xff>;
> +
> +				#address-cells = <3>;
> +				#size-cells = <2>;
> +				ranges;
> +			};
>  		};
> 
>  		pcie0_ep: pcie-ep@4c300000 {
> diff --git a/arch/arm64/boot/dts/freescale/imx943-evk.dts
> b/arch/arm64/boot/dts/freescale/imx943-evk.dts
> index 7cfd424689507..ed3abd3e76e56 100644
> --- a/arch/arm64/boot/dts/freescale/imx943-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx943-evk.dts
> @@ -1034,12 +1034,17 @@ &pcie0 {
>  		 <&pcie_ref_clk>;
>  	clock-names = "pcie", "pcie_bus", "pcie_phy", "pcie_aux",
>  		      "ref", "extref";
> +	/* This property is deprecated, use reset-gpios from the Root Port
> +node. */
>  	reset-gpio = <&pcal6416_i2c3_u46 3 GPIO_ACTIVE_LOW>;

Hi Richard,
This reset-gpio property should be deleted, for new i.MX, we can use the
reset-gpios under Root Port directly.

>  	vpcie3v3aux-supply = <&reg_m2_wlan>;
>  	supports-clkreq;
>  	status = "okay";
>  };
> 
> +&pcie0_port0 {
> +	reset-gpio = <&pcal6416_i2c3_u46 3 GPIO_ACTIVE_LOW>; };
> +
>  &pcie0_ep {
>  	pinctrl-0 = <&pinctrl_pcie0>;
>  	pinctrl-names = "default";
> @@ -1058,12 +1063,17 @@ &pcie1 {
>  		 <&pcie_ref_clk>;
>  	clock-names = "pcie", "pcie_bus", "pcie_phy", "pcie_aux",
>  		      "ref", "extref";
> +	/* This property is deprecated, use reset-gpios from the Root Port
> +node. */
>  	reset-gpio = <&pcal6416_i2c3_u46 1 GPIO_ACTIVE_LOW>;

Same here.

Best Regards
Sherry

>  	vpcie3v3aux-supply = <&reg_slot_pwr>;
>  	supports-clkreq;
>  	status = "okay";
>  };
> 
> +&pcie1_port0 {
> +	reset-gpio = <&pcal6416_i2c3_u46 1 GPIO_ACTIVE_LOW>; };
> +
>  &pcie1_ep {
>  	pinctrl-0 = <&pinctrl_pcie1>;
>  	pinctrl-names = "default";
> diff --git a/arch/arm64/boot/dts/freescale/imx943.dtsi
> b/arch/arm64/boot/dts/freescale/imx943.dtsi
> index cf5b3dbb47ff7..01152fd0efa5e 100644
> --- a/arch/arm64/boot/dts/freescale/imx943.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx943.dtsi
> @@ -255,6 +255,17 @@ pcie1: pcie@4c380000 {
>  			power-domains = <&scmi_devpd
> IMX94_PD_HSIO_TOP>;
>  			fsl,max-link-speed = <3>;
>  			status = "disabled";
> +
> +			pcie1_port0: pcie@0 {
> +				compatible = "pciclass,0604";
> +				device_type = "pci";
> +				reg = <0x0 0x0 0x0 0x0 0x0>;
> +				bus-range = <0x01 0xff>;
> +
> +				#address-cells = <3>;
> +				#size-cells = <2>;
> +				ranges;
> +			};
>  		};
> 
>  		pcie1_ep: pcie-ep@4c380000 {
> --
> 2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-04  3:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-04  2:24 [PATCH v1] arm64: dts: imx94: Add Root Port node and PERST property hongxing.zhu
2026-06-04  2:31 ` sashiko-bot
2026-06-04  3:32 ` Sherry Sun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox