public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] arm64: dts: qcom: x1e80100: Fix thermal trip points
@ 2025-02-19 11:36 Stephan Gerhold
  2025-02-19 11:36 ` [PATCH 1/4] arm64: dts: qcom: x1e80100: Fix video thermal zone Stephan Gerhold
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Stephan Gerhold @ 2025-02-19 11:36 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Abel Vesa,
	Rajendra Nayak, Akhil P Oommen, Johan Hovold, linux-arm-msm,
	devicetree, linux-kernel, Neil Armstrong

There are some mistakes in the thermal trip points currently used on
X1E80100. Several of the critical trip points are too high, so the hardware
will trigger an emergency reset before the kernel has the chance to
shutdown cleanly. We're also missing GPU cooling in the device tree, which
prevents running certain GPU-intensive applications without reaching the
critical shutdown temperatures. The CPU on the other hand throttles itself
automatically, so we can just drop the passive trip points there.

This series addresses these problems. It's quite similar to Neil's thermal
zone rework for SM8650 [1], which provides some extra background on the
mechanisms behind the throttling.

[1]: https://lore.kernel.org/linux-arm-msm/20250203-topic-sm8650-thermal-cpu-idle-v4-0-65e35f307301@linaro.org/T/

Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
---
Stephan Gerhold (4):
      arm64: dts: qcom: x1e80100: Fix video thermal zone
      arm64: dts: qcom: x1e80100: Apply consistent critical thermal shutdown
      arm64: dts: qcom: x1e80100: Add GPU cooling
      arm64: dts: qcom: x1e80100: Drop unused passive thermal trip points for CPU

 arch/arm64/boot/dts/qcom/x1e80100.dtsi | 679 ++++++++-------------------------
 1 file changed, 160 insertions(+), 519 deletions(-)
---
base-commit: c177fed7617d6306541305e93e575c0c01600ff0
change-id: 20250218-x1e80100-thermal-fixes-774d08de4e3c

Best regards,
-- 
Stephan Gerhold <stephan.gerhold@linaro.org>


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

* [PATCH 1/4] arm64: dts: qcom: x1e80100: Fix video thermal zone
  2025-02-19 11:36 [PATCH 0/4] arm64: dts: qcom: x1e80100: Fix thermal trip points Stephan Gerhold
@ 2025-02-19 11:36 ` Stephan Gerhold
  2025-02-19 15:28   ` Johan Hovold
  2025-02-20 12:54   ` Konrad Dybcio
  2025-02-19 11:36 ` [PATCH 2/4] arm64: dts: qcom: x1e80100: Apply consistent critical thermal shutdown Stephan Gerhold
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 16+ messages in thread
From: Stephan Gerhold @ 2025-02-19 11:36 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Abel Vesa,
	Rajendra Nayak, Akhil P Oommen, Johan Hovold, linux-arm-msm,
	devicetree, linux-kernel, Neil Armstrong

A passive trip point at 125°C is pretty high, this is usually the
temperature for the critical shutdown trip point. Also, we don't have any
passive cooling devices attached to the video thermal zone.

Change this to be a critical trip point, and add a "hot" trip point at
90°C for consistency with the other thermal zones.

Cc: stable@vger.kernel.org
Fixes: 4e915987ff5b ("arm64: dts: qcom: x1e80100: Enable tsens and thermal zone nodes")
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
---
 arch/arm64/boot/dts/qcom/x1e80100.dtsi | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/x1e80100.dtsi b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
index 9d38436763432892ceef95daf0335d4cf446357c..e349cbf6a2665695b5cc961cf9d53e7182e68e7f 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
@@ -8727,15 +8727,19 @@ mem-critical {
 		};
 
 		video-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens0 12>;
 
 			trips {
 				trip-point0 {
+					temperature = <90000>;
+					hysteresis = <2000>;
+					type = "hot";
+				};
+
+				video-critical {
 					temperature = <125000>;
 					hysteresis = <1000>;
-					type = "passive";
+					type = "critical";
 				};
 			};
 		};

-- 
2.47.2


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

* [PATCH 2/4] arm64: dts: qcom: x1e80100: Apply consistent critical thermal shutdown
  2025-02-19 11:36 [PATCH 0/4] arm64: dts: qcom: x1e80100: Fix thermal trip points Stephan Gerhold
  2025-02-19 11:36 ` [PATCH 1/4] arm64: dts: qcom: x1e80100: Fix video thermal zone Stephan Gerhold
@ 2025-02-19 11:36 ` Stephan Gerhold
  2025-02-19 15:36   ` Johan Hovold
  2025-02-20 12:55   ` Konrad Dybcio
  2025-02-19 11:36 ` [PATCH 3/4] arm64: dts: qcom: x1e80100: Add GPU cooling Stephan Gerhold
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 16+ messages in thread
From: Stephan Gerhold @ 2025-02-19 11:36 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Abel Vesa,
	Rajendra Nayak, Akhil P Oommen, Johan Hovold, linux-arm-msm,
	devicetree, linux-kernel, Neil Armstrong

The firmware configures the TSENS controller with a maximum temperature of
120°C. When reaching that temperature, the hardware automatically triggers
a reset of the entire platform. Some of the thermal zones in x1e80100.dtsi
use a critical trip point of 125°C. It's impossible to reach those.

It's preferable to shut down the system cleanly before reaching the
hardware trip point. Make the critical temperature trip points consistent
by setting all of them to 115°C and apply a consistent hysteresis.
The ACPI tables also specify 115°C as critical shutdown temperature.

Cc: stable@vger.kernel.org
Fixes: 4e915987ff5b ("arm64: dts: qcom: x1e80100: Enable tsens and thermal zone nodes")
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
---
 arch/arm64/boot/dts/qcom/x1e80100.dtsi | 128 ++++++++++++++++-----------------
 1 file changed, 64 insertions(+), 64 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/x1e80100.dtsi b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
