Skip to contentSkip to conversation

arm64: tegra: Enable PWM nodes for Orin Nano Devkit

PATCH In review Gautham Srinivasan 2 participants 3 messages Jul 6, 2023 – Jul 7, 2023

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

PATCH 1/2 arm64: tegra: Enable PWM nodes for Orin Nano Devkit

Orin Nano Devkit (P3768+P3767) supports PWM1, PWM5 and PWM7 in 40 pin header. Enable them.

---
 .../nvidia/tegra234-p3768-0000+p3767-0000.dts | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm64/boot/dts/nvidia/tegra234-p3768-0000+p3767-0000.dts +19 -0
index 65e4b51b79c1..b2473a8b43ff 100644
@@ -25,12 +25,31 @@
 			status = "okay";
 		};
 
+
+		pwm@3280000 {
+			assigned-clocks = <&bpmp TEGRA234_CLK_PWM1>;
+			assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>;
+			status = "okay";
+		};
+
 		pwm@32a0000 {
 			assigned-clocks = <&bpmp TEGRA234_CLK_PWM3>;
 			assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>;
 			status = "okay";
 		};
 
+		pwm@32c0000 {
+			assigned-clocks = <&bpmp TEGRA234_CLK_PWM5>;
+			assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>;
+			status = "okay";
+		};
+
+		pwm@32e0000 {
+			assigned-clocks = <&bpmp TEGRA234_CLK_PWM7>;
+			assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>;
+			status = "okay";
+		};
+
 		hda@3510000 {
 			nvidia,model = "NVIDIA Jetson Orin NX HDA";
 			status = "okay";
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/2 arm64: tegra: Enable soctherm for Orin Nano Devkit

Enable soctherm for Orin Nano Devkit. This is needed for the CPU fan to operate.

---
 .../arm64/boot/dts/nvidia/tegra234-p3767.dtsi | 38 +++++++++++++++++++
 1 file changed, 38 insertions(+)
arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi +38 -0
index a8aa6e7d8fbc..cb76b08e15b9 100644
@@ -98,6 +98,12 @@
 		vin-supply = <&vdd_5v0_sys>;
 	};
 
+	bpmp {
+		thermal {
+			status = "okay";
+		};
+	};
+
 	thermal-zones {
 		tj-thermal {
 			polling-delay = <1000>;
@@ -118,5 +124,37 @@
 				};
 			};
 		};
+
+		cpu-thermal {
+			status = "okay";
+		};
+
+		gpu-thermal {
+			status = "okay";
+		};
+
+		cv0-thermal {
+			status = "okay";
+		};
+
+		cv1-thermal {
+			status = "okay";
+		};
+
+		cv2-thermal {
+			status = "okay";
+		};
+
+		soc0-thermal {
+			status = "okay";
+		};
+
+		soc1-thermal {
+			status = "okay";
+		};
+
+		soc2-thermal {
+			status = "okay";
+		};
 	};
 };
Signature · 1 line
2.17.1
#2 lore raw

Re: [PATCH 2/2] arm64: tegra: Enable soctherm for Orin Nano Devkit

Quoted 13 lines · Gautham Srinivasan

Enable soctherm for Orin Nano Devkit. This is needed for the CPU fan to operate.

---
 .../arm64/boot/dts/nvidia/tegra234-p3767.dtsi | 38 +++++++++++++++++++
 1 file changed, 38 insertions(+)
arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi +0 -0
index a8aa6e7d8fbc..cb76b08e15b9 100644

arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi line 105

Quoted 8 lines
arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi +5 -0
@@ -98,6 +98,12 @@
 		vin-supply = <&vdd_5v0_sys>;
 	};
 
+	bpmp {
+		thermal {
+			status = "okay";
+		};
+	};

I cannot find where we set status = "disabled" for this node and given that status = "okay" is the default, there doesn't seem to be any reason to set this.

Quoted 29 lines
arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi +22 -0
 	thermal-zones {
 		tj-thermal {
 			polling-delay = <1000>;
@@ -118,5 +124,37 @@
 				};
 			};
 		};
+
+		cpu-thermal {
+			status = "okay";
+		};
+
+		gpu-thermal {
+			status = "okay";
+		};
+
+		cv0-thermal {
+			status = "okay";
+		};
+
+		cv1-thermal {
+			status = "okay";
+		};
+
+		cv2-thermal {
+			status = "okay";
+		};
+
+		soc0-thermal {

arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi line 158

Quoted 10 lines
arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi +10 -0
+			status = "okay";
+		};
+
+		soc1-thermal {
+			status = "okay";
+		};
+
+		soc2-thermal {
+			status = "okay";
+		};

Why are these needed? Previous discussions concluded that we don't want to use any of these for monitoring temperatures because they are too fine-grained for fan control.

I guess it could make sense to enable all of these so that they can be monitored using sysfs if that's something we want, but in that case it might be better to enable them in the top-level tegra234.dtsi.

Thierry