Devicetree
 help / color / mirror / Atom feed
* [PATCH v2 0/3] arm64: tegra: Add cooling device on Jetson AGX Thor DevKit
@ 2026-08-28 11:51 Thierry Reding
  2026-08-28 11:51 ` [PATCH v2 1/3] arm64: tegra: Add PWM fan " Thierry Reding
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Thierry Reding @ 2026-08-28 11:51 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Thierry Reding, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Jonathan Hunter, devicetree, linux-tegra, linux-kernel

This set of patches adds the thermal zones for Jetson AGX Thor and sets
up the PWM-controlled fan to act as a cooling device.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
Changes in v2:
- move thermal include below DTS subdirectory
- fix device name in commit subject
- fix typo in include guard comment
- Link to v1: https://patch.msgid.link/20260827-tegra264-fan-v1-0-3c55f0c748b1@nvidia.com

To: Thierry Reding <thierry.reding@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: devicetree@vger.kernel.org
Cc: linux-tegra@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

---
Thierry Reding (3):
      arm64: tegra: Add PWM fan on Jetson AGX Thor DevKit
      arm64: tegra: Add thermal zones for Tegra264
      arm64: tegra: Add cooling device on Jetson AGX Thor DevKit

 arch/arm64/boot/dts/nvidia/tegra264-p3834.dtsi     | 32 +++++++++++
 .../boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi | 65 ++++++++++++++++++++++
 arch/arm64/boot/dts/nvidia/tegra264.dtsi           | 29 ++++++++++
 .../boot/dts/nvidia/thermal/nvidia,tegra264-bpmp.h | 20 +++++++
 4 files changed, 146 insertions(+)
---
base-commit: 1aa1ddfbd85b8d7306bfc3e89044f2c0bddbb3af
change-id: 20260817-tegra264-fan-759ee60d0826

Best regards,
--  
Thierry Reding <treding@nvidia.com>


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

* [PATCH v2 1/3] arm64: tegra: Add PWM fan on Jetson AGX Thor DevKit
  2026-08-28 11:51 [PATCH v2 0/3] arm64: tegra: Add cooling device on Jetson AGX Thor DevKit Thierry Reding
@ 2026-08-28 11:51 ` Thierry Reding
  2026-08-28 12:03   ` sashiko-bot
  2026-08-28 11:51 ` [PATCH v2 2/3] arm64: tegra: Add thermal zones for Tegra264 Thierry Reding
  2026-08-28 11:51 ` [PATCH v2 3/3] arm64: tegra: Add cooling device on Jetson AGX Thor DevKit Thierry Reding
  2 siblings, 1 reply; 6+ messages in thread
From: Thierry Reding @ 2026-08-28 11:51 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Thierry Reding, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Jonathan Hunter, devicetree, linux-tegra, linux-kernel

From: Thierry Reding <treding@nvidia.com>

Without a PWM fan device node to actively control the PWM, the fan will
either stop or run at full speed, depending on the state of the PWM when
the controller's clock gets turned off during boot.

One is bad for the system's lifetime and the other is very annoying for
anyone in close proximity to the device, so add the PWM fan in device
tree to fix this.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
Changes in v2:
- fix device name in commit subject
---
 arch/arm64/boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm64/boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi b/arch/arm64/boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi
index 45f8df9bbfd6..4550e843f513 100644
--- a/arch/arm64/boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi
@@ -9,4 +9,17 @@ aliases {
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
+
+	bus@0 {
+		pwm@c6a0000 {
+			status = "okay";
+		};
+	};
+
+	fan: pwm-fan {
+		compatible = "pwm-fan";
+		cooling-levels = <77 102 140 192 255>;
+		pwms = <&pwm4 0 40000>;
+		#cooling-cells = <2>;
+	};
 };

-- 
2.55.0


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

* [PATCH v2 2/3] arm64: tegra: Add thermal zones for Tegra264
  2026-08-28 11:51 [PATCH v2 0/3] arm64: tegra: Add cooling device on Jetson AGX Thor DevKit Thierry Reding
  2026-08-28 11:51 ` [PATCH v2 1/3] arm64: tegra: Add PWM fan " Thierry Reding
@ 2026-08-28 11:51 ` Thierry Reding
  2026-08-28 11:51 ` [PATCH v2 3/3] arm64: tegra: Add cooling device on Jetson AGX Thor DevKit Thierry Reding
  2 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2026-08-28 11:51 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Thierry Reding, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Jonathan Hunter, devicetree, linux-tegra, linux-kernel

From: Thierry Reding <treding@nvidia.com>