index e349cbf6a2665695b5cc961cf9d53e7182e68e7f..9893fa8353f144e0ee723ab5312cd95aadab041d 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
@@ -8457,8 +8457,8 @@ trip-point0 {
 				};
 
 				aoss0-critical {
-					temperature = <125000>;
-					hysteresis = <0>;
+					temperature = <115000>;
+					hysteresis = <1000>;
 					type = "critical";
 				};
 			};
@@ -8483,7 +8483,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -8509,7 +8509,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -8535,7 +8535,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -8561,7 +8561,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -8587,7 +8587,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -8613,7 +8613,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -8639,7 +8639,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -8665,7 +8665,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -8683,8 +8683,8 @@ trip-point0 {
 				};
 
 				cpuss2-critical {
-					temperature = <125000>;
-					hysteresis = <0>;
+					temperature = <115000>;
+					hysteresis = <1000>;
 					type = "critical";
 				};
 			};
@@ -8701,8 +8701,8 @@ trip-point0 {
 				};
 
 				cpuss2-critical {
-					temperature = <125000>;
-					hysteresis = <0>;
+					temperature = <115000>;
+					hysteresis = <1000>;
 					type = "critical";
 				};
 			};
@@ -8719,7 +8719,7 @@ trip-point0 {
 				};
 
 				mem-critical {
-					temperature = <125000>;
+					temperature = <115000>;
 					hysteresis = <0>;
 					type = "critical";
 				};
@@ -8737,7 +8737,7 @@ trip-point0 {
 				};
 
 				video-critical {
-					temperature = <125000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -8755,8 +8755,8 @@ trip-point0 {
 				};
 
 				aoss0-critical {
-					temperature = <125000>;
-					hysteresis = <0>;
+					temperature = <115000>;
+					hysteresis = <1000>;
 					type = "critical";
 				};
 			};
@@ -8781,7 +8781,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -8807,7 +8807,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -8833,7 +8833,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -8859,7 +8859,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -8885,7 +8885,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -8911,7 +8911,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -8937,7 +8937,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -8963,7 +8963,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -8981,8 +8981,8 @@ trip-point0 {
 				};
 
 				cpuss2-critical {
-					temperature = <125000>;
-					hysteresis = <0>;
+					temperature = <115000>;
+					hysteresis = <1000>;
 					type = "critical";
 				};
 			};
@@ -8999,8 +8999,8 @@ trip-point0 {
 				};
 
 				cpuss2-critical {
-					temperature = <125000>;
-					hysteresis = <0>;
+					temperature = <115000>;
+					hysteresis = <1000>;
 					type = "critical";
 				};
 			};
@@ -9017,8 +9017,8 @@ trip-point0 {
 				};
 
 				aoss0-critical {
-					temperature = <125000>;
-					hysteresis = <0>;
+					temperature = <115000>;
+					hysteresis = <1000>;
 					type = "critical";
 				};
 			};
@@ -9043,7 +9043,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -9069,7 +9069,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -9095,7 +9095,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -9121,7 +9121,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -9147,7 +9147,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -9173,7 +9173,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -9199,7 +9199,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -9225,7 +9225,7 @@ trip-point1 {
 				};
 
 				cpu-critical {
-					temperature = <110000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -9243,8 +9243,8 @@ trip-point0 {
 				};
 
 				cpuss2-critical {
-					temperature = <125000>;
-					hysteresis = <0>;
+					temperature = <115000>;
+					hysteresis = <1000>;
 					type = "critical";
 				};
 			};
@@ -9261,8 +9261,8 @@ trip-point0 {
 				};
 
 				cpuss2-critical {
-					temperature = <125000>;
-					hysteresis = <0>;
+					temperature = <115000>;
+					hysteresis = <1000>;
 					type = "critical";
 				};
 			};
@@ -9279,8 +9279,8 @@ trip-point0 {
 				};
 
 				aoss0-critical {
-					temperature = <125000>;
-					hysteresis = <0>;
+					temperature = <115000>;
+					hysteresis = <1000>;
 					type = "critical";
 				};
 			};
@@ -9297,8 +9297,8 @@ trip-point0 {
 				};
 
 				nsp0-critical {
-					temperature = <125000>;
-					hysteresis = <0>;
+					temperature = <115000>;
+					hysteresis = <1000>;
 					type = "critical";
 				};
 			};
@@ -9315,8 +9315,8 @@ trip-point0 {
 				};
 
 				nsp1-critical {
-					temperature = <125000>;
-					hysteresis = <0>;
+					temperature = <115000>;
+					hysteresis = <1000>;
 					type = "critical";
 				};
 			};
@@ -9333,8 +9333,8 @@ trip-point0 {
 				};
 
 				nsp2-critical {
-					temperature = <125000>;
-					hysteresis = <0>;
+					temperature = <115000>;
+					hysteresis = <1000>;
 					type = "critical";
 				};
 			};
@@ -9351,8 +9351,8 @@ trip-point0 {
 				};
 
 				nsp3-critical {
-					temperature = <125000>;
-					hysteresis = <0>;
+					temperature = <115000>;
+					hysteresis = <1000>;
 					type = "critical";
 				};
 			};
