Skip to contentSkip to conversation

arm64: tegra: Add pinctrl definitions for pcie-ep nodes

PATCH In review Niklas Cassel 4 participants 7 messages Oct 9, 2025 – Nov 11, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 arm64: tegra: Add pinctrl definitions for pcie-ep nodes

When the PCIe controller is running in endpoint mode, the controller initialization is triggered by a PERST# (PCIe reset) GPIO deassertion.

The driver has configured an IRQ to trigger when the PERST# GPIO changes state. Without the pinctrl definition, we do not get an IRQ when PERST# is deasserted, so the PCIe controller never gets initialized.

Add the missing definitions, so that the controller actually gets initialized.

Fixes ec142c44b026 ("arm64: tegra: Add P2U and PCIe controller nodes to Tegra234 DT")
Fixes 0580286d0d22 ("arm64: tegra: Add Tegra234 PCIe C4 EP definition")

---
Changes since v2:
-Add pinctrl definitions to all pcie-ep nodes, not just C4 controller.

 arch/arm64/boot/dts/nvidia/tegra234.dtsi | 57 ++++++++++++++++++++++++
 1 file changed, 57 insertions(+)
arch/arm64/boot/dts/nvidia/tegra234.dtsi +57 -0
index df034dbb82853..cc929e1a00744 100644
@@ -9,6 +9,7 @@
 #include <dt-bindings/power/tegra234-powergate.h>
 #include <dt-bindings/reset/tegra234-reset.h>
 #include <dt-bindings/thermal/tegra234-bpmp-thermal.h>