Add the thermal zones exposed by the BPMP on Tegra264 so that cooling
devices can be attached to them in board-level DTS files.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
Changes in v2:
- move thermal header below DTS directory
- fix typo in include guard comment
---
 arch/arm64/boot/dts/nvidia/tegra264.dtsi           | 29 ++++++++++++++++++++++
 .../boot/dts/nvidia/thermal/nvidia,tegra264-bpmp.h | 20 +++++++++++++++
 2 files changed, 49 insertions(+)

diff --git a/arch/arm64/boot/dts/nvidia/tegra264.dtsi b/arch/arm64/boot/dts/nvidia/tegra264.dtsi
index 630c20523dcf..953d50af0c08 100644
--- a/arch/arm64/boot/dts/nvidia/tegra264.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra264.dtsi
@@ -7,6 +7,8 @@
 #include <dt-bindings/power/nvidia,tegra264-bpmp.h>
 #include <dt-bindings/reset/nvidia,tegra264.h>
 
+#include "thermal/nvidia,tegra264-bpmp.h"
+
 / {
 	compatible = "nvidia,tegra264";
 	interrupt-parent = <&gic>;
@@ -4625,6 +4627,33 @@ sound {
 		status = "disabled";
 	};
 
+	thermal-zones {
+		cpu-thermal {
+			thermal-sensors = <&{/bpmp/thermal} TEGRA264_THERMAL_ZONE_CPU_MAX>;
+			status = "disabled";
+		};
+
+		gpu-thermal {
+			thermal-sensors = <&{/bpmp/thermal} TEGRA264_THERMAL_ZONE_GPU_MAX>;
+			status = "disabled";
+		};
+
+		soc012-thermal {
+			thermal-sensors = <&{/bpmp/thermal} TEGRA264_THERMAL_ZONE_SOC_012_MAX>;
+			status = "disabled";
+		};
+
+		soc345-thermal {
+			thermal-sensors = <&{/bpmp/thermal} TEGRA264_THERMAL_ZONE_SOC_345_MAX>;
+			status = "disabled";
+		};
+
+		tj-thermal {
+			thermal-sensors = <&{/bpmp/thermal} TEGRA264_THERMAL_ZONE_TJ_MAX>;
+			status = "disabled";
+		};
+	};
+
 	timer {
 		compatible = "arm,armv8-timer";
 		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
diff --git a/arch/arm64/boot/dts/nvidia/thermal/nvidia,tegra264-bpmp.h b/arch/arm64/boot/dts/nvidia/thermal/nvidia,tegra264-bpmp.h
new file mode 100644
index 000000000000..29695881f4cc
--- /dev/null
+++ b/arch/arm64/boot/dts/nvidia/thermal/nvidia,tegra264-bpmp.h
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/* SPDX-FileCopyrightText: Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. */
+
+#ifndef DT_BINDINGS_THERMAL_NVIDIA_TEGRA264_BPMP_H
+#define DT_BINDINGS_THERMAL_NVIDIA_TEGRA264_BPMP_H
+
+#define TEGRA264_THERMAL_ZONE_TJ_MAX		0
+#define TEGRA264_THERMAL_ZONE_TJ_MIN		1
+#define TEGRA264_THERMAL_ZONE_GPU_AVG		2
+#define TEGRA264_THERMAL_ZONE_CPU_AVG		3
+#define TEGRA264_THERMAL_ZONE_SOC_012_AVG	4
+#define TEGRA264_THERMAL_ZONE_SOC_45_AVG	5
+#define TEGRA264_THERMAL_ZONE_SOC_3_AVG		6
+#define TEGRA264_THERMAL_ZONE_GPU_MAX		7
+#define TEGRA264_THERMAL_ZONE_CPU_MAX		8
+#define TEGRA264_THERMAL_ZONE_SOC_012_MAX	9
+#define TEGRA264_THERMAL_ZONE_SOC_345_MAX	10
+#define TEGRA264_THERMAL_ZONE_TJ_AVG		11
+
+#endif /* DT_BINDINGS_THERMAL_NVIDIA_TEGRA264_BPMP_H */

-- 
2.55.0


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

* [PATCH v2 3/3] arm64: tegra: Add cooling device on Jetson AGX Thor DevKit
  2026-08-28 11:51 [PATCH v2 0/3] arm64: tegra: Add cooling device on Jetson AGX Thor DevKit Thierry Reding
  2026-08-28 11:51 ` [PATCH v2 1/3] arm64: tegra: Add PWM fan " Thierry Reding
  2026-08-28 11:51 ` [PATCH v2 2/3] arm64: tegra: Add thermal zones for Tegra264 Thierry Reding
@ 2026-08-28 11:51 ` Thierry Reding
  2026-08-28 12:05   ` sashiko-bot
  2 siblings, 1 reply; 6+ messages in thread
From: Thierry Reding @ 2026-08-28 11:51 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Thierry Reding, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Jonathan Hunter, devicetree, linux-tegra, linux-kernel

From: Thierry Reding <treding@nvidia.com>

Monitor the TJ thermal zone and use the main PWM fan of the Jetson AGX
Thor Developer Kit to actively cool the device if needed.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 arch/arm64/boot/dts/nvidia/tegra264-p3834.dtsi     | 32 +++++++++++++
 .../boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi | 52 ++++++++++++++++++++++
 2 files changed, 84 insertions(+)

diff --git a/arch/arm64/boot/dts/nvidia/tegra264-p3834.dtsi b/arch/arm64/boot/dts/nvidia/tegra264-p3834.dtsi
index 58cd81bc33d7..d4c9f45e03c1 100644
--- a/arch/arm64/boot/dts/nvidia/tegra264-p3834.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra264-p3834.dtsi
@@ -39,4 +39,36 @@ cmdqv@6200000 {
 			status = "okay";
 		};
 	};
+
+	thermal-zones {
+		cpu-thermal {
+			polling-delay-passive = <40>;
+			polling-delay = <1000>;
+			status = "okay";
+		};
+
+		gpu-thermal {
+			polling-delay-passive = <40>;
+			polling-delay = <1000>;
+			status = "okay";
+		};
+
+		soc012-thermal {
+			polling-delay-passive = <40>;
+			polling-delay = <1000>;
+			status = "okay";
+		};
+
+		soc345-thermal {
+			polling-delay-passive = <40>;
+			polling-delay = <1000>;
+			status = "okay";
+		};
+
+		tj-thermal {
+			polling-delay-passive = <40>;
+			polling-delay = <1000>;
+			status = "okay";
+		};
+	};
 };