@@ -9377,7 +9377,7 @@ trip-point1 {
 				};
 
 				trip-point2 {
-					temperature = <125000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -9403,7 +9403,7 @@ trip-point1 {
 				};
 
 				trip-point2 {
-					temperature = <125000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -9429,7 +9429,7 @@ trip-point1 {
 				};
 
 				trip-point2 {
-					temperature = <125000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -9455,7 +9455,7 @@ trip-point1 {
 				};
 
 				trip-point2 {
-					temperature = <125000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -9481,7 +9481,7 @@ trip-point1 {
 				};
 
 				trip-point2 {
-					temperature = <125000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -9507,7 +9507,7 @@ trip-point1 {
 				};
 
 				trip-point2 {
-					temperature = <125000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -9533,7 +9533,7 @@ trip-point1 {
 				};
 
 				trip-point2 {
-					temperature = <125000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -9559,7 +9559,7 @@ trip-point1 {
 				};
 
 				trip-point2 {
-					temperature = <125000>;
+					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
 				};
@@ -9578,7 +9578,7 @@ trip-point0 {
 
 				camera0-critical {
 					temperature = <115000>;
-					hysteresis = <0>;
+					hysteresis = <1000>;
 					type = "critical";
 				};
 			};
@@ -9596,7 +9596,7 @@ trip-point0 {
 
 				camera0-critical {
 					temperature = <115000>;
-					hysteresis = <0>;
+					hysteresis = <1000>;
 					type = "critical";
 				};
 			};

-- 
2.47.2


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

* [PATCH 3/4] arm64: dts: qcom: x1e80100: Add GPU cooling
  2025-02-19 11:36 [PATCH 0/4] arm64: dts: qcom: x1e80100: Fix thermal trip points Stephan Gerhold
  2025-02-19 11:36 ` [PATCH 1/4] arm64: dts: qcom: x1e80100: Fix video thermal zone Stephan Gerhold
  2025-02-19 11:36 ` [PATCH 2/4] arm64: dts: qcom: x1e80100: Apply consistent critical thermal shutdown Stephan Gerhold
@ 2025-02-19 11:36 ` Stephan Gerhold
  2025-02-19 15:42   ` Johan Hovold
  2025-02-21 19:35   ` Konrad Dybcio
  2025-02-19 11:36 ` [PATCH 4/4] arm64: dts: qcom: x1e80100: Drop unused passive thermal trip points for CPU Stephan Gerhold
  2025-03-04 17:00 ` [PATCH 0/4] arm64: dts: qcom: x1e80100: Fix thermal trip points Bjorn Andersson
  4 siblings, 2 replies; 16+ messages in thread
From: Stephan Gerhold @ 2025-02-19 11:36 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Abel Vesa,
	Rajendra Nayak, Akhil P Oommen, Johan Hovold, linux-arm-msm,
	devicetree, linux-kernel, Neil Armstrong

Unlike the CPU, the GPU does not throttle its speed automatically when it
reaches high temperatures. With certain high GPU loads it is possible to
reach the critical hardware shutdown temperature of 120°C, endangering the
hardware and making it impossible to run certain applications.

Set up GPU cooling similar to the ACPI tables, by throttling the GPU speed
when reaching 95°C and polling every 200ms.

Cc: stable@vger.kernel.org
Fixes: 721e38301b79 ("arm64: dts: qcom: x1e80100: Add gpu support")
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
---
 arch/arm64/boot/dts/qcom/x1e80100.dtsi | 169 +++++++++++++++++----------------
 1 file changed, 89 insertions(+), 80 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/x1e80100.dtsi b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
index 9893fa8353f144e0ee723ab5312cd95aadab041d..a0d4be29a489618a152f79d15a847338271f12d4 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
@@ -20,6 +20,7 @@
 #include <dt-bindings/soc/qcom,gpr.h>
 #include <dt-bindings/soc/qcom,rpmh-rsc.h>
 #include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h>
+#include <dt-bindings/thermal/thermal.h>
 
 / {
 	interrupt-parent = <&intc>;
@@ -9359,24 +9360,25 @@ nsp3-critical {
 		};
 
 		gpuss-0-thermal {
-			polling-delay-passive = <10>;
+			polling-delay-passive = <200>;
 
 			thermal-sensors = <&tsens3 5>;
 
-			trips {
-				trip-point0 {
-					temperature = <85000>;
-					hysteresis = <1000>;
-					type = "passive";
+			cooling-maps {
+				map0 {
+					trip = <&gpuss0_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
 				};
+			};
 
-				trip-point1 {
-					temperature = <90000>;
+			trips {
+				gpuss0_alert0: trip-point0 {
+					temperature = <95000>;
 					hysteresis = <1000>;
-					type = "hot";
+					type = "passive";
 				};
 
-				trip-point2 {
+				gpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
@@ -9385,24 +9387,25 @@ trip-point2 {
 		};
 
 		gpuss-1-thermal {
-			polling-delay-passive = <10>;
+			polling-delay-passive = <200>;
 
 			thermal-sensors = <&tsens3 6>;
 
-			trips {
-				trip-point0 {
-					temperature = <85000>;
-					hysteresis = <1000>;
-					type = "passive";
+			cooling-maps {
+				map0 {
+					trip = <&gpuss1_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
 				};
+			};
 
-				trip-point1 {
-					temperature = <90000>;
+			trips {
+				gpuss1_alert0: trip-point0 {
+					temperature = <95000>;
 					hysteresis = <1000>;
-					type = "hot";
+					type = "passive";
 				};
 
-				trip-point2 {
+				gpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
@@ -9411,24 +9414,25 @@ trip-point2 {
 		};
 
 		gpuss-2-thermal {
-			polling-delay-passive = <10>;
+			polling-delay-passive = <200>;
 
 			thermal-sensors = <&tsens3 7>;
 
-			trips {
-				trip-point0 {
-					temperature = <85000>;
-					hysteresis = <1000>;
-					type = "passive";
+			cooling-maps {
+				map0 {
+					trip = <&gpuss2_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
 				};
+			};
 
-				trip-point1 {
-					temperature = <90000>;
+			trips {
+				gpuss2_alert0: trip-point0 {
+					temperature = <95000>;
 					hysteresis = <1000>;
-					type = "hot";
+					type = "passive";
 				};
 
-				trip-point2 {
+				gpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
@@ -9437,24 +9441,25 @@ trip-point2 {
 		};
 
 		gpuss-3-thermal {
-			polling-delay-passive = <10>;
+			polling-delay-passive = <200>;
 
 			thermal-sensors = <&tsens3 8>;
 
-			trips {
-				trip-point0 {
-					temperature = <85000>;
-					hysteresis = <1000>;
-					type = "passive";
+			cooling-maps {
+				map0 {
+					trip = <&gpuss3_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
 				};
+			};
 
-				trip-point1 {
-					temperature = <90000>;
+			trips {
+				gpuss3_alert0: trip-point0 {
+					temperature = <95000>;
 					hysteresis = <1000>;
-					type = "hot";
+					type = "passive";
 				};
 
-				trip-point2 {
+				gpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
@@ -9463,24 +9468,25 @@ trip-point2 {
 		};
 
 		gpuss-4-thermal {
-			polling-delay-passive = <10>;
+			polling-delay-passive = <200>;
 
 			thermal-sensors = <&tsens3 9>;
 
-			trips {
-				trip-point0 {
-					temperature = <85000>;
-					hysteresis = <1000>;
-					type = "passive";
+			cooling-maps {
+				map0 {
+					trip = <&gpuss4_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
 				};
+			};
 
-				trip-point1 {
-					temperature = <90000>;
+			trips {
+				gpuss4_alert0: trip-point0 {
+					temperature = <95000>;
 					hysteresis = <1000>;
-					type = "hot";
+					type = "passive";
 				};
 
-				trip-point2 {
+				gpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
@@ -9489,24 +9495,25 @@ trip-point2 {
 		};
 
 		gpuss-5-thermal {
-			polling-delay-passive = <10>;
+			polling-delay-passive = <200>;
 
 			thermal-sensors = <&tsens3 10>;
 
-			trips {
-				trip-point0 {
-					temperature = <85000>;
-					hysteresis = <1000>;
-					type = "passive";
+			cooling-maps {
+				map0 {
+					trip = <&gpuss5_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
 				};
+			};
 
-				trip-point1 {
-					temperature = <90000>;
+			trips {
+				gpuss5_alert0: trip-point0 {
+					temperature = <95000>;
 					hysteresis = <1000>;
-					type = "hot";
+					type = "passive";
 				};
 
-				trip-point2 {
+				gpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
@@ -9515,24 +9522,25 @@ trip-point2 {
 		};
 
 		gpuss-6-thermal {
-			polling-delay-passive = <10>;
+			polling-delay-passive = <200>;
 
 			thermal-sensors = <&tsens3 11>;
 
-			trips {
-				trip-point0 {
-					temperature = <85000>;
-					hysteresis = <1000>;
-					type = "passive";
+			cooling-maps {
+				map0 {
+					trip = <&gpuss6_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
 				};
+			};
 
-				trip-point1 {
-					temperature = <90000>;
+			trips {
+				gpuss6_alert0: trip-point0 {
+					temperature = <95000>;
 					hysteresis = <1000>;
-					type = "hot";
+					type = "passive";
 				};
 
-				trip-point2 {
+				gpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";
@@ -9541,24 +9549,25 @@ trip-point2 {
 		};
 
 		gpuss-7-thermal {
-			polling-delay-passive = <10>;
+			polling-delay-passive = <200>;
 
 			thermal-sensors = <&tsens3 12>;
 
-			trips {
-				trip-point0 {
-					temperature = <85000>;
-					hysteresis = <1000>;
-					type = "passive";
+			cooling-maps {
+				map0 {
+					trip = <&gpuss7_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
 				};
+			};
 
-				trip-point1 {
-					temperature = <90000>;
+			trips {
+				gpuss7_alert0: trip-point0 {
+					temperature = <95000>;
 					hysteresis = <1000>;
-					type = "hot";
+					type = "passive";
 				};
 
-				trip-point2 {
+				gpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
 					type = "critical";

-- 
2.47.2


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

* [PATCH 4/4] arm64: dts: qcom: x1e80100: Drop unused passive thermal trip points for CPU
  2025-02-19 11:36 [PATCH 0/4] arm64: dts: qcom: x1e80100: Fix thermal trip points Stephan Gerhold
                   ` (2 preceding siblings ...)
  2025-02-19 11:36 ` [PATCH 3/4] arm64: dts: qcom: x1e80100: Add GPU cooling Stephan Gerhold
@ 2025-02-19 11:36 ` Stephan Gerhold
  2025-02-19 15:47   ` Johan Hovold
  2025-02-21 19:36   ` Konrad Dybcio
  2025-03-04 17:00 ` [PATCH 0/4] arm64: dts: qcom: x1e80100: Fix thermal trip points Bjorn Andersson
  4 siblings, 2 replies; 16+ messages in thread
From: Stephan Gerhold @ 2025-02-19 11:36 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Abel Vesa,
	Rajendra Nayak, Akhil P Oommen, Johan Hovold, linux-arm-msm,
	devicetree, linux-kernel, Neil Armstrong

There are currently two passive trip points defined for the CPU, but no
cooling devices are attached to the thermal zones. We don't have support
for cpufreq upstream yet, but actually this is redundant anyway because the
CPU is throttled automatically when reaching high temperatures.

Drop the passive trip points and keep just the critical shutdown as safety
measure in case the throttling fails.

Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
---
 arch/arm64/boot/dts/qcom/x1e80100.dtsi | 372 ---------------------------------
 1 file changed, 372 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/x1e80100.dtsi b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
index a0d4be29a489618a152f79d15a847338271f12d4..53512e7a413ddcd8cb53996a04c27d9094d8d4c0 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
@@ -8466,23 +8466,9 @@ aoss0-critical {
 		};
 
 		cpu0-0-top-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens0 1>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -8492,23 +8478,9 @@ cpu-critical {
 		};
 
 		cpu0-0-btm-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens0 2>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -8518,23 +8490,9 @@ cpu-critical {
 		};
 
 		cpu0-1-top-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens0 3>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -8544,23 +8502,9 @@ cpu-critical {
 		};
 
 		cpu0-1-btm-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens0 4>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -8570,23 +8514,9 @@ cpu-critical {
 		};
 
 		cpu0-2-top-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens0 5>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -8596,23 +8526,9 @@ cpu-critical {
 		};
 
 		cpu0-2-btm-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens0 6>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -8622,23 +8538,9 @@ cpu-critical {
 		};
 
 		cpu0-3-top-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens0 7>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -8648,23 +8550,9 @@ cpu-critical {
 		};
 
 		cpu0-3-btm-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens0 8>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -8677,12 +8565,6 @@ cpuss0-top-thermal {
 			thermal-sensors = <&tsens0 9>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "hot";
-				};
-
 				cpuss2-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -8695,12 +8577,6 @@ cpuss0-btm-thermal {
 			thermal-sensors = <&tsens0 10>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "hot";
-				};
-
 				cpuss2-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -8764,23 +8640,9 @@ aoss0-critical {
 		};
 
 		cpu1-0-top-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens1 1>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -8790,23 +8652,9 @@ cpu-critical {
 		};
 
 		cpu1-0-btm-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens1 2>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -8816,23 +8664,9 @@ cpu-critical {
 		};
 
 		cpu1-1-top-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens1 3>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -8842,23 +8676,9 @@ cpu-critical {
 		};
 
 		cpu1-1-btm-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens1 4>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -8868,23 +8688,9 @@ cpu-critical {
 		};
 
 		cpu1-2-top-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens1 5>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -8894,23 +8700,9 @@ cpu-critical {
 		};
 
 		cpu1-2-btm-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens1 6>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -8920,23 +8712,9 @@ cpu-critical {
 		};
 
 		cpu1-3-top-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens1 7>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -8946,23 +8724,9 @@ cpu-critical {
 		};
 
 		cpu1-3-btm-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens1 8>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -8975,12 +8739,6 @@ cpuss1-top-thermal {
 			thermal-sensors = <&tsens1 9>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "hot";
-				};
-
 				cpuss2-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -8993,12 +8751,6 @@ cpuss1-btm-thermal {
 			thermal-sensors = <&tsens1 10>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "hot";
-				};
-
 				cpuss2-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -9026,23 +8778,9 @@ aoss0-critical {
 		};
 
 		cpu2-0-top-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens2 1>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -9052,23 +8790,9 @@ cpu-critical {
 		};
 
 		cpu2-0-btm-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens2 2>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -9078,23 +8802,9 @@ cpu-critical {
 		};
 
 		cpu2-1-top-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens2 3>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -9104,23 +8814,9 @@ cpu-critical {
 		};
 
 		cpu2-1-btm-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens2 4>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -9130,23 +8826,9 @@ cpu-critical {
 		};
 
 		cpu2-2-top-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens2 5>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -9156,23 +8838,9 @@ cpu-critical {
 		};
 
 		cpu2-2-btm-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens2 6>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -9182,23 +8850,9 @@ cpu-critical {
 		};
 
 		cpu2-3-top-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens2 7>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -9208,23 +8862,9 @@ cpu-critical {
 		};
 
 		cpu2-3-btm-thermal {
-			polling-delay-passive = <250>;
-
 			thermal-sensors = <&tsens2 8>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
-				trip-point1 {
-					temperature = <95000>;
-					hysteresis = <2000>;
-					type = "passive";
-				};
-
 				cpu-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -9237,12 +8877,6 @@ cpuss2-top-thermal {
 			thermal-sensors = <&tsens2 9>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "hot";
-				};
-
 				cpuss2-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;
@@ -9255,12 +8889,6 @@ cpuss2-btm-thermal {
 			thermal-sensors = <&tsens2 10>;
 
 			trips {
-				trip-point0 {
-					temperature = <90000>;
-					hysteresis = <2000>;
-					type = "hot";
-				};
-
 				cpuss2-critical {
 					temperature = <115000>;
 					hysteresis = <1000>;

-- 
2.47.2


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

* Re: [PATCH 1/4] arm64: dts: qcom: x1e80100: Fix video thermal zone
  2025-02-19 11:36 ` [PATCH 1/4] arm64: dts: qcom: x1e80100: Fix video thermal zone Stephan Gerhold
@ 2025-02-19 15:28   ` Johan Hovold
  2025-02-19 16:22     ` Stephan Gerhold
  2025-02-20 12:54   ` Konrad Dybcio
  1 sibling, 1 reply; 16+ messages in thread
From: Johan Hovold @ 2025-02-19 15:28 UTC (permalink / raw)
  To: Stephan Gerhold
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Abel Vesa, Rajendra Nayak, Akhil P Oommen,
	linux-arm-msm, devicetree, linux-kernel, Neil Armstrong

On Wed, Feb 19, 2025 at 12:36:18PM +0100, Stephan Gerhold wrote:
> A passive trip point at 125°C is pretty high, this is usually the
> temperature for the critical shutdown trip point. Also, we don't have any
> passive cooling devices attached to the video thermal zone.
> 
> Change this to be a critical trip point, and add a "hot" trip point at
> 90°C for consistency with the other thermal zones.
> 
> Cc: stable@vger.kernel.org

Perhaps not needed since we don't have a video driver enabled yet.

> Fixes: 4e915987ff5b ("arm64: dts: qcom: x1e80100: Enable tsens and thermal zone nodes")
> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>

Looks to good to me either way:

Reviewed-by: Johan Hovold <johan+linaro@kernel.org>

Johan

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

* Re: [PATCH 2/4] arm64: dts: qcom: x1e80100: Apply consistent critical thermal shutdown
  2025-02-19 11:36 ` [PATCH 2/4] arm64: dts: qcom: x1e80100: Apply consistent critical thermal shutdown Stephan Gerhold
@ 2025-02-19 15:36   ` Johan Hovold
  2025-02-19 16:28     ` Stephan Gerhold
  2025-02-20 12:55   ` Konrad Dybcio
  1 sibling, 1 reply; 16+ messages in thread
From: Johan Hovold @ 2025-02-19 15:36 UTC (permalink / raw)
  To: Stephan Gerhold
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Abel Vesa, Rajendra Nayak, Akhil P Oommen,
	linux-arm-msm, devicetree, linux-kernel, Neil Armstrong

On Wed, Feb 19, 2025 at 12:36:19PM +0100, Stephan Gerhold wrote:
> The firmware configures the TSENS controller with a maximum temperature of
> 120°C. When reaching that temperature, the hardware automatically triggers
> a reset of the entire platform. Some of the thermal zones in x1e80100.dtsi
> use a critical trip point of 125°C. It's impossible to reach those.
> 
> It's preferable to shut down the system cleanly before reaching the
> hardware trip point. Make the critical temperature trip points consistent
> by setting all of them to 115°C and apply a consistent hysteresis.
> The ACPI tables also specify 115°C as critical shutdown temperature.
> 
> Cc: stable@vger.kernel.org
> Fixes: 4e915987ff5b ("arm64: dts: qcom: x1e80100: Enable tsens and thermal zone nodes")
> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>

> @@ -8483,7 +8483,7 @@ trip-point1 {
>  				};
>  
>  				cpu-critical {
> -					temperature = <110000>;
> +					temperature = <115000>;

Have you asked the authors where this lower limit came from (or
determined it was just copy pasta some other way)?

>  					hysteresis = <1000>;
>  					type = "critical";
>  				};

> @@ -8737,7 +8737,7 @@ trip-point0 {
>  				};
>  
>  				video-critical {
> -					temperature = <125000>;
> +					temperature = <115000>;
>  					hysteresis = <1000>;
>  					type = "critical";
>  				};

Ok, make sense to backport the first patch as well then.

Looks good to me:

Reviewed-by: Johan Hovold <johan+linaro@kernel.org>

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

* Re: [PATCH 3/4] arm64: dts: qcom: x1e80100: Add GPU cooling
  2025-02-19 11:36 ` [PATCH 3/4] arm64: dts: qcom: x1e80100: Add GPU cooling Stephan Gerhold
@ 2025-02-19 15:42   ` Johan Hovold
  2025-02-21 19:35   ` Konrad Dybcio
  1 sibling, 0 replies; 16+ messages in thread
From: Johan Hovold @ 2025-02-19 15:42 UTC (permalink / raw)
  To: Stephan Gerhold
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Abel Vesa, Rajendra Nayak, Akhil P Oommen,
	linux-arm-msm, devicetree, linux-kernel, Neil Armstrong

On Wed, Feb 19, 2025 at 12:36:20PM +0100, Stephan Gerhold wrote:
> Unlike the CPU, the GPU does not throttle its speed automatically when it
> reaches high temperatures. With certain high GPU loads it is possible to
> reach the critical hardware shutdown temperature of 120°C, endangering the
> hardware and making it impossible to run certain applications.
> 
> Set up GPU cooling similar to the ACPI tables, by throttling the GPU speed
> when reaching 95°C and polling every 200ms.
> 
> Cc: stable@vger.kernel.org
> Fixes: 721e38301b79 ("arm64: dts: qcom: x1e80100: Add gpu support")
> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>

Thanks for fixing this, looks good to me:

Reviewed-by: Johan Hovold <johan+linaro@kernel.org>

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

* Re: [PATCH 4/4] arm64: dts: qcom: x1e80100: Drop unused passive thermal trip points for CPU
  2025-02-19 11:36 ` [PATCH 4/4] arm64: dts: qcom: x1e80100: Drop unused passive thermal trip points for CPU Stephan Gerhold
@ 2025-02-19 15:47   ` Johan Hovold
  2025-02-21 19:36   ` Konrad Dybcio
  1 sibling, 0 replies; 16+ messages in thread
From: Johan Hovold @ 2025-02-19 15:47 UTC (permalink / raw)
  To: Stephan Gerhold
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Abel Vesa, Rajendra Nayak, Akhil P Oommen,
	linux-arm-msm, devicetree, linux-kernel, Neil Armstrong

On Wed, Feb 19, 2025 at 12:36:21PM +0100, Stephan Gerhold wrote:
> There are currently two passive trip points defined for the CPU, but no
> cooling devices are attached to the thermal zones. We don't have support
> for cpufreq upstream yet, but actually this is redundant anyway because the
> CPU is throttled automatically when reaching high temperatures.
> 
> Drop the passive trip points and keep just the critical shutdown as safety
> measure in case the throttling fails.
> 
> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>

Looks good. Perhaps we should backport this one as well in case the
current passive trip points cause unnecessary work to done for no
reason.

Either way:

Reviewed-by: Johan Hovold <johan+linaro@kernel.org>

Johan

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

* Re: [PATCH 1/4] arm64: dts: qcom: x1e80100: Fix video thermal zone
  2025-02-19 15:28   ` Johan Hovold
@ 2025-02-19 16:22     ` Stephan Gerhold
  0 siblings, 0 replies; 16+ messages in thread
From: Stephan Gerhold @ 2025-02-19 16:22 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Abel Vesa, Rajendra Nayak, Akhil P Oommen,
	linux-arm-msm, devicetree, linux-kernel, Neil Armstrong

On Wed, Feb 19, 2025 at 04:28:30PM +0100, Johan Hovold wrote:
> On Wed, Feb 19, 2025 at 12:36:18PM +0100, Stephan Gerhold wrote:
> > A passive trip point at 125°C is pretty high, this is usually the
> > temperature for the critical shutdown trip point. Also, we don't have any
> > passive cooling devices attached to the video thermal zone.
> > 
> > Change this to be a critical trip point, and add a "hot" trip point at
> > 90°C for consistency with the other thermal zones.
> > 
> > Cc: stable@vger.kernel.org
> 
> Perhaps not needed since we don't have a video driver enabled yet.
> 

It will be needed to backport the next patch (and reordering the patches
wouldn't have made sense).

> > Fixes: 4e915987ff5b ("arm64: dts: qcom: x1e80100: Enable tsens and thermal zone nodes")
> > Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> 
> Looks to good to me either way:
> 
> Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
> 

Thanks!
Stephan

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

* Re: [PATCH 2/4] arm64: dts: qcom: x1e80100: Apply consistent critical thermal shutdown
  2025-02-19 15:36   ` Johan Hovold
@ 2025-02-19 16:28     ` Stephan Gerhold
  0 siblings, 0 replies; 16+ messages in thread
From: Stephan Gerhold @ 2025-02-19 16:28 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Abel Vesa, Rajendra Nayak, Akhil P Oommen,
	linux-arm-msm, devicetree, linux-kernel, Neil Armstrong

On Wed, Feb 19, 2025 at 04:36:45PM +0100, Johan Hovold wrote:
> On Wed, Feb 19, 2025 at 12:36:19PM +0100, Stephan Gerhold wrote:
> > The firmware configures the TSENS controller with a maximum temperature of
> > 120°C. When reaching that temperature, the hardware automatically triggers
> > a reset of the entire platform. Some of the thermal zones in x1e80100.dtsi
> > use a critical trip point of 125°C. It's impossible to reach those.
> > 
> > It's preferable to shut down the system cleanly before reaching the
> > hardware trip point. Make the critical temperature trip points consistent
> > by setting all of them to 115°C and apply a consistent hysteresis.
> > The ACPI tables also specify 115°C as critical shutdown temperature.
> > 
> > Cc: stable@vger.kernel.org
> > Fixes: 4e915987ff5b ("arm64: dts: qcom: x1e80100: Enable tsens and thermal zone nodes")
> > Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> 
> > @@ -8483,7 +8483,7 @@ trip-point1 {
> >  				};
> >  
> >  				cpu-critical {
> > -					temperature = <110000>;
> > +					temperature = <115000>;
> 
> Have you asked the authors where this lower limit came from (or
> determined it was just copy pasta some other way)?
> 

I haven't asked before sending the patch, but it looks like copy-paste
from sm8550.dtsi. That one also has these weird double passive trip
points for the CPU, which are dropped for x1e80100.dtsi in the last
patch of this series. Rajendra and Abel are in the Cc though in case
they would like to comment. :-)

> >  					hysteresis = <1000>;
> >  					type = "critical";
> >  				};
> 
> > @@ -8737,7 +8737,7 @@ trip-point0 {
> >  				};
> >  
> >  				video-critical {
> > -					temperature = <125000>;
> > +					temperature = <115000>;
> >  					hysteresis = <1000>;
> >  					type = "critical";
> >  				};
> 
> Ok, make sense to backport the first patch as well then.
> 

Exactly. :D

> Looks good to me:
> 
> Reviewed-by: Johan Hovold <johan+linaro@kernel.org>

Thanks!
Stephan

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

* Re: [PATCH 1/4] arm64: dts: qcom: x1e80100: Fix video thermal zone
  2025-02-19 11:36 ` [PATCH 1/4] arm64: dts: qcom: x1e80100: Fix video thermal zone Stephan Gerhold
  2025-02-19 15:28   ` Johan Hovold
@ 2025-02-20 12:54   ` Konrad Dybcio
  1 sibling, 0 replies; 16+ messages in thread
From: Konrad Dybcio @ 2025-02-20 12:54 UTC (permalink / raw)
  To: Stephan Gerhold, Bjorn Andersson, Konrad Dybcio
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Abel Vesa,
	Rajendra Nayak, Akhil P Oommen, Johan Hovold, linux-arm-msm,
	devicetree, linux-kernel, Neil Armstrong

On 19.02.2025 12:36 PM, Stephan Gerhold wrote:
> A passive trip point at 125°C is pretty high, this is usually the
> temperature for the critical shutdown trip point. Also, we don't have any
> passive cooling devices attached to the video thermal zone.
> 
> Change this to be a critical trip point, and add a "hot" trip point at
> 90°C for consistency with the other thermal zones.
> 
> Cc: stable@vger.kernel.org
> Fixes: 4e915987ff5b ("arm64: dts: qcom: x1e80100: Enable tsens and thermal zone nodes")
> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH 2/4] arm64: dts: qcom: x1e80100: Apply consistent critical thermal shutdown
  2025-02-19 11:36 ` [PATCH 2/4] arm64: dts: qcom: x1e80100: Apply consistent critical thermal shutdown Stephan Gerhold
  2025-02-19 15:36   ` Johan Hovold
@ 2025-02-20 12:55   ` Konrad Dybcio
  1 sibling, 0 replies; 16+ messages in thread
From: Konrad Dybcio @ 2025-02-20 12:55 UTC (permalink / raw)
  To: Stephan Gerhold, Bjorn Andersson, Konrad Dybcio
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Abel Vesa,
	Rajendra Nayak, Akhil P Oommen, Johan Hovold, linux-arm-msm,
	devicetree, linux-kernel, Neil Armstrong

On 19.02.2025 12:36 PM, Stephan Gerhold wrote:
> The firmware configures the TSENS controller with a maximum temperature of
> 120°C. When reaching that temperature, the hardware automatically triggers
> a reset of the entire platform. Some of the thermal zones in x1e80100.dtsi
> use a critical trip point of 125°C. It's impossible to reach those.
> 
> It's preferable to shut down the system cleanly before reaching the
> hardware trip point. Make the critical temperature trip points consistent
> by setting all of them to 115°C and apply a consistent hysteresis.
> The ACPI tables also specify 115°C as critical shutdown temperature.
> 
> Cc: stable@vger.kernel.org
> Fixes: 4e915987ff5b ("arm64: dts: qcom: x1e80100: Enable tsens and thermal zone nodes")
> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH 3/4] arm64: dts: qcom: x1e80100: Add GPU cooling
  2025-02-19 11:36 ` [PATCH 3/4] arm64: dts: qcom: x1e80100: Add GPU cooling Stephan Gerhold
  2025-02-19 15:42   ` Johan Hovold
@ 2025-02-21 19:35   ` Konrad Dybcio
  1 sibling, 0 replies; 16+ messages in thread
From: Konrad Dybcio @ 2025-02-21 19:35 UTC (permalink / raw)
  To: Stephan Gerhold, Bjorn Andersson, Konrad Dybcio
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Abel Vesa,
	Rajendra Nayak, Akhil P Oommen, Johan Hovold, linux-arm-msm,
	devicetree, linux-kernel, Neil Armstrong

On 19.02.2025 12:36 PM, Stephan Gerhold wrote:
> Unlike the CPU, the GPU does not throttle its speed automatically when it
> reaches high temperatures. With certain high GPU loads it is possible to
> reach the critical hardware shutdown temperature of 120°C, endangering the
> hardware and making it impossible to run certain applications.
> 
> Set up GPU cooling similar to the ACPI tables, by throttling the GPU speed
> when reaching 95°C and polling every 200ms.
> 
> Cc: stable@vger.kernel.org
> Fixes: 721e38301b79 ("arm64: dts: qcom: x1e80100: Add gpu support")
> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH 4/4] arm64: dts: qcom: x1e80100: Drop unused passive thermal trip points for CPU
  2025-02-19 11:36 ` [PATCH 4/4] arm64: dts: qcom: x1e80100: Drop unused passive thermal trip points for CPU Stephan Gerhold
  2025-02-19 15:47   ` Johan Hovold
@ 2025-02-21 19:36   ` Konrad Dybcio
  1 sibling, 0 replies; 16+ messages in thread
From: Konrad Dybcio @ 2025-02-21 19:36 UTC (permalink / raw)
  To: Stephan Gerhold, Bjorn Andersson, Konrad Dybcio
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Abel Vesa,
	Rajendra Nayak, Akhil P Oommen, Johan Hovold, linux-arm-msm,
	devicetree, linux-kernel, Neil Armstrong

On 19.02.2025 12:36 PM, Stephan Gerhold wrote:
> There are currently two passive trip points defined for the CPU, but no
> cooling devices are attached to the thermal zones. We don't have support
> for cpufreq upstream yet, but actually this is redundant anyway because the
> CPU is throttled automatically when reaching high temperatures.
> 
> Drop the passive trip points and keep just the critical shutdown as safety
> measure in case the throttling fails.
> 
> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

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

* Re: [PATCH 0/4] arm64: dts: qcom: x1e80100: Fix thermal trip points
  2025-02-19 11:36 [PATCH 0/4] arm64: dts: qcom: x1e80100: Fix thermal trip points Stephan Gerhold
                   ` (3 preceding siblings ...)
  2025-02-19 11:36 ` [PATCH 4/4] arm64: dts: qcom: x1e80100: Drop unused passive thermal trip points for CPU Stephan Gerhold
@ 2025-03-04 17:00 ` Bjorn Andersson
  4 siblings, 0 replies; 16+ messages in thread
From: Bjorn Andersson @ 2025-03-04 17:00 UTC (permalink / raw)
  To: Konrad Dybcio, Stephan Gerhold
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Abel Vesa,
	Rajendra Nayak, Akhil P Oommen, Johan Hovold, linux-arm-msm,
	devicetree, linux-kernel, Neil Armstrong


On Wed, 19 Feb 2025 12:36:17 +0100, Stephan Gerhold wrote:
> There are some mistakes in the thermal trip points currently used on
> X1E80100. Several of the critical trip points are too high, so the hardware
> will trigger an emergency reset before the kernel has the chance to
> shutdown cleanly. We're also missing GPU cooling in the device tree, which
> prevents running certain GPU-intensive applications without reaching the
> critical shutdown temperatures. The CPU on the other hand throttles itself
> automatically, so we can just drop the passive trip points there.
> 
> [...]

Applied, thanks!

[1/4] arm64: dts: qcom: x1e80100: Fix video thermal zone
      commit: 801befff4c827aa72e3698367c5afc18987a6a3f
[2/4] arm64: dts: qcom: x1e80100: Apply consistent critical thermal shutdown
      commit: 03f2b8eed73418269a158ccebad5d8d8f2f6daa1
[3/4] arm64: dts: qcom: x1e80100: Add GPU cooling
      commit: 5ba21fa11f473c9827f378ace8c9f983de9e0287
[4/4] arm64: dts: qcom: x1e80100: Drop unused passive thermal trip points for CPU
      commit: 06eadce936971dd11279e53b6dfb151804137836

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

end of thread, other threads:[~2025-03-04 17:00 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-19 11:36 [PATCH 0/4] arm64: dts: qcom: x1e80100: Fix thermal trip points Stephan Gerhold
2025-02-19 11:36 ` [PATCH 1/4] arm64: dts: qcom: x1e80100: Fix video thermal zone Stephan Gerhold
2025-02-19 15:28   ` Johan Hovold
2025-02-19 16:22     ` Stephan Gerhold
2025-02-20 12:54   ` Konrad Dybcio
2025-02-19 11:36 ` [PATCH 2/4] arm64: dts: qcom: x1e80100: Apply consistent critical thermal shutdown Stephan Gerhold
2025-02-19 15:36   ` Johan Hovold
2025-02-19 16:28     ` Stephan Gerhold
2025-02-20 12:55   ` Konrad Dybcio
2025-02-19 11:36 ` [PATCH 3/4] arm64: dts: qcom: x1e80100: Add GPU cooling Stephan Gerhold
2025-02-19 15:42   ` Johan Hovold
2025-02-21 19:35   ` Konrad Dybcio
2025-02-19 11:36 ` [PATCH 4/4] arm64: dts: qcom: x1e80100: Drop unused passive thermal trip points for CPU Stephan Gerhold
2025-02-19 15:47   ` Johan Hovold
2025-02-21 19:36   ` Konrad Dybcio
2025-03-04 17:00 ` [PATCH 0/4] arm64: dts: qcom: x1e80100: Fix thermal trip points Bjorn Andersson

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