+#include <dt-bindings/pinctrl/pinctrl-tegra.h>
 
 / {
 	compatible = "nvidia,tegra234";
@@ -127,6 +128,52 @@ gpio: gpio@2200000 {
 		pinmux: pinmux@2430000 {
 			compatible = "nvidia,tegra234-pinmux";
 			reg = <0x0 0x2430000 0x0 0x19100>;
+
+			pex_rst_c4_in_state: pinmux-pex-rst-c4-in {
+				pex_rst {
+					nvidia,pins = "pex_l4_rst_n_pl1";
+					nvidia,function = "rsvd1";
+					nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+					nvidia,tristate = <TEGRA_PIN_ENABLE>;
+					nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+				};
+			};
+			pex_rst_c5_in_state: pinmux-pex-rst-c5-in {
+				pex_rst {
+					nvidia,pins = "pex_l5_rst_n_paf1";
+					nvidia,function = "rsvd1";
+					nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+					nvidia,tristate = <TEGRA_PIN_ENABLE>;
+					nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+				};
+			};
+			pex_rst_c6_in_state: pinmux-pex-rst-c6-in {
+				pex_rst {
+					nvidia,pins = "pex_l6_rst_n_paf3";
+					nvidia,function = "rsvd1";
+					nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+					nvidia,tristate = <TEGRA_PIN_ENABLE>;
+					nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+				};
+			};
+			pex_rst_c7_in_state: pinmux-pex-rst-c7-in {
+				pex_rst {
+					nvidia,pins = "pex_l7_rst_n_pag1";
+					nvidia,function = "rsvd1";
+					nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+					nvidia,tristate = <TEGRA_PIN_ENABLE>;
+					nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+				};
+			};
+			pex_rst_c10_in_state: pinmux-pex-rst-c10-in {
+				pex_rst {
+					nvidia,pins = "pex_l10_rst_n_pag7";
+					nvidia,function = "rsvd1";
+					nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+					nvidia,tristate = <TEGRA_PIN_ENABLE>;
+					nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+				};
+			};
 		};
 
 		gpcdma: dma-controller@2600000 {
@@ -4630,6 +4677,8 @@ pcie-ep@140e0000 {
 				 <&bpmp TEGRA234_RESET_PEX2_CORE_10>;
 			reset-names = "apb", "core";
 
+			pinctrl-names = "default";
+			pinctrl-0 = <&pex_rst_c10_in_state>;
 			interrupts = <GIC_SPI 360 IRQ_TYPE_LEVEL_HIGH>;	/* controller interrupt */
 			interrupt-names = "intr";
 
@@ -4881,6 +4930,8 @@ pcie-ep@14160000 {
 			       <&bpmp TEGRA234_RESET_PEX0_CORE_4>;
 			reset-names = "apb", "core";
 
+			pinctrl-names = "default";
+			pinctrl-0 = <&pex_rst_c4_in_state>;
 			interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;  /* controller interrupt */
 			interrupt-names = "intr";
 			nvidia,bpmp = <&bpmp 4>;
@@ -5023,6 +5074,8 @@ pcie-ep@141a0000 {
 				 <&bpmp TEGRA234_RESET_PEX1_CORE_5>;
 			reset-names = "apb", "core";
 
+			pinctrl-names = "default";
+			pinctrl-0 = <&pex_rst_c5_in_state>;
 			interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;	/* controller interrupt */
 			interrupt-names = "intr";
 
@@ -5115,6 +5168,8 @@ pcie-ep@141c0000 {
 				 <&bpmp TEGRA234_RESET_PEX1_CORE_6>;
 			reset-names = "apb", "core";
 
+			pinctrl-names = "default";
+			pinctrl-0 = <&pex_rst_c6_in_state>;
 			interrupts = <GIC_SPI 352 IRQ_TYPE_LEVEL_HIGH>;	/* controller interrupt */
 			interrupt-names = "intr";
 
@@ -5207,6 +5262,8 @@ pcie-ep@141e0000 {
 				 <&bpmp TEGRA234_RESET_PEX2_CORE_7>;
 			reset-names = "apb", "core";
 
+			pinctrl-names = "default";
+			pinctrl-0 = <&pex_rst_c7_in_state>;
 			interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;	/* controller interrupt */
 			interrupt-names = "intr";
 
Signature · 1 line
2.51.0
Reviewed-by on v3 1/1
#1 lore raw

Looks good to me

Quoted 137 lines · Niklas Cassel

External email: Use caution opening links or attachments

When the PCIe controller is running in endpoint mode, the controller initialization is triggered by a PERST# (PCIe reset) GPIO deassertion.

The driver has configured an IRQ to trigger when the PERST# GPIO changes state. Without the pinctrl definition, we do not get an IRQ when PERST# is deasserted, so the PCIe controller never gets initialized.

Add the missing definitions, so that the controller actually gets initialized.

Fixes ec142c44b026 ("arm64: tegra: Add P2U and PCIe controller nodes to Tegra234 DT")
Fixes 0580286d0d22 ("arm64: tegra: Add Tegra234 PCIe C4 EP definition")

---
Changes since v2:

(quoted diff) +0 -1
-Add pinctrl definitions to all pcie-ep nodes, not just C4 controller.
 
  arch/arm64/boot/dts/nvidia/tegra234.dtsi | 57 ++++++++++++++++++++++++
  1 file changed, 57 insertions(+)
arch/arm64/boot/dts/nvidia/tegra234.dtsi +57 -1
index df034dbb82853..cc929e1a00744 100644
@@ -9,6 +9,7 @@
  #include <dt-bindings/power/tegra234-powergate.h>
  #include <dt-bindings/reset/tegra234-reset.h>
  #include <dt-bindings/thermal/tegra234-bpmp-thermal.h>
+#include <dt-bindings/pinctrl/pinctrl-tegra.h>
 
  / {
         compatible = "nvidia,tegra234";
@@ -127,6 +128,52 @@ gpio: gpio@2200000 {
                 pinmux: pinmux@2430000 {
                         compatible = "nvidia,tegra234-pinmux";
                         reg = <0x0 0x2430000 0x0 0x19100>;
+
+                       pex_rst_c4_in_state: pinmux-pex-rst-c4-in {
+                               pex_rst {
+                                       nvidia,pins = "pex_l4_rst_n_pl1";
+                                       nvidia,function = "rsvd1";
+                                       nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                                       nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                                       nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                               };
+                       };
+                       pex_rst_c5_in_state: pinmux-pex-rst-c5-in {
+                               pex_rst {
+                                       nvidia,pins = "pex_l5_rst_n_paf1";
+                                       nvidia,function = "rsvd1";
+                                       nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                                       nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                                       nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                               };
+                       };
+                       pex_rst_c6_in_state: pinmux-pex-rst-c6-in {
+                               pex_rst {
+                                       nvidia,pins = "pex_l6_rst_n_paf3";
+                                       nvidia,function = "rsvd1";
+                                       nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                                       nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                                       nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                               };
+                       };
+                       pex_rst_c7_in_state: pinmux-pex-rst-c7-in {
+                               pex_rst {
+                                       nvidia,pins = "pex_l7_rst_n_pag1";
+                                       nvidia,function = "rsvd1";
+                                       nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                                       nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                                       nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                               };
+                       };
+                       pex_rst_c10_in_state: pinmux-pex-rst-c10-in {
+                               pex_rst {
+                                       nvidia,pins = "pex_l10_rst_n_pag7";
+                                       nvidia,function = "rsvd1";
+                                       nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                                       nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                                       nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                               };
+                       };
                 };
 
                 gpcdma: dma-controller@2600000 {
@@ -4630,6 +4677,8 @@ pcie-ep@140e0000 {
                                  <&bpmp TEGRA234_RESET_PEX2_CORE_10>;
                         reset-names = "apb", "core";
 
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pex_rst_c10_in_state>;
                         interrupts = <GIC_SPI 360 IRQ_TYPE_LEVEL_HIGH>; /* controller interrupt */
                         interrupt-names = "intr";
 
@@ -4881,6 +4930,8 @@ pcie-ep@14160000 {
                                <&bpmp TEGRA234_RESET_PEX0_CORE_4>;
                         reset-names = "apb", "core";
 
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pex_rst_c4_in_state>;
                         interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;  /* controller interrupt */
                         interrupt-names = "intr";
                         nvidia,bpmp = <&bpmp 4>;
@@ -5023,6 +5074,8 @@ pcie-ep@141a0000 {
                                  <&bpmp TEGRA234_RESET_PEX1_CORE_5>;
                         reset-names = "apb", "core";
 
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pex_rst_c5_in_state>;
                         interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;  /* controller interrupt */
                         interrupt-names = "intr";
 
@@ -5115,6 +5168,8 @@ pcie-ep@141c0000 {
                                  <&bpmp TEGRA234_RESET_PEX1_CORE_6>;
                         reset-names = "apb", "core";
 
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pex_rst_c6_in_state>;
                         interrupts = <GIC_SPI 352 IRQ_TYPE_LEVEL_HIGH>; /* controller interrupt */
                         interrupt-names = "intr";
 
@@ -5207,6 +5262,8 @@ pcie-ep@141e0000 {
                                  <&bpmp TEGRA234_RESET_PEX2_CORE_7>;
                         reset-names = "apb", "core";
 
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pex_rst_c7_in_state>;
                         interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>; /* controller interrupt */
                         interrupt-names = "intr";
 
--

2.51.0

#2 lore raw
In reply to Niklas Cassel
Quoted 7 lines · Niklas Cassel

When the PCIe controller is running in endpoint mode, the controller initialization is triggered by a PERST# (PCIe reset) GPIO deassertion.

The driver has configured an IRQ to trigger when the PERST# GPIO changes state. Without the pinctrl definition, we do not get an IRQ when PERST# is deasserted, so the PCIe controller never gets initialized.

Quoted 7 lines

Add the missing definitions, so that the controller actually gets initialized.

Fixes ec142c44b026 ("arm64: tegra: Add P2U and PCIe controller nodes to Tegra234 DT")
Fixes 0580286d0d22 ("arm64: tegra: Add Tegra234 PCIe C4 EP definition")

---

Gentle ping

Kind regards,
Niklas

#3 lore raw
In reply to Niklas Cassel
Quoted 13 lines · Niklas Cassel

When the PCIe controller is running in endpoint mode, the controller initialization is triggered by a PERST# (PCIe reset) GPIO deassertion.

The driver has configured an IRQ to trigger when the PERST# GPIO changes state. Without the pinctrl definition, we do not get an IRQ when PERST# is deasserted, so the PCIe controller never gets initialized.

Add the missing definitions, so that the controller actually gets initialized.

Fixes ec142c44b026 ("arm64: tegra: Add P2U and PCIe controller nodes to Tegra234 DT")
Fixes 0580286d0d22 ("arm64: tegra: Add Tegra234 PCIe C4 EP definition")
Quoted 6 lines

---
Changes since v2:
-Add pinctrl definitions to all pcie-ep nodes, not just C4 controller.

 arch/arm64/boot/dts/nvidia/tegra234.dtsi | 57 ++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

Applied thanks. I did add blank lines between the blocks since that's what I prefer. I hope you don't mind.

Thierry

#4 lore raw
Quoted 18 lines · Thierry Reding
Quoted 17 lines · Niklas Cassel

When the PCIe controller is running in endpoint mode, the controller initialization is triggered by a PERST# (PCIe reset) GPIO deassertion.

The driver has configured an IRQ to trigger when the PERST# GPIO changes state. Without the pinctrl definition, we do not get an IRQ when PERST# is deasserted, so the PCIe controller never gets initialized.

Add the missing definitions, so that the controller actually gets initialized.

Fixes ec142c44b026 ("arm64: tegra: Add P2U and PCIe controller nodes to Tegra234 DT")
Fixes 0580286d0d22 ("arm64: tegra: Add Tegra234 PCIe C4 EP definition")

---
Changes since v2:
-Add pinctrl definitions to all pcie-ep nodes, not just C4 controller.

Quoted 5 lines
Quoted 2 lines
 arch/arm64/boot/dts/nvidia/tegra234.dtsi | 57 ++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

Applied thanks. I did add blank lines between the blocks since that's what I prefer. I hope you don't mind.

Perfectly fine with me, you are the maintainer :)

However, I don't see this patch queued on any branch @
https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git/

Did you perhaps forget to push?

Kind regards,
Niklas

#5 lore raw
Quoted 25 lines · Niklas Cassel
Quoted 18 lines · Thierry Reding
Quoted 17 lines · Niklas Cassel

When the PCIe controller is running in endpoint mode, the controller initialization is triggered by a PERST# (PCIe reset) GPIO deassertion.

The driver has configured an IRQ to trigger when the PERST# GPIO changes state. Without the pinctrl definition, we do not get an IRQ when PERST# is deasserted, so the PCIe controller never gets initialized.

Add the missing definitions, so that the controller actually gets initialized.

Fixes ec142c44b026 ("arm64: tegra: Add P2U and PCIe controller nodes to Tegra234 DT")
Fixes 0580286d0d22 ("arm64: tegra: Add Tegra234 PCIe C4 EP definition")

---
Changes since v2:
-Add pinctrl definitions to all pcie-ep nodes, not just C4 controller.

Quoted 5 lines
Quoted 2 lines
 arch/arm64/boot/dts/nvidia/tegra234.dtsi | 57 ++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

Applied thanks. I did add blank lines between the blocks since that's what I prefer. I hope you don't mind.

Quoted 6 lines

Perfectly fine with me, you are the maintainer :)

However, I don't see this patch queued on any branch @
https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git/

Did you perhaps forget to push?

Yes, of course I did. =) I was waiting for feedback on a quick patch I added to the branch and then forgot to push out. Should all be up-to- date now on kernel.org.

Thierry

maintainer Reviewed-by on v3 1/1
#6 lore raw
In reply to Niklas Cassel
Quoted 122 lines · Niklas Cassel

When the PCIe controller is running in endpoint mode, the controller initialization is triggered by a PERST# (PCIe reset) GPIO deassertion.

The driver has configured an IRQ to trigger when the PERST# GPIO changes state. Without the pinctrl definition, we do not get an IRQ when PERST# is deasserted, so the PCIe controller never gets initialized.

Add the missing definitions, so that the controller actually gets initialized.

Fixes ec142c44b026 ("arm64: tegra: Add P2U and PCIe controller nodes to Tegra234 DT")
Fixes 0580286d0d22 ("arm64: tegra: Add Tegra234 PCIe C4 EP definition")

---
Changes since v2:

(quoted diff) +0 -1
-Add pinctrl definitions to all pcie-ep nodes, not just C4 controller.
 
  arch/arm64/boot/dts/nvidia/tegra234.dtsi | 57 ++++++++++++++++++++++++
  1 file changed, 57 insertions(+)
arch/arm64/boot/dts/nvidia/tegra234.dtsi +55 -0
index df034dbb82853..cc929e1a00744 100644
@@ -9,6 +9,7 @@
  #include <dt-bindings/power/tegra234-powergate.h>
  #include <dt-bindings/reset/tegra234-reset.h>
  #include <dt-bindings/thermal/tegra234-bpmp-thermal.h>
+#include <dt-bindings/pinctrl/pinctrl-tegra.h>
 
  / {
  	compatible = "nvidia,tegra234";
@@ -127,6 +128,52 @@ gpio: gpio@2200000 {
  		pinmux: pinmux@2430000 {
  			compatible = "nvidia,tegra234-pinmux";
  			reg = <0x0 0x2430000 0x0 0x19100>;
+
+			pex_rst_c4_in_state: pinmux-pex-rst-c4-in {
+				pex_rst {
+					nvidia,pins = "pex_l4_rst_n_pl1";
+					nvidia,function = "rsvd1";
+					nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+					nvidia,tristate = <TEGRA_PIN_ENABLE>;
+					nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+				};
+			};
+			pex_rst_c5_in_state: pinmux-pex-rst-c5-in {
+				pex_rst {
+					nvidia,pins = "pex_l5_rst_n_paf1";
+					nvidia,function = "rsvd1";
+					nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+					nvidia,tristate = <TEGRA_PIN_ENABLE>;
+					nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+				};
+			};
+			pex_rst_c6_in_state: pinmux-pex-rst-c6-in {
+				pex_rst {
+					nvidia,pins = "pex_l6_rst_n_paf3";
+					nvidia,function = "rsvd1";
+					nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+					nvidia,tristate = <TEGRA_PIN_ENABLE>;
+					nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+				};
+			};
+			pex_rst_c7_in_state: pinmux-pex-rst-c7-in {
+				pex_rst {
+					nvidia,pins = "pex_l7_rst_n_pag1";
+					nvidia,function = "rsvd1";
+					nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+					nvidia,tristate = <TEGRA_PIN_ENABLE>;
+					nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+				};
+			};
+			pex_rst_c10_in_state: pinmux-pex-rst-c10-in {
+				pex_rst {
+					nvidia,pins = "pex_l10_rst_n_pag7";
+					nvidia,function = "rsvd1";
+					nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+					nvidia,tristate = <TEGRA_PIN_ENABLE>;
+					nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+				};
+			};
  		};
 
  		gpcdma: dma-controller@2600000 {
@@ -4630,6 +4677,8 @@ pcie-ep@140e0000 {
  				 <&bpmp TEGRA234_RESET_PEX2_CORE_10>;
  			reset-names = "apb", "core";
 
+			pinctrl-names = "default";
+			pinctrl-0 = <&pex_rst_c10_in_state>;
  			interrupts = <GIC_SPI 360 IRQ_TYPE_LEVEL_HIGH>;	/* controller interrupt */
  			interrupt-names = "intr";
 
@@ -4881,6 +4930,8 @@ pcie-ep@14160000 {
  			       <&bpmp TEGRA234_RESET_PEX0_CORE_4>;
  			reset-names = "apb", "core";
 
+			pinctrl-names = "default";
+			pinctrl-0 = <&pex_rst_c4_in_state>;
  			interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;  /* controller interrupt */
  			interrupt-names = "intr";
  			nvidia,bpmp = <&bpmp 4>;
@@ -5023,6 +5074,8 @@ pcie-ep@141a0000 {
  				 <&bpmp TEGRA234_RESET_PEX1_CORE_5>;
  			reset-names = "apb", "core";
 
+			pinctrl-names = "default";
+			pinctrl-0 = <&pex_rst_c5_in_state>;
  			interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;	/* controller interrupt */
  			interrupt-names = "intr";
 
@@ -5115,6 +5168,8 @@ pcie-ep@141c0000 {
  				 <&bpmp TEGRA234_RESET_PEX1_CORE_6>;
  			reset-names = "apb", "core";
 
+			pinctrl-names = "default";
+			pinctrl-0 = <&pex_rst_c6_in_state>;
  			interrupts = <GIC_SPI 352 IRQ_TYPE_LEVEL_HIGH>;	/* controller interrupt */
  			interrupt-names = "intr";
 

arch/arm64/boot/dts/nvidia/tegra234.dtsi pcie-ep@141e0000 { · line 5269

Quoted 8 lines
arch/arm64/boot/dts/nvidia/tegra234.dtsi +2 -0
@@ -5207,6 +5262,8 @@ pcie-ep@141e0000 {
  				 <&bpmp TEGRA234_RESET_PEX2_CORE_7>;
  			reset-names = "apb", "core";
 
+			pinctrl-names = "default";
+			pinctrl-0 = <&pex_rst_c7_in_state>;
  			interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;	/* controller interrupt */
  			interrupt-names = "intr";
 

Thanks!
Jon

Signature · 1 line
nvpublic