diff --git a/arch/arm64/boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi b/arch/arm64/boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi
index 4550e843f513..dd042e57839a 100644
--- a/arch/arm64/boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi
@@ -22,4 +22,56 @@ fan: pwm-fan {
 		pwms = <&pwm4 0 40000>;
 		#cooling-cells = <2>;
 	};
+
+	thermal-zones {
+		tj-thermal {
+			trips {
+				tj_trip_active0: active-0 {
+					temperature = <80000>;
+					hysteresis = <0>;
+					type = "active";
+				};
+
+				tj_trip_active1: active-1 {
+					temperature = <86000>;
+					hysteresis = <0>;
+					type = "active";
+				};
+
+				tj_trip_active2: active-2 {
+					temperature = <91000>;
+					hysteresis = <0>;
+					type = "active";
+				};
+
+				tj_trip_active3: active-3 {
+					temperature = <100000>;
+					hysteresis = <0>;
+					type = "active";
+				};
+			};
+
+			cooling-maps {
+				map-active-0 {
+					cooling-device = <&fan 0 1>;
+					trip = <&tj_trip_active0>;
+				};
+
+				map-active-1 {
+					cooling-device = <&fan 1 2>;
+					trip = <&tj_trip_active1>;
+				};
+
+				map-active-2 {
+					cooling-device = <&fan 2 3>;
+					trip = <&tj_trip_active2>;
+				};
+
+				map-active-3 {
+					cooling-device = <&fan 3 4>;
+					trip = <&tj_trip_active3>;
+				};
+			};
+		};
+	};
 };

-- 
2.55.0


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

* Re: [PATCH v2 1/3] arm64: tegra: Add PWM fan on Jetson AGX Thor DevKit
  2026-08-28 11:51 ` [PATCH v2 1/3] arm64: tegra: Add PWM fan " Thierry Reding
@ 2026-08-28 12:03   ` sashiko-bot
  0 siblings, 0 replies; 6+ messages in thread
From: sashiko-bot @ 2026-08-28 12:03 UTC (permalink / raw)
  To: Thierry Reding; +Cc: robh, conor+dt, devicetree

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] Incomplete `pwm@c6a0000` node and unit address collision
- [Low] Missing phandle `&pwm4` causes a fatal DTC build error
--

commit 896b2e4dbdcbabef8cf82b66c7dcabdbec8e9800
Author: Thierry Reding <treding@nvidia.com>

arm64: tegra: Add PWM fan on Jetson AGX Thor DevKit

Add a PWM fan device node to actively control the PWM, preventing it from
stopping or running at full speed during boot when the controller's clock
is turned off.

