linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64: tegra: Enable PWM nodes for Orin Nano Devkit
@ 2023-07-06  0:55 Gautham Srinivasan
  2023-07-06  0:55 ` [PATCH 2/2] arm64: tegra: Enable soctherm " Gautham Srinivasan
  0 siblings, 1 reply; 3+ messages in thread
From: Gautham Srinivasan @ 2023-07-06  0:55 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter, devicetree, linux-tegra
  Cc: Gautham Srinivasan

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

Signed-off-by: Gautham Srinivasan <gauthams@nvidia.com>
---
 .../nvidia/tegra234-p3768-0000+p3767-0000.dts | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3768-0000+p3767-0000.dts b/arch/arm64/boot/dts/nvidia/tegra234-p3768-0000+p3767-0000.dts
index 65e4b51b79c1..b2473a8b43ff 100644
--- a/arch/arm64/boot/dts/nvidia/tegra234-p3768-0000+p3767-0000.dts
+++ b/arch/arm64/boot/dts/nvidia/tegra234-p3768-0000+p3767-0000.dts
@@ -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";
-- 
2.17.1


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

* [PATCH 2/2] arm64: tegra: Enable soctherm for Orin Nano Devkit
  2023-07-06  0:55 [PATCH 1/2] arm64: tegra: Enable PWM nodes for Orin Nano Devkit Gautham Srinivasan
@ 2023-07-06  0:55 ` Gautham Srinivasan
  2023-07-07 13:00   ` Thierry Reding
  0 siblings, 1 reply; 3+ messages in thread
From: Gautham Srinivasan @ 2023-07-06  0:55 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Thierry Reding,
	Jonathan Hunter, devicetree, linux-tegra
  Cc: Gautham Srinivasan

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

Signed-off-by: Gautham Srinivasan <gauthams@nvidia.com>
---
 .../arm64/boot/dts/nvidia/tegra234-p3767.dtsi | 38 +++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi b/arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi
index a8aa6e7d8fbc..cb76b08e15b9 100644
--- a/arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi
@@ -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";
+		};
 	};
 };
-- 
2.17.1


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

* Re: [PATCH 2/2] arm64: tegra: Enable soctherm for Orin Nano Devkit
  2023-07-06  0:55 ` [PATCH 2/2] arm64: tegra: Enable soctherm " Gautham Srinivasan
@ 2023-07-07 13:00   ` Thierry Reding
  0 siblings, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2023-07-07 13:00 UTC (permalink / raw)
  To: Gautham Srinivasan
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jonathan Hunter,
	devicetree, linux-tegra

[-- Attachment #1: Type: text/plain, Size: 1901 bytes --]

On Thu, Jul 06, 2023 at 12:55:45AM +0000, Gautham Srinivasan wrote:
> Enable soctherm for Orin Nano Devkit. This is needed for the CPU
> fan to operate.
> 
> Signed-off-by: Gautham Srinivasan <gauthams@nvidia.com>
> ---
>  .../arm64/boot/dts/nvidia/tegra234-p3767.dtsi | 38 +++++++++++++++++++
>  1 file changed, 38 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi b/arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi
> index a8aa6e7d8fbc..cb76b08e15b9 100644
> --- a/arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi
> +++ b/arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi
> @@ -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.

>  	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";
> +		};

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2023-07-07 13:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-06  0:55 [PATCH 1/2] arm64: tegra: Enable PWM nodes for Orin Nano Devkit Gautham Srinivasan
2023-07-06  0:55 ` [PATCH 2/2] arm64: tegra: Enable soctherm " Gautham Srinivasan
2023-07-07 13:00   ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).