Skip to contentSkip to conversation

arm64: dts: qcom: x1e78100-thinkpad-t14s: Add thermal zones for PMICs

PATCH Superseded Daniel Lezcano 5 participants 8 messages Sep 22 – Sep 29

Subsystems (3)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: qcom: x1e78100-thinkpad-t14s: Add thermal zones for PMICs

Add the thermal zones for the ThinkPad T14s and describe the board temperature sensors exposed through the PMK8550 VADC.

The keyboard area is the main thermal constraint under sustained CPU load. Add a passive thermal zone for it and progressively throttle the three CPU groups as the temperature approaches the 53°C limit. The groups are activated at 49°C, 51°C and 53°C respectively, with a 1000 m°C hysteresis and a 500 ms passive polling interval.

The cooling maps limit each CPU cooling device to state 6, which corresponds to approximately 1.9 GHz. Testing showed that the system can sustain the workload with all three CPU clusters capped at this frequency while maintaining the expected performance, making it a suitable upper cooling state for thermal regulation.

Several configurations were evaluated while tuning the keyboard zone. Using a single 53°C trip for all CPUs allowed the temperature to rise quickly but resulted in a stable operating point around 54.3°C, about 1.3°C above the intended limit. Introducing staged cooling before the target significantly reduced the thermal overshoot. A 49/51/53°C configuration kept the steady-state temperature close to 53°C, while a later 49.5/51.5/53°C configuration improved the heating response but shifted the equilibrium slightly above the target. Based on these results, keep the earlier 49/51/53°C staging.

Also add a passive back-cover thermal zone which uses the GPU as a cooling device at 64°C, together with a 73°C critical shutdown trip.

Describe the remaining SMB, SDX, east and west board temperature sensors as monitoring-only thermal zones, and enable ADC thermal monitoring on the corresponding PMK8550 VADC channels.