> diff --git a/arch/arm64/boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi b/arch/arm64/boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi
> index 45f8df9bbfd62..4550e843f513c 100644
> --- a/arch/arm64/boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi
> +++ b/arch/arm64/boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi
> @@ -9,4 +9,17 @@ aliases {
>  	chosen {
>  		stdout-path = "serial0:115200n8";
>  	};
> +
> +	bus@0 {
> +		pwm@c6a0000 {
> +			status = "okay";
> +		};

[Severity: Medium]
Will this node fail to bind the PWM driver? Because the base tegra264.dtsi
does not define this node, it lacks essential properties like compatible,
reg, and #pwm-cells.

Also, does this cause a unit-address collision warning? The base tree already
defines i2c9: i2c@c6a0000 at the exact same address:

arch/arm64/boot/dts/nvidia/tegra264.dtsi:bus@0 {
	...
	i2c9: i2c@c6a0000 {
		compatible = "nvidia,tegra264-i2c";
	...
}

> +	};
> +
> +	fan: pwm-fan {
> +		compatible = "pwm-fan";
> +		cooling-levels = <77 102 140 192 255>;
> +		pwms = <&pwm4 0 40000>;

[Severity: Low]
Does this cause a fatal DTC build error? The label &pwm4 is unresolved
because it is referenced but never defined in tegra264.dtsi or any included
file, resulting in a 'label or path not found' syntax error.

> +		#cooling-cells = <2>;
> +	};
>  };

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260828-tegra264-fan-v2-0-a460389d8ef5@nvidia.com?part=1

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

* Re: [PATCH v2 3/3] arm64: tegra: Add cooling device on Jetson AGX Thor DevKit
  2026-08-28 11:51 ` [PATCH v2 3/3] arm64: tegra: Add cooling device on Jetson AGX Thor DevKit Thierry Reding
@ 2026-08-28 12:05   ` sashiko-bot
  0 siblings, 0 replies; 6+ messages in thread
From: sashiko-bot @ 2026-08-28 12:05 UTC (permalink / raw)
  To: Thierry Reding; +Cc: conor+dt, devicetree, robh

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The 'pwm@c6a0000' node incorrectly reuses the unit address of the 'i2c9' ('i2c@c6a0000') node defined in the base SoC dtsi, and lacks required compatible/reg properties.
- [Low] The device tree references an undefined label '&pwm4' in the 'pwms' property of the 'pwm-fan' node, causing a DTC compilation failure.
--

commit 73950943498e73365e307610b1d8975ecc5959a4
Author: Thierry Reding <treding@nvidia.com>

arm64: tegra: Add cooling device on Jetson AGX Thor DevKit

Monitor the TJ thermal zone and use the main PWM fan of the Jetson AGX
Thor Developer Kit to actively cool the device if needed.

[ ... ]
> diff --git a/arch/arm64/boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi b/arch/arm64/boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi
> index 4550e843f513c..dd042e57839a5 100644
> --- a/arch/arm64/boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi
> +++ b/arch/arm64/boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi

[Severity: Medium]
Will the pwm@c6a0000 node in this file create a node name collision at unit
address @c6a0000?

Looking at the node definition in this file:

	bus@0 {
		pwm@c6a0000 {
			status = "okay";
		};
	};

Could this incorrectly reuse the unit address of the i2c9 (i2c@c6a0000) node
defined in the base SoC dtsi?

Additionally, this node lacks the compatible and reg properties. Will this
prevent the PWM hardware from probing, leaving the newly added fan feature
unconfigured?

> @@ -22,4 +22,56 @@ fan: pwm-fan {
>  		pwms = <&pwm4 0 40000>;

[Severity: Low]
Can this undefined label cause a DTC compilation failure?

Since the base tegra264.dtsi does not define a pwm4 label, will this break
the kernel build with a "Reference to non-existent node or label" error
when building the DTB?

>  		#cooling-cells = <2>;
>  	};
> +
> +	thermal-zones {
[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260828-tegra264-fan-v2-0-a460389d8ef5@nvidia.com?part=3

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

end of thread, other threads:[~2026-08-28 12:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-28 11:51 [PATCH v2 0/3] arm64: tegra: Add cooling device on Jetson AGX Thor DevKit Thierry Reding
2026-08-28 11:51 ` [PATCH v2 1/3] arm64: tegra: Add PWM fan " Thierry Reding
2026-08-28 12:03   ` sashiko-bot
2026-08-28 11:51 ` [PATCH v2 2/3] arm64: tegra: Add thermal zones for Tegra264 Thierry Reding
2026-08-28 11:51 ` [PATCH v2 3/3] arm64: tegra: Add cooling device on Jetson AGX Thor DevKit Thierry Reding
2026-08-28 12:05   ` sashiko-bot

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