Adjust the DTS for sun50i to fix thermal trips for all A64 chips #2

Open
opened 2024-02-22 00:37:53 +01:00 by kreyren · 0 comments
Owner

Requires adjustments for thermals https://www.kernel.org/doc/Documentation/devicetree/bindings/thermal/thermal.txt

[  +0.002027] sun50i-a64-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
> [  +0.015028] thermal_sys: Failed to find 'trips' node
[  +0.000037] fbcon: Taking over console
> [  +0.000032] thermal_sys: Failed to find trip points for thermal-sensor id=1
> [  +0.000028] sun8i-thermal: probe of 1c25000.thermal-sensor failed with error -22

Supposedly it's meant to be fixed in a patch alike:

From b3310605ece4df3f471160f1a37462e419eef867 Mon Sep 17 00:00:00 2001
From: Jacob Hrbek <kreyren@fsfe.org>
Date: Tue, 9 Jan 2024 12:29:45 +0000
Subject: [PATCH] PATCH: Add trips for sun50i to fix 6.5+ kernels

---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 55 +++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 57ac18738..a7977cd0e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -244,6 +244,29 @@ gpu0_thermal: gpu0-thermal {
 			polling-delay-passive = <0>;
 			polling-delay = <0>;
 			thermal-sensors = <&ths 1>;
+
+			// trips {
+			// 	gpu_alert0: gpu_alert0 {
+			// 		/* milliCelsius */
+			// 		temperature = <75000>;
+			// 		hysteresis = <2000>;
+			// 		type = "passive";
+			// 	};
+
+			// 	gpu_alert1: cpu_alert1 {
+			// 		/* milliCelsius */
+			// 		temperature = <90000>;
+			// 		hysteresis = <2000>;
+			// 		type = "hot";
+			// 	};
+
+			// 	gpu_crit: gpu-crit {
+			// 		/* milliCelsius */
+			// 		temperature = <110000>;
+			// 		hysteresis = <2000>;
+			// 		type = "critical";
+			// 	};
+			// };
 		};
 
 		gpu1_thermal: gpu1-thermal {
@@ -251,6 +274,29 @@ gpu1_thermal: gpu1-thermal {
 			polling-delay-passive = <0>;
 			polling-delay = <0>;
 			thermal-sensors = <&ths 2>;
+
+			// trips {
+			// 	gpu_alert0: gpu_alert0 {
+			// 		/* milliCelsius */
+			// 		temperature = <75000>;
+			// 		hysteresis = <2000>;
+			// 		type = "passive";
+			// 	};
+
+			// 	gpu_alert1: cpu_alert1 {
+			// 		/* milliCelsius */
+			// 		temperature = <90000>;
+			// 		hysteresis = <2000>;
+			// 		type = "hot";
+			// 	};
+
+			// 	gpu_crit: gpu-crit {
+			// 		/* milliCelsius */
+			// 		temperature = <110000>;
+			// 		hysteresis = <2000>;
+			// 		type = "critical";
+			// 	};
+			// };
 		};
 	};
 
@@ -953,6 +999,15 @@ ths: thermal-sensor@1c25000 {
 			nvmem-cells = <&ths_calibration>;
 			nvmem-cell-names = "calibration";
 			#thermal-sensor-cells = <1>;
+
+			trips {
+				ths_crit: ths_crit {
+					/* milliCelsius */
+					temperature = <110000>;
+					hysteresis = <2000>;
+					type = "critical";
+				}
+			};
 		};
 
 		uart0: serial@1c28000 {
-- 
2.42.0

Requires adjustments for thermals https://www.kernel.org/doc/Documentation/devicetree/bindings/thermal/thermal.txt ``` [ +0.002027] sun50i-a64-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver > [ +0.015028] thermal_sys: Failed to find 'trips' node [ +0.000037] fbcon: Taking over console > [ +0.000032] thermal_sys: Failed to find trip points for thermal-sensor id=1 > [ +0.000028] sun8i-thermal: probe of 1c25000.thermal-sensor failed with error -22 ``` Supposedly it's meant to be fixed in a patch alike: ``` From b3310605ece4df3f471160f1a37462e419eef867 Mon Sep 17 00:00:00 2001 From: Jacob Hrbek <kreyren@fsfe.org> Date: Tue, 9 Jan 2024 12:29:45 +0000 Subject: [PATCH] PATCH: Add trips for sun50i to fix 6.5+ kernels --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 57ac18738..a7977cd0e 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -244,6 +244,29 @@ gpu0_thermal: gpu0-thermal { polling-delay-passive = <0>; polling-delay = <0>; thermal-sensors = <&ths 1>; + + // trips { + // gpu_alert0: gpu_alert0 { + // /* milliCelsius */ + // temperature = <75000>; + // hysteresis = <2000>; + // type = "passive"; + // }; + + // gpu_alert1: cpu_alert1 { + // /* milliCelsius */ + // temperature = <90000>; + // hysteresis = <2000>; + // type = "hot"; + // }; + + // gpu_crit: gpu-crit { + // /* milliCelsius */ + // temperature = <110000>; + // hysteresis = <2000>; + // type = "critical"; + // }; + // }; }; gpu1_thermal: gpu1-thermal { @@ -251,6 +274,29 @@ gpu1_thermal: gpu1-thermal { polling-delay-passive = <0>; polling-delay = <0>; thermal-sensors = <&ths 2>; + + // trips { + // gpu_alert0: gpu_alert0 { + // /* milliCelsius */ + // temperature = <75000>; + // hysteresis = <2000>; + // type = "passive"; + // }; + + // gpu_alert1: cpu_alert1 { + // /* milliCelsius */ + // temperature = <90000>; + // hysteresis = <2000>; + // type = "hot"; + // }; + + // gpu_crit: gpu-crit { + // /* milliCelsius */ + // temperature = <110000>; + // hysteresis = <2000>; + // type = "critical"; + // }; + // }; }; }; @@ -953,6 +999,15 @@ ths: thermal-sensor@1c25000 { nvmem-cells = <&ths_calibration>; nvmem-cell-names = "calibration"; #thermal-sensor-cells = <1>; + + trips { + ths_crit: ths_crit { + /* milliCelsius */ + temperature = <110000>; + hysteresis = <2000>; + type = "critical"; + } + }; }; uart0: serial@1c28000 { -- 2.42.0 ```
kreyren added this to the Maintanance milestone 2024-02-22 13:43:54 +01:00
kreyren changed title from Add trips to Adjust the DTS for sun50i to fix thermal trips for all A64 chips 2024-02-22 13:49:43 +01:00
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: KREYLIMEX/TERES#2
No description provided.