---
 .../qcom/x1e78100-lenovo-thinkpad-t14s.dts    | 142 ++++++++++++++++++
 1 file changed, 142 insertions(+)
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts +142 -0
index 5cc6a63d1ef6..9407868864ad 100644
@@ -10,6 +10,117 @@ / {
 	compatible = "lenovo,thinkpad-t14s-lcd", "lenovo,thinkpad-t14s",
 		     "qcom,x1e78100", "qcom,x1e80100";
 
+	thermal-zones {
+		soc-thermal {
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_GPIO_100K_PU(1)>;
+		};
+
+		keyboard-thermal {
+			critical-action = "shutdown";
+			polling-delay-passive = <500>;
+
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX2_GPIO_100K_PU(1)>;
+
+			trips {
+
+				keyboard_alert0: trip-point0 {
+					temperature = <49000>;
+					hysteresis = <1000>;
+					type = "passive";
+				};
+
+				keyboard_alert1: trip-point1 {
+					temperature = <51000>;
+					hysteresis = <1000>;
+					type = "passive";
+				};
+
+				keyboard_alert2: trip-point2 {
+					temperature = <53000>;
+					hysteresis = <1000>;
+					type = "passive";
+				};
+
+				keyboard-critical {
+					temperature = <73000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+
+			cooling-maps {
+				map0 {
+					trip = <&keyboard_alert0>;
+					cooling-device = <&cpu0 THERMAL_NO_LIMIT 6>,
+							 <&cpu1 THERMAL_NO_LIMIT 6>,
+							 <&cpu2 THERMAL_NO_LIMIT 6>,
+							 <&cpu3 THERMAL_NO_LIMIT 6>;
+				};
+
+				map1 {
+					trip = <&keyboard_alert1>;
+					cooling-device = <&cpu4 THERMAL_NO_LIMIT 6>,
+							 <&cpu5 THERMAL_NO_LIMIT 6>,
+							 <&cpu6 THERMAL_NO_LIMIT 6>,
+							 <&cpu7 THERMAL_NO_LIMIT 6>;
+				};
+
+				map2 {
+					trip = <&keyboard_alert2>;
+					cooling-device = <&cpu8 THERMAL_NO_LIMIT 6>,
+							 <&cpu9 THERMAL_NO_LIMIT 6>,
+							 <&cpu10 THERMAL_NO_LIMIT 6>,
+							 <&cpu11 THERMAL_NO_LIMIT 6>;
+
+				};
+			};
+		};
+
+		backcover-thermal {
+			critical-action = "shutdown";
+			polling-delay-passive = <400>;
+
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_THM_100K_PU(1)>;
+
+			trips {
+				backcover_alert0: trip-point0 {
+					temperature = <64000>;
+					hysteresis = <1000>;
+					type = "passive";
+				};
+
+				backcover-critical {
+					temperature = <73000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+
+			cooling-maps {
+				map0 {
+					trip = <&backcover_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+		};
+
+		smb-thermal {
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX2_THM_100K_PU(1)>;
+		};
+
+		sdx-thermal {
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX3_THM_100K_PU(1)>;
+		};
+
+		east-thermal {
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX4_THM_100K_PU(1)>;
+		};
+
+		west-thermal {
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX5_THM_100K_PU(1)>;
+		};
+	};
+
 	backlight: backlight {
 		compatible = "pwm-backlight";
 		pwms = <&pmk8550_pwm 0 4266537>;
@@ -35,6 +146,7 @@ vreg_edp_bl: regulator-edp-bl {
 
 		regulator-boot-on;
 	};
+
 };
 
 &panel {
@@ -58,3 +170,33 @@ edp_bl_pwm: edp-bl-pwm-state {
 &pmk8550_pwm {
 	status = "okay";
 };
+
+&pmk8550_vadc {
+	channel@144 {
+		qcom,adc-tm;
+	};
+
+	channel@145 {
+		qcom,adc-tm;
+	};
+
+	channel@146 {
+		qcom,adc-tm;
+	};
+
+	channel@147 {
+		qcom,adc-tm;
+	};
+
+	channel@148 {
+		qcom,adc-tm;
+	};
+
+	channel@14a {
+		qcom,adc-tm;
+	};
+
+	channel@14b {
+		qcom,adc-tm;
+	};
+};
Signature · 1 line
2.53.0
#1 lore raw
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] dts: missing #thermal-sensor-cells on pmk8550_vadc breaks thermal zones --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] dts: missing #thermal-sensor-cells on pmk8550_vadc breaks thermal zones --

commit 2a17ffae5a77fa31a5cd42aff532d2ad2eb0c1c2
Author: Daniel Lezcano <[email protected]>

arm64: dts: qcom: x1e78100-thinkpad-t14s: Add thermal zones for PMICs

This commit adds thermal zones for the ThinkPad T14s and describes the board temperature sensors exposed through the PMK8550 VADC. It includes passive and shutdown thermal zones for the keyboard area and back cover, along with monitoring-only zones.

Quoted 8 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts +0 -0
index 5cc6a63d1ef66..9407868864ad3 100644
@@ -10,6 +10,117 @@ / {
 	compatible = "lenovo,thinkpad-t14s-lcd", "lenovo,thinkpad-t14s",
 		     "qcom,x1e78100", "qcom,x1e80100";
 

arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts / { · line 22

Quoted 10 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts +10 -0
+	thermal-zones {
+		soc-thermal {
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_GPIO_100K_PU(1)>;
+		};
+
+		keyboard-thermal {
+			critical-action = "shutdown";
+			polling-delay-passive = <500>;
+
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX2_GPIO_100K_PU(1)>;

[Severity: High]
Will this thermal zone fail to parse and register at runtime due to the target pmk8550_vadc node missing the #thermal-sensor-cells property?

Without these thermal zones registering successfully, the system might lack the intended thermal throttling for the keyboard constraint and the 73°C shutdown trip, risking hardware overheating under load.

[ ... ]

arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts edp_bl_pwm: edp-bl-pwm-state { · line 177

Quoted 9 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts +5 -0
@@ -58,3 +170,33 @@ edp_bl_pwm: edp-bl-pwm-state {
 &pmk8550_pwm {
 	status = "okay";
 };
+
+&pmk8550_vadc {
+	channel@144 {
+		qcom,adc-tm;
+	};

[Severity: High]
Should this extension of pmk8550_vadc include #thermal-sensor-cells = <1>; ?

Since the base definition in hamoa-pmics.dtsi omits it, it appears to be required here for the framework to parse it as a valid thermal sensor provider. Otherwise, of_parse_phandle_with_args() returns -EINVAL unconditionally at boot when evaluating the thermal-sensors properties above.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#2 lore raw
Quoted 3 lines · On 9/22/26 20:31, [email protected] wrote:

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] dts: missing #thermal-sensor-cells on pmk8550_vadc breaks thermal zones --

False positive probably due a wrong baseline because it is present in the QC tree [1]

Thanks

[1] https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/tree/arch/arm64/boot/dts/qcom/hamoa-pmics.dtsi?h=for-next#n291

#3 lore raw
In reply to Daniel Lezcano
Quoted 25 lines · Daniel Lezcano

Add the thermal zones for the ThinkPad T14s and describe the board temperature sensors exposed through the PMK8550 VADC.

The keyboard area is the main thermal constraint under sustained CPU load. Add a passive thermal zone for it and progressively throttle the three CPU groups as the temperature approaches the 53°C limit. The groups are activated at 49°C, 51°C and 53°C respectively, with a 1000 m°C hysteresis and a 500 ms passive polling interval.

The cooling maps limit each CPU cooling device to state 6, which corresponds to approximately 1.9 GHz. Testing showed that the system can sustain the workload with all three CPU clusters capped at this frequency while maintaining the expected performance, making it a suitable upper cooling state for thermal regulation.

Several configurations were evaluated while tuning the keyboard zone. Using a single 53°C trip for all CPUs allowed the temperature to rise quickly but resulted in a stable operating point around 54.3°C, about 1.3°C above the intended limit. Introducing staged cooling before the target significantly reduced the thermal overshoot. A 49/51/53°C configuration kept the steady-state temperature close to 53°C, while a later 49.5/51.5/53°C configuration improved the heating response but shifted the equilibrium slightly above the target. Based on these results, keep the earlier 49/51/53°C staging.

Quoted 2 lines

Also add a passive back-cover thermal zone which uses the GPU as a cooling device at 64°C, together with a 73°C critical shutdown trip.

The GPU contributes much less to the thermal situation. 64C sounds like a lot for backcover - what is the threshold on Windows?

Konrad

#4 lore raw
In reply to Daniel Lezcano

Hi all,

arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts

Quoted 41 lines · Daniel Lezcano

Add the thermal zones for the ThinkPad T14s and describe the board temperature sensors exposed through the PMK8550 VADC.

The keyboard area is the main thermal constraint under sustained CPU load. Add a passive thermal zone for it and progressively throttle the three CPU groups as the temperature approaches the 53°C limit. The groups are activated at 49°C, 51°C and 53°C respectively, with a 1000 m°C hysteresis and a 500 ms passive polling interval.

The cooling maps limit each CPU cooling device to state 6, which corresponds to approximately 1.9 GHz. Testing showed that the system can sustain the workload with all three CPU clusters capped at this frequency while maintaining the expected performance, making it a suitable upper cooling state for thermal regulation.

Several configurations were evaluated while tuning the keyboard zone. Using a single 53°C trip for all CPUs allowed the temperature to rise quickly but resulted in a stable operating point around 54.3°C, about 1.3°C above the intended limit. Introducing staged cooling before the target significantly reduced the thermal overshoot. A 49/51/53°C configuration kept the steady-state temperature close to 53°C, while a later 49.5/51.5/53°C configuration improved the heating response but shifted the equilibrium slightly above the target. Based on these results, keep the earlier 49/51/53°C staging.

Also add a passive back-cover thermal zone which uses the GPU as a cooling device at 64°C, together with a 73°C critical shutdown trip.

Describe the remaining SMB, SDX, east and west board temperature sensors as monitoring-only thermal zones, and enable ADC thermal monitoring on the corresponding PMK8550 VADC channels.

---
 .../qcom/x1e78100-lenovo-thinkpad-t14s.dts    | 142 ++++++++++++++++++
 1 file changed, 142 insertions(+)
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts +0 -0
index 5cc6a63d1ef6..9407868864ad 100644

I just noticed that you're adding the thermal-zones here.

This should go to x1e78100-lenovo-thinkpad-t14s.dtsi note the extra 'i' at the end, so that the thermal-zones will also be used on the oled model.

Regards,

Hans

Quoted 160 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts +142 -0
@@ -10,6 +10,117 @@ / {
 	compatible = "lenovo,thinkpad-t14s-lcd", "lenovo,thinkpad-t14s",
 		     "qcom,x1e78100", "qcom,x1e80100";
 
+	thermal-zones {
+		soc-thermal {
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_GPIO_100K_PU(1)>;
+		};
+
+		keyboard-thermal {
+			critical-action = "shutdown";
+			polling-delay-passive = <500>;
+
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX2_GPIO_100K_PU(1)>;
+
+			trips {
+
+				keyboard_alert0: trip-point0 {
+					temperature = <49000>;
+					hysteresis = <1000>;
+					type = "passive";
+				};
+
+				keyboard_alert1: trip-point1 {
+					temperature = <51000>;
+					hysteresis = <1000>;
+					type = "passive";
+				};
+
+				keyboard_alert2: trip-point2 {
+					temperature = <53000>;
+					hysteresis = <1000>;
+					type = "passive";
+				};
+
+				keyboard-critical {
+					temperature = <73000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+
+			cooling-maps {
+				map0 {
+					trip = <&keyboard_alert0>;
+					cooling-device = <&cpu0 THERMAL_NO_LIMIT 6>,
+							 <&cpu1 THERMAL_NO_LIMIT 6>,
+							 <&cpu2 THERMAL_NO_LIMIT 6>,
+							 <&cpu3 THERMAL_NO_LIMIT 6>;
+				};
+
+				map1 {
+					trip = <&keyboard_alert1>;
+					cooling-device = <&cpu4 THERMAL_NO_LIMIT 6>,
+							 <&cpu5 THERMAL_NO_LIMIT 6>,
+							 <&cpu6 THERMAL_NO_LIMIT 6>,
+							 <&cpu7 THERMAL_NO_LIMIT 6>;
+				};
+
+				map2 {
+					trip = <&keyboard_alert2>;
+					cooling-device = <&cpu8 THERMAL_NO_LIMIT 6>,
+							 <&cpu9 THERMAL_NO_LIMIT 6>,
+							 <&cpu10 THERMAL_NO_LIMIT 6>,
+							 <&cpu11 THERMAL_NO_LIMIT 6>;
+
+				};
+			};
+		};
+
+		backcover-thermal {
+			critical-action = "shutdown";
+			polling-delay-passive = <400>;
+
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_THM_100K_PU(1)>;
+
+			trips {
+				backcover_alert0: trip-point0 {
+					temperature = <64000>;
+					hysteresis = <1000>;
+					type = "passive";
+				};
+
+				backcover-critical {
+					temperature = <73000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+
+			cooling-maps {
+				map0 {
+					trip = <&backcover_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+		};
+
+		smb-thermal {
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX2_THM_100K_PU(1)>;
+		};
+
+		sdx-thermal {
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX3_THM_100K_PU(1)>;
+		};
+
+		east-thermal {
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX4_THM_100K_PU(1)>;
+		};
+
+		west-thermal {
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX5_THM_100K_PU(1)>;
+		};
+	};
+
 	backlight: backlight {
 		compatible = "pwm-backlight";
 		pwms = <&pmk8550_pwm 0 4266537>;
@@ -35,6 +146,7 @@ vreg_edp_bl: regulator-edp-bl {
 
 		regulator-boot-on;
 	};
+
 };
 
 &panel {
@@ -58,3 +170,33 @@ edp_bl_pwm: edp-bl-pwm-state {
 &pmk8550_pwm {
 	status = "okay";
 };
+
+&pmk8550_vadc {
+	channel@144 {
+		qcom,adc-tm;
+	};
+
+	channel@145 {
+		qcom,adc-tm;
+	};
+
+	channel@146 {
+		qcom,adc-tm;
+	};
+
+	channel@147 {
+		qcom,adc-tm;
+	};
+
+	channel@148 {
+		qcom,adc-tm;
+	};
+
+	channel@14a {
+		qcom,adc-tm;
+	};
+
+	channel@14b {
+		qcom,adc-tm;
+	};
+};
#5 lore raw

Hi all,

Quoted 47 lines · On 23-Sep-26 21:07, [email protected] wrote:

Hi all,

arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts

Quoted 41 lines · Daniel Lezcano

Add the thermal zones for the ThinkPad T14s and describe the board temperature sensors exposed through the PMK8550 VADC.

The keyboard area is the main thermal constraint under sustained CPU load. Add a passive thermal zone for it and progressively throttle the three CPU groups as the temperature approaches the 53°C limit. The groups are activated at 49°C, 51°C and 53°C respectively, with a 1000 m°C hysteresis and a 500 ms passive polling interval.

The cooling maps limit each CPU cooling device to state 6, which corresponds to approximately 1.9 GHz. Testing showed that the system can sustain the workload with all three CPU clusters capped at this frequency while maintaining the expected performance, making it a suitable upper cooling state for thermal regulation.

Several configurations were evaluated while tuning the keyboard zone. Using a single 53°C trip for all CPUs allowed the temperature to rise quickly but resulted in a stable operating point around 54.3°C, about 1.3°C above the intended limit. Introducing staged cooling before the target significantly reduced the thermal overshoot. A 49/51/53°C configuration kept the steady-state temperature close to 53°C, while a later 49.5/51.5/53°C configuration improved the heating response but shifted the equilibrium slightly above the target. Based on these results, keep the earlier 49/51/53°C staging.

Also add a passive back-cover thermal zone which uses the GPU as a cooling device at 64°C, together with a 73°C critical shutdown trip.

Describe the remaining SMB, SDX, east and west board temperature sensors as monitoring-only thermal zones, and enable ADC thermal monitoring on the corresponding PMK8550 VADC channels.

---
 .../qcom/x1e78100-lenovo-thinkpad-t14s.dts    | 142 ++++++++++++++++++
 1 file changed, 142 insertions(+)
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts +0 -0
index 5cc6a63d1ef6..9407868864ad 100644

I just noticed that you're adding the thermal-zones here.

Quoted 3 lines

This should go to x1e78100-lenovo-thinkpad-t14s.dtsi note the extra 'i' at the end, so that the thermal-zones will also be used on the oled model.

And when building with this patch I get a bunch of DTC warnings that the pmk8550_vadc node is missing a:

	#thermal-sensor-cells = <1>;

line.

Interestingly enough this line is there in pmk8550.dtsi and parts of hamoa-pmics.dtsi seems to just be duplication of pmk8550.dtsi, which we really should fix.

Regards,

Hans

Quoted 161 lines
Quoted 160 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts +142 -0
@@ -10,6 +10,117 @@ / {
 	compatible = "lenovo,thinkpad-t14s-lcd", "lenovo,thinkpad-t14s",
 		     "qcom,x1e78100", "qcom,x1e80100";
 
+	thermal-zones {
+		soc-thermal {
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_GPIO_100K_PU(1)>;
+		};
+
+		keyboard-thermal {
+			critical-action = "shutdown";
+			polling-delay-passive = <500>;
+
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX2_GPIO_100K_PU(1)>;
+
+			trips {
+
+				keyboard_alert0: trip-point0 {
+					temperature = <49000>;
+					hysteresis = <1000>;
+					type = "passive";
+				};
+
+				keyboard_alert1: trip-point1 {
+					temperature = <51000>;
+					hysteresis = <1000>;
+					type = "passive";
+				};
+
+				keyboard_alert2: trip-point2 {
+					temperature = <53000>;
+					hysteresis = <1000>;
+					type = "passive";
+				};
+
+				keyboard-critical {
+					temperature = <73000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+
+			cooling-maps {
+				map0 {
+					trip = <&keyboard_alert0>;
+					cooling-device = <&cpu0 THERMAL_NO_LIMIT 6>,
+							 <&cpu1 THERMAL_NO_LIMIT 6>,
+							 <&cpu2 THERMAL_NO_LIMIT 6>,
+							 <&cpu3 THERMAL_NO_LIMIT 6>;
+				};
+
+				map1 {
+					trip = <&keyboard_alert1>;
+					cooling-device = <&cpu4 THERMAL_NO_LIMIT 6>,
+							 <&cpu5 THERMAL_NO_LIMIT 6>,
+							 <&cpu6 THERMAL_NO_LIMIT 6>,
+							 <&cpu7 THERMAL_NO_LIMIT 6>;
+				};
+
+				map2 {
+					trip = <&keyboard_alert2>;
+					cooling-device = <&cpu8 THERMAL_NO_LIMIT 6>,
+							 <&cpu9 THERMAL_NO_LIMIT 6>,
+							 <&cpu10 THERMAL_NO_LIMIT 6>,
+							 <&cpu11 THERMAL_NO_LIMIT 6>;
+
+				};
+			};
+		};
+
+		backcover-thermal {
+			critical-action = "shutdown";
+			polling-delay-passive = <400>;
+
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_THM_100K_PU(1)>;
+
+			trips {
+				backcover_alert0: trip-point0 {
+					temperature = <64000>;
+					hysteresis = <1000>;
+					type = "passive";
+				};
+
+				backcover-critical {
+					temperature = <73000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+
+			cooling-maps {
+				map0 {
+					trip = <&backcover_alert0>;
+					cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+		};
+
+		smb-thermal {
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX2_THM_100K_PU(1)>;
+		};
+
+		sdx-thermal {
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX3_THM_100K_PU(1)>;
+		};
+
+		east-thermal {
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX4_THM_100K_PU(1)>;
+		};
+
+		west-thermal {
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX5_THM_100K_PU(1)>;
+		};
+	};
+
 	backlight: backlight {
 		compatible = "pwm-backlight";
 		pwms = <&pmk8550_pwm 0 4266537>;
@@ -35,6 +146,7 @@ vreg_edp_bl: regulator-edp-bl {
 
 		regulator-boot-on;
 	};
+
 };
 
 &panel {
@@ -58,3 +170,33 @@ edp_bl_pwm: edp-bl-pwm-state {
 &pmk8550_pwm {
 	status = "okay";
 };
+
+&pmk8550_vadc {
+	channel@144 {
+		qcom,adc-tm;
+	};
+
+	channel@145 {
+		qcom,adc-tm;
+	};
+
+	channel@146 {
+		qcom,adc-tm;
+	};
+
+	channel@147 {
+		qcom,adc-tm;
+	};
+
+	channel@148 {
+		qcom,adc-tm;
+	};
+
+	channel@14a {
+		qcom,adc-tm;
+	};
+
+	channel@14b {
+		qcom,adc-tm;
+	};
+};
#6 lore raw
In reply to Daniel Lezcano
Quoted 45 lines · Daniel Lezcano

Add the thermal zones for the ThinkPad T14s and describe the board temperature sensors exposed through the PMK8550 VADC.

The keyboard area is the main thermal constraint under sustained CPU load. Add a passive thermal zone for it and progressively throttle the three CPU groups as the temperature approaches the 53°C limit. The groups are activated at 49°C, 51°C and 53°C respectively, with a 1000 m°C hysteresis and a 500 ms passive polling interval.

The cooling maps limit each CPU cooling device to state 6, which corresponds to approximately 1.9 GHz. Testing showed that the system can sustain the workload with all three CPU clusters capped at this frequency while maintaining the expected performance, making it a suitable upper cooling state for thermal regulation.

Several configurations were evaluated while tuning the keyboard zone. Using a single 53°C trip for all CPUs allowed the temperature to rise quickly but resulted in a stable operating point around 54.3°C, about 1.3°C above the intended limit. Introducing staged cooling before the target significantly reduced the thermal overshoot. A 49/51/53°C configuration kept the steady-state temperature close to 53°C, while a later 49.5/51.5/53°C configuration improved the heating response but shifted the equilibrium slightly above the target. Based on these results, keep the earlier 49/51/53°C staging.

Also add a passive back-cover thermal zone which uses the GPU as a cooling device at 64°C, together with a 73°C critical shutdown trip.

Describe the remaining SMB, SDX, east and west board temperature sensors as monitoring-only thermal zones, and enable ADC thermal monitoring on the corresponding PMK8550 VADC channels.

---
 .../qcom/x1e78100-lenovo-thinkpad-t14s.dts    | 142 ++++++++++++++++++
 1 file changed, 142 insertions(+)
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts +0 -0
index 5cc6a63d1ef6..9407868864ad 100644
@@ -10,6 +10,117 @@ / {
 	compatible = "lenovo,thinkpad-t14s-lcd", "lenovo,thinkpad-t14s",
 		     "qcom,x1e78100", "qcom,x1e80100";
 

arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts / { · line 22

Quoted 10 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts +10 -0
+	thermal-zones {
+		soc-thermal {
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_GPIO_100K_PU(1)>;
+		};
+
+		keyboard-thermal {
+			critical-action = "shutdown";
+			polling-delay-passive = <500>;
+
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX2_GPIO_100K_PU(1)>;

I believe this is "towards back cover next to heat pipe" on T14s, not "keyboard".

SYS_THERM1 is RT8502 and you can find that labelled on the top bottom right in this mainboard picture:
https://download.lenovo.com/Images/Parts/5B21P83385/5B21P83385_A.jpg

In the T14s, the mainboard is mounted 180° rotated, you can see the same part of the mainboard in the top middle here, above the heat pipe, facing towards the back cover:
https://www.notebookcheck.net/fileadmin/_processed_/d/c/csm_DSC_0003_aadae1ddd2.jpg

arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts / { · line 30

Quoted 8 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts +8 -0
+
+			trips {
+
+				keyboard_alert0: trip-point0 {
+					temperature = <49000>;
+					hysteresis = <1000>;
+					type = "passive";
+				};

If I'm reading the Windows ACPI setup correctly, it starts throttling much later. The main thermal zone used for throttling on Windows is TZ40, which is thermistor 2 read through the qcom-hamoa-ec interface (b94000.i2c, 'i2cget -y N 0x36 0x2a b'). TZ39 with thermistor 1 looks like the SoC thermistor, so TZ40 could be the EC equivalent of SYS_THERM1, i.e. RT8202 also visible in the mainboard picture above.

On Windows, TZ40 is configured as follows on my T14s:

Passive throttling starting at:
- 3310 dK (57.85°C), power mode "balanced" (current default for EC)
- 3330 dK (59.85°C), power mode "performance"
- 3230 dK (49.85°C), power mode "low power"

Cooling devices:
- CLS0.CPU0-3
- CLS1.CPU0-3
- CLS2.CPU0-3
- GPU0

If we start throttling earlier than Windows, I would be worried that the EC will not reach the trip point for maximum fan speed, and we'll end up overly throttling the device.

Quoted 43 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts +43 -0
+
+				keyboard_alert1: trip-point1 {
+					temperature = <51000>;
+					hysteresis = <1000>;
+					type = "passive";
+				};
+
+				keyboard_alert2: trip-point2 {
+					temperature = <53000>;
+					hysteresis = <1000>;
+					type = "passive";
+				};
+
+				keyboard-critical {
+					temperature = <73000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+
+			cooling-maps {
+				map0 {
+					trip = <&keyboard_alert0>;
+					cooling-device = <&cpu0 THERMAL_NO_LIMIT 6>,
+							 <&cpu1 THERMAL_NO_LIMIT 6>,
+							 <&cpu2 THERMAL_NO_LIMIT 6>,
+							 <&cpu3 THERMAL_NO_LIMIT 6>;
+				};
+
+				map1 {
+					trip = <&keyboard_alert1>;
+					cooling-device = <&cpu4 THERMAL_NO_LIMIT 6>,
+							 <&cpu5 THERMAL_NO_LIMIT 6>,
+							 <&cpu6 THERMAL_NO_LIMIT 6>,
+							 <&cpu7 THERMAL_NO_LIMIT 6>;
+				};
+
+				map2 {
+					trip = <&keyboard_alert2>;
+					cooling-device = <&cpu8 THERMAL_NO_LIMIT 6>,
+							 <&cpu9 THERMAL_NO_LIMIT 6>,
+							 <&cpu10 THERMAL_NO_LIMIT 6>,
+							 <&cpu11 THERMAL_NO_LIMIT 6>;

arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts / { · line 83

Quoted 10 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts +10 -0
+
+				};
+			};
+		};
+
+		backcover-thermal {
+			critical-action = "shutdown";
+			polling-delay-passive = <400>;
+
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_THM_100K_PU(1)>;

If the keyboard-thermal above is "towards back cover next to heat pipe", I'm not sure what this is. I've been trying to figure it out but no luck so far. Maybe someone would need to sacrifice a T14s and take a look at the mainboard markings after removing all these thermal tapes ... :/

https://download.lenovo.com/Images/Parts/5B21P83377/5B21P83377_B.jpg

If this sensor is equivalent to EC thermistor 3 (TZ41) in ACPI, then Windows does not use this for throttling at all.

Quoted 6 lines

[...]

arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts +5 -0
+		smb-thermal {
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX2_THM_100K_PU(1)>;
+		};
+
+		sdx-thermal {

arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts / { · line 121

Quoted 10 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts +10 -0
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX3_THM_100K_PU(1)>;
+		};
+
+		east-thermal {
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX4_THM_100K_PU(1)>;
+		};
+
+		west-thermal {
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX5_THM_100K_PU(1)>;
+		};

FWIW, there is also ssd/wlan-thermal (SYS_THERM7) thermal-sensors = <&pmk8550_adc_tm ADC5_GEN3_AMUX6_THM_100K_PU(1)>;

Thanks,
Stephan

#7 lore raw
Quoted 60 lines · Stephan Gerhold
Quoted 45 lines · Daniel Lezcano

Add the thermal zones for the ThinkPad T14s and describe the board temperature sensors exposed through the PMK8550 VADC.

The keyboard area is the main thermal constraint under sustained CPU load. Add a passive thermal zone for it and progressively throttle the three CPU groups as the temperature approaches the 53°C limit. The groups are activated at 49°C, 51°C and 53°C respectively, with a 1000 m°C hysteresis and a 500 ms passive polling interval.

The cooling maps limit each CPU cooling device to state 6, which corresponds to approximately 1.9 GHz. Testing showed that the system can sustain the workload with all three CPU clusters capped at this frequency while maintaining the expected performance, making it a suitable upper cooling state for thermal regulation.

Several configurations were evaluated while tuning the keyboard zone. Using a single 53°C trip for all CPUs allowed the temperature to rise quickly but resulted in a stable operating point around 54.3°C, about 1.3°C above the intended limit. Introducing staged cooling before the target significantly reduced the thermal overshoot. A 49/51/53°C configuration kept the steady-state temperature close to 53°C, while a later 49.5/51.5/53°C configuration improved the heating response but shifted the equilibrium slightly above the target. Based on these results, keep the earlier 49/51/53°C staging.

Also add a passive back-cover thermal zone which uses the GPU as a cooling device at 64°C, together with a 73°C critical shutdown trip.

Describe the remaining SMB, SDX, east and west board temperature sensors as monitoring-only thermal zones, and enable ADC thermal monitoring on the corresponding PMK8550 VADC channels.

---
  .../qcom/x1e78100-lenovo-thinkpad-t14s.dts    | 142 ++++++++++++++++++
  1 file changed, 142 insertions(+)
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts +0 -0
index 5cc6a63d1ef6..9407868864ad 100644
@@ -10,6 +10,117 @@ / {
  	compatible = "lenovo,thinkpad-t14s-lcd", "lenovo,thinkpad-t14s",
  		     "qcom,x1e78100", "qcom,x1e80100";
 

arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts / { · line 22

Quoted 10 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts +10 -0
+	thermal-zones {
+		soc-thermal {
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_GPIO_100K_PU(1)>;
+		};
+
+		keyboard-thermal {
+			critical-action = "shutdown";
+			polling-delay-passive = <500>;
+
+			thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX2_GPIO_100K_PU(1)>;

I believe this is "towards back cover next to heat pipe" on T14s, not "keyboard".

Quoted 8 lines

SYS_THERM1 is RT8502 and you can find that labelled on the top bottom right in this mainboard picture:
https://download.lenovo.com/Images/Parts/5B21P83385/5B21P83385_A.jpg

In the T14s, the mainboard is mounted 180° rotated, you can see the same part of the mainboard in the top middle here, above the heat pipe, facing towards the back cover:
https://www.notebookcheck.net/fileadmin/_processed_/d/c/csm_DSC_0003_aadae1ddd2.jpg

Thanks for pointing it out, I'll double check

Quoted 16 lines

arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts / { · line 30

Quoted 8 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts +8 -0
+
+			trips {
+
+				keyboard_alert0: trip-point0 {
+					temperature = <49000>;
+					hysteresis = <1000>;
+					type = "passive";
+				};

If I'm reading the Windows ACPI setup correctly, it starts throttling much later. The main thermal zone used for throttling on Windows is TZ40, which is thermistor 2 read through the qcom-hamoa-ec interface (b94000.i2c, 'i2cget -y N 0x36 0x2a b'). TZ39 with thermistor 1 looks like the SoC thermistor, so TZ40 could be the EC equivalent of SYS_THERM1, i.e. RT8202 also visible in the mainboard picture above.

Quoted 6 lines

On Windows, TZ40 is configured as follows on my T14s:

Passive throttling starting at:
- 3310 dK (57.85°C), power mode "balanced" (current default for EC)
- 3330 dK (59.85°C), power mode "performance"
- 3230 dK (49.85°C), power mode "low power"

Yes, probably it is time to take benefit of the platform profile in order to change the trip points.

Quoted 9 lines

Cooling devices:
- CLS0.CPU0-3
- CLS1.CPU0-3
- CLS2.CPU0-3
- GPU0

If we start throttling earlier than Windows, I would be worried that the EC will not reach the trip point for maximum fan speed, and we'll end up overly throttling the device.

Mmmh, that is a good point.

I don't know the thermal management in Windows and if it has exactly the same design as the Linux thermal framework.

As we can set multiple passive trip points, may be we can try to step in the different cooling devices instead of making them all together tied with a single trip point.

Or do you think it is better to just make all devices capped at the same time ?