Skip to contentSkip to conversation

arm64: tegra: fix p3767 card detect polarity

PATCH Applied Brad Griffis 2 participants 8 messages Jun 26, 2023 – Aug 16, 2023

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

PATCH 1/2 arm64: tegra: fix p3767 card detect polarity

The card detect pin on Orin Nano SKU5 (p3767-0005) is active-low.

Fixes 13b0aca303e9 ("arm64: tegra: Support Jetson Orin NX")
---
 arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi +1 -1
index bd60478fa75e..831a553ec387 100644
@@ -42,7 +42,7 @@ flash@0 {
 		mmc@3400000 {
 			status = "okay";
 			bus-width = <4>;
-			cd-gpios = <&gpio TEGRA234_MAIN_GPIO(G, 7) GPIO_ACTIVE_HIGH>;
+			cd-gpios = <&gpio TEGRA234_MAIN_GPIO(G, 7) GPIO_ACTIVE_LOW>;
 			disable-wp;
 		};
 
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/2 arm64: tegra: fix p3767 QSPI speed

The QSPI device used in Jetson Orin NX and Nano modules (p3767) is the same as Jetson AGX Orin (p3701) and should have a max speed of 102 MHz.

Fixes 13b0aca303e9 ("arm64: tegra: Support Jetson Orin NX")
---
 arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi +1 -1
index 831a553ec387..980f15ac674d 100644
@@ -28,7 +28,7 @@ spi@3270000 {
 			flash@0 {
 				compatible = "jedec,spi-nor";
 				reg = <0>;
-				spi-max-frequency = <136000000>;
+				spi-max-frequency = <102000000>;
 				spi-tx-bus-width = <4>;
 				spi-rx-bus-width = <4>;
 			};
Signature · 1 line
2.25.1
#2 lore raw

Re: [PATCH 2/2] arm64: tegra: fix p3767 QSPI speed

Quoted 9 lines · Brad Griffis

The QSPI device used in Jetson Orin NX and Nano modules (p3767) is the same as Jetson AGX Orin (p3701) and should have a max speed of 102 MHz.

Fixes 13b0aca303e9 ("arm64: tegra: Support Jetson Orin NX")
---
 arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This was originally copied from the downstream DTB and I see 136 MHz for both P3701 and P3767 there. So now I wonder which one is correct. Should perhaps the P3701 be updated to 136 MHz instead if that's what is being used downstream?

Thierry

Quoted 16 lines
arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi +1 -1
index 831a553ec387..980f15ac674d 100644
@@ -28,7 +28,7 @@ spi@3270000 {
 			flash@0 {
 				compatible = "jedec,spi-nor";
 				reg = <0>;
-				spi-max-frequency = <136000000>;
+				spi-max-frequency = <102000000>;
 				spi-tx-bus-width = <4>;
 				spi-rx-bus-width = <4>;
 			};
Signature · 1 line
2.25.1
#3 lore raw

RE: [PATCH 2/2] arm64: tegra: fix p3767 QSPI speed

Quoted 11 lines · Thierry Reding
Quoted 9 lines · Brad Griffis

The QSPI device used in Jetson Orin NX and Nano modules (p3767) is the same as Jetson AGX Orin (p3701) and should have a max speed of 102 MHz.

Fixes 13b0aca303e9 ("arm64: tegra: Support Jetson Orin NX")
---
 arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 4 lines

This was originally copied from the downstream DTB and I see 136 MHz for both P3701 and P3767 there. So now I wonder which one is correct. Should perhaps the P3701 be updated to 136 MHz instead if that's what is being used downstream?

Downstream we have changed both p3701 and p3767 to use 102 MHz. That is the max speed for Quad I/O DTR reads.

#4 lore raw

Re: [PATCH 2/2] arm64: tegra: fix p3767 QSPI speed

Quoted 12 lines · Brad Griffis
Quoted 11 lines · Thierry Reding
Quoted 9 lines · Brad Griffis

The QSPI device used in Jetson Orin NX and Nano modules (p3767) is the same as Jetson AGX Orin (p3701) and should have a max speed of 102 MHz.

Fixes 13b0aca303e9 ("arm64: tegra: Support Jetson Orin NX")
---
 arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 7 lines
Quoted 4 lines

This was originally copied from the downstream DTB and I see 136 MHz for both P3701 and P3767 there. So now I wonder which one is correct. Should perhaps the P3701 be updated to 136 MHz instead if that's what is being used downstream?

Downstream we have changed both p3701 and p3767 to use 102 MHz. That is the max speed for Quad I/O DTR reads.

Alright, I must've looked at an older version of the downstream DTB.

Applied, thanks.
Thierry

#5 lore raw
In reply to Brad Griffis
Quoted 7 lines · Brad Griffis

The card detect pin on Orin Nano SKU5 (p3767-0005) is active-low.

Fixes 13b0aca303e9 ("arm64: tegra: Support Jetson Orin NX")
---
 arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This DTS include is also used by Jetson Orin NX, but I assume that the same polarity applies to that as well?

Actually, looking at the Orin NX, I don't see an SD card slot and judging by the documentation that I was able to find it's not documented for Orin Nano either. Or is it only certain variants that were equipped with the SD slot?

Thierry

Quoted 16 lines
arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi +1 -1
index bd60478fa75e..831a553ec387 100644
@@ -42,7 +42,7 @@ flash@0 {
 		mmc@3400000 {
 			status = "okay";
 			bus-width = <4>;
-			cd-gpios = <&gpio TEGRA234_MAIN_GPIO(G, 7) GPIO_ACTIVE_HIGH>;
+			cd-gpios = <&gpio TEGRA234_MAIN_GPIO(G, 7) GPIO_ACTIVE_LOW>;
 			disable-wp;
 		};
 
Signature · 1 line
2.25.1
#6 lore raw
Quoted 11 lines · Thierry Reding
Quoted 7 lines · Brad Griffis

The card detect pin on Orin Nano SKU5 (p3767-0005) is active-low.

Fixes 13b0aca303e9 ("arm64: tegra: Support Jetson Orin NX")
---
 arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This DTS include is also used by Jetson Orin NX, but I assume that the same polarity applies to that as well?

The polarity is the same for all Orin NX/Nano modules that have SD card.

Quoted 3 lines

Actually, looking at the Orin NX, I don't see an SD card slot and judging by the documentation that I was able to find it's not documented for Orin Nano either. Or is it only certain variants that were equipped with the SD slot?

UEFI dynamically disables this mmc instance on SKUs that do not support it.

#7 lore raw
Quoted 13 lines · Brad Griffis
Quoted 11 lines · Thierry Reding
Quoted 7 lines · Brad Griffis

The card detect pin on Orin Nano SKU5 (p3767-0005) is active-low.

Fixes 13b0aca303e9 ("arm64: tegra: Support Jetson Orin NX")
---
 arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This DTS include is also used by Jetson Orin NX, but I assume that the same polarity applies to that as well?

Quoted 7 lines

The polarity is the same for all Orin NX/Nano modules that have SD card.

Quoted 3 lines

Actually, looking at the Orin NX, I don't see an SD card slot and judging by the documentation that I was able to find it's not documented for Orin Nano either. Or is it only certain variants that were equipped with the SD slot?

UEFI dynamically disables this mmc instance on SKUs that do not support it.

Okay, good. I've adjusted the commit message a tiny little bit to clarify that this applies to all NX/Nano SKUs that have an SD card slot equipped.

Applied, thanks.
Thierry