arm64: dts: qcom: x1e78100-thinkpad-t14s: Add thermal zones for PMICs
PATCH v3 1/1 arm64: dts: qcom: x1e78100-thinkpad-t14s: Add thermal zones for PMICs
Add thermal zones for the ThinkPad T14s and describe the board temperature sensors exposed through the PMK8550 VADC.
Add a passive thermal zone for the keyboard area, which is the main thermal constraint under sustained load. The EC reports a thermal alert at 57.85°C, so use this value as the passive trip point and allow the thermal framework to throttle all CPUs and the GPU when the threshold is reached. Use a 1000 m°C hysteresis and a 500 ms passive polling interval.
An earlier approach used staged CPU cluster throttling in an attempt to start thermal mitigation before reaching the target temperature. Testing did not show a significant improvement compared to throttling all CPUs at the EC thermal alert threshold. It also introduced a latency imbalance between the different CPU clusters, which could negatively affect workloads depending on where tasks are scheduled.
A more optimal solution would require a significantly more complex, system-wide approach, accounting for the workload distribution and the available power and thermal headroom across the CPU clusters and other devices. Such an approach would also require kernel mechanisms which are not currently available. Keep the thermal policy simple here and use a single passive trip, which at least ensures that the system is actively mitigated before reaching temperatures that could ultimately lead to a thermal shutdown.
The mitigation temperature is derived from the platform behaviour when using the balanced power profile available under Windows. A separate change will adjust this trip point dynamically according to events reported by the embedded controller. Name the trip "keyboard-ec-alert" so that the EC driver can identify the corresponding trip point in the device tree.
Also add a 73°C critical trip to shut the system down if the keyboard temperature reaches an unsafe level.
Add a thermal zone for the back cover with a 73°C critical shutdown trip.
Describe the SoC, SMB, SDX, east and west board temperature sensors as monitoring-only thermal zones.
Thermal camera measurements were also used to compare the reported temperatures with the physical temperature of the chassis. The measured values appear to primarily represent temperatures inside the enclosure rather than the user-contact surface temperature. No unsafe external surface temperature was observed during these tests, although this should not be considered a substitute for formal platform thermal qualification.
Finally, enable ADC thermal monitoring on the corresponding PMK8550 VADC channels used by these thermal zones.
--- .../qcom/x1e78100-lenovo-thinkpad-t14s.dtsi | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+)
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +105 -0
@@ -502,6 +502,81 @@ platform { }; }; }; + + thermal-zones { + backcover-thermal { + critical-action = "shutdown"; + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_THM_100K_PU(1)>; + + trips { + backcover-critical { + temperature = <73000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + east-thermal { + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX4_THM_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_ec_alert: keyboard-ec-alert { + temperature = <57850>; + hysteresis = <1000>; + type = "passive"; + }; + + keyboard-critical { + temperature = <73000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&keyboard_ec_alert>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu8 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu9 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu10 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu11 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + sdx-thermal { + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX3_THM_100K_PU(1)>; + }; + + smb-thermal { + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX2_THM_100K_PU(1)>; + }; + + soc-thermal { + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_GPIO_100K_PU(1)>; + }; + + west-thermal { + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX5_THM_100K_PU(1)>; + }; + }; }; &apps_rsc {
@@ -1285,6 +1360,36 @@ usb0_pwr_1p15_reg_en: usb0-pwr-1p15-reg-en-state { }; }; +&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; + }; +}; + &qupv3_0 { status = "okay"; };
Signature · 1 line
2.53.0
Hi,
Quoted 48 lines · Daniel Lezcano
Add thermal zones for the ThinkPad T14s and describe the board temperature sensors exposed through the PMK8550 VADC.
Add a passive thermal zone for the keyboard area, which is the main thermal constraint under sustained load. The EC reports a thermal alert at 57.85°C, so use this value as the passive trip point and allow the thermal framework to throttle all CPUs and the GPU when the threshold is reached. Use a 1000 m°C hysteresis and a 500 ms passive polling interval.
An earlier approach used staged CPU cluster throttling in an attempt to start thermal mitigation before reaching the target temperature. Testing did not show a significant improvement compared to throttling all CPUs at the EC thermal alert threshold. It also introduced a latency imbalance between the different CPU clusters, which could negatively affect workloads depending on where tasks are scheduled.
A more optimal solution would require a significantly more complex, system-wide approach, accounting for the workload distribution and the available power and thermal headroom across the CPU clusters and other devices. Such an approach would also require kernel mechanisms which are not currently available. Keep the thermal policy simple here and use a single passive trip, which at least ensures that the system is actively mitigated before reaching temperatures that could ultimately lead to a thermal shutdown.
The mitigation temperature is derived from the platform behaviour when using the balanced power profile available under Windows. A separate change will adjust this trip point dynamically according to events reported by the embedded controller. Name the trip "keyboard-ec-alert" so that the EC driver can identify the corresponding trip point in the device tree.
Also add a 73°C critical trip to shut the system down if the keyboard temperature reaches an unsafe level.
Add a thermal zone for the back cover with a 73°C critical shutdown trip.
Describe the SoC, SMB, SDX, east and west board temperature sensors as monitoring-only thermal zones.
Thermal camera measurements were also used to compare the reported temperatures with the physical temperature of the chassis. The measured values appear to primarily represent temperatures inside the enclosure rather than the user-contact surface temperature. No unsafe external surface temperature was observed during these tests, although this should not be considered a substitute for formal platform thermal qualification.
Quoted 4 lines
Finally, enable ADC thermal monitoring on the corresponding PMK8550 VADC channels used by these thermal zones.
Signed-off-by Daniel Lezcano <[email protected]>
Thanks, patch looks good to me:
Regards,
Hans
Quoted 127 lines
--- .../qcom/x1e78100-lenovo-thinkpad-t14s.dtsi | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+)arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +105
-0@@ -502,6 +502,81 @@ platform { }; }; }; + + thermal-zones { + backcover-thermal { + critical-action = "shutdown"; + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_THM_100K_PU(1)>; + + trips { + backcover-critical { + temperature = <73000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + east-thermal { + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX4_THM_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_ec_alert: keyboard-ec-alert { + temperature = <57850>; + hysteresis = <1000>; + type = "passive"; + }; + + keyboard-critical { + temperature = <73000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&keyboard_ec_alert>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu8 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu9 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu10 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu11 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + sdx-thermal { + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX3_THM_100K_PU(1)>; + }; + + smb-thermal { + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX2_THM_100K_PU(1)>; + }; + + soc-thermal { + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_GPIO_100K_PU(1)>; + }; + + west-thermal { + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX5_THM_100K_PU(1)>; + }; + }; }; &apps_rsc {@@ -1285,6 +1360,36 @@ usb0_pwr_1p15_reg_en: usb0-pwr-1p15-reg-en-state { }; }; +&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; + }; +}; + &qupv3_0 { status = "okay"; };
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] dts: missing #thermal-sensor-cells causes thermal zone registration failure --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] dts: missing #thermal-sensor-cells causes thermal zone registration failure --
commit fd5ef96fe4a4a5f82c85c0157e689c00a5a97d30
Author: Daniel Lezcano <[email protected]>
arm64: dts: qcom: x1e78100-thinkpad-t14s: Add thermal zones for PMICs
Add thermal zones for the ThinkPad T14s and describe the board temperature sensors exposed through the PMK8550 VADC.
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi platform { · line 509
Quoted 13 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +5
-0@@ -502,6 +502,81 @@ platform { }; }; }; + + thermal-zones { + backcover-thermal { + critical-action = "shutdown"; + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_THM_100K_PU(1)>;
[Severity: High]
Does this setup cause thermal zone registration to fail at boot?
During boot, the thermal framework resolves the thermal-sensors phandle using of_parse_phandle_with_args(), which expects the target node to have a #thermal-sensor-cells property.
Since the target pmk8550_vadc node lacks the #thermal-sensor-cells property, will the device tree parser return -EINVAL, causing thermal_of_zone_register() to abort registration for all these newly added thermal zones?
[ ... ]
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi usb0_pwr_1p15_reg_en: usb0-pwr-1p15-reg-en-state { · line 1366
Quoted 8 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +4
-0@@ -1285,6 +1360,36 @@ usb0_pwr_1p15_reg_en: usb0-pwr-1p15-reg-en-state { }; }; +&pmk8550_vadc { + channel@144 { + qcom,adc-tm; + };
[Severity: High]
Should this override block include #thermal-sensor-cells = <1>;?
Adding the missing property here would allow the thermal framework to successfully parse and register the thermal zones.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Quoted 51 lines · On 10/14/26 21:47, [email protected] wrote:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] dts: missing #thermal-sensor-cells causes thermal zone registration failure --commit
fd5ef96fe4a4a5f82c85c0157e689c00a5a97d30
Author: Daniel Lezcano <[email protected]>arm64: dts: qcom: x1e78100-thinkpad-t14s: Add thermal zones for PMICs
Add thermal zones for the ThinkPad T14s and describe the board temperature sensors exposed through the PMK8550 VADC.
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi platform { · line 509
Quoted 13 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +5
-0@@ -502,6 +502,81 @@ platform { }; }; }; + + thermal-zones { + backcover-thermal { + critical-action = "shutdown"; + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_THM_100K_PU(1)>;[Severity: High]
Does this setup cause thermal zone registration to fail at boot?During boot, the thermal framework resolves the thermal-sensors phandle using
of_parse_phandle_with_args(), which expects the target node to have a #thermal-sensor-cells property.Since the target
pmk8550_vadcnode lacks the #thermal-sensor-cells property, will the device tree parser return-EINVAL, causingthermal_of_zone_register()to abort registration for all these newly added thermal zones?[ ... ]
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi usb0_pwr_1p15_reg_en: usb0-pwr-1p15-reg-en-state { · line 1366
Quoted 8 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +4
-0@@ -1285,6 +1360,36 @@ usb0_pwr_1p15_reg_en: usb0-pwr-1p15-reg-en-state { }; }; +&pmk8550_vadc { + channel@144 { + qcom,adc-tm; + };[Severity: High]
Should this override block include#thermal-sensor-cells = <1>;?
Quoted 2 lines
Adding the missing property here would allow the thermal framework to successfully parse and register the thermal zones.
False positive:
Quoted 41 lines · Daniel Lezcano
Add thermal zones for the ThinkPad T14s and describe the board temperature sensors exposed through the PMK8550 VADC.
Add a passive thermal zone for the keyboard area, which is the main thermal constraint under sustained load. The EC reports a thermal alert at 57.85°C, so use this value as the passive trip point and allow the thermal framework to throttle all CPUs and the GPU when the threshold is reached. Use a 1000 m°C hysteresis and a 500 ms passive polling interval.
An earlier approach used staged CPU cluster throttling in an attempt to start thermal mitigation before reaching the target temperature. Testing did not show a significant improvement compared to throttling all CPUs at the EC thermal alert threshold. It also introduced a latency imbalance between the different CPU clusters, which could negatively affect workloads depending on where tasks are scheduled.
A more optimal solution would require a significantly more complex, system-wide approach, accounting for the workload distribution and the available power and thermal headroom across the CPU clusters and other devices. Such an approach would also require kernel mechanisms which are not currently available. Keep the thermal policy simple here and use a single passive trip, which at least ensures that the system is actively mitigated before reaching temperatures that could ultimately lead to a thermal shutdown.
The mitigation temperature is derived from the platform behaviour when using the balanced power profile available under Windows. A separate change will adjust this trip point dynamically according to events reported by the embedded controller. Name the trip "keyboard-ec-alert" so that the EC driver can identify the corresponding trip point in the device tree.
Also add a 73°C critical trip to shut the system down if the keyboard temperature reaches an unsafe level.
Add a thermal zone for the back cover with a 73°C critical shutdown trip.
Describe the SoC, SMB, SDX, east and west board temperature sensors as monitoring-only thermal zones.
Quoted 7 lines
Thermal camera measurements were also used to compare the reported temperatures with the physical temperature of the chassis. The measured values appear to primarily represent temperatures inside the enclosure rather than the user-contact surface temperature. No unsafe external surface temperature was observed during these tests, although this should not be considered a substitute for formal platform thermal qualification.
Thanks to Mark, I was able to get some info on the location/purpose of the thermal sensors in the T14s. As you noted already here, the sensors are primarily focused on specific components inside the enclosure rather than user-contact surface temperatures. Below I added some suggestions for more accurate names for the thermal zones. Perhaps that helps to optimize the thermal control further.
Quoted 13 lines
Finally, enable ADC thermal monitoring on the corresponding PMK8550 VADC channels used by these thermal zones.
Signed-off-by Daniel Lezcano <[email protected]>--- .../qcom/x1e78100-lenovo-thinkpad-t14s.dtsi | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+)arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +0
-0
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi platform { · line 509
Quoted 8 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +5
-0@@ -502,6 +502,81 @@ platform { }; }; }; + + thermal-zones { + backcover-thermal { + critical-action = "shutdown"; + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_THM_100K_PU(1)>;
dram-thermal or memory-thermal (or maybe keyboard-thermal if you want to give it a user-surface name, although that purpose seems to be secondary).
Next to DRAM memory, on the top part of the mainboard, facing upwards to the keyboard. Unrelated to the backcover.
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi platform { · line 516
Quoted 7 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +7
-0+ + trips { + backcover-critical { + temperature = <73000>; + hysteresis = <1000>; + type = "critical"; + };
Is this critical temperature is appropriate for the DRAM temperature? Windows seems to have 115°C here as critical trip point which is maybe a bit too high.
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi platform { · line 521
Quoted 5 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +5
-0+ }; + }; + + east-thermal { + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX4_THM_100K_PU(1)>;
gpu-pmic-thermal (next to GPU-related PMICs close to the SoC)
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi platform { · line 528
Quoted 7 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +7
-0+ }; + + keyboard-thermal { + critical-action = "shutdown"; + polling-delay-passive = <500>; + + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX2_GPIO_100K_PU(1)>;
fan-thermal or heatpipe-thermal (or maybe backcover-thermal if you want to give it a user-surface name, although that purpose seems to be secondary).
Next to fan/heat pipe, on the bottom part of the mainboard, facing downwards to the back cover. Unrelated to the keyboard.
Quoted 27 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +27
-0+ + trips { + keyboard_ec_alert: keyboard-ec-alert { + temperature = <57850>; + hysteresis = <1000>; + type = "passive"; + }; + + keyboard-critical { + temperature = <73000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&keyboard_ec_alert>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu8 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi platform { · line 565
Quoted 10 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +10
-0+ <&cpu9 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu10 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu11 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + sdx-thermal { + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX3_THM_100K_PU(1)>;
wwan-thermal
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi platform { · line 569
Quoted 4 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +4
-0+ }; + + smb-thermal { + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX2_THM_100K_PU(1)>;
charger-thermal
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi platform { · line 573
Quoted 4 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +4
-0+ }; + + soc-thermal { + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_GPIO_100K_PU(1)>;
cpu-pmic-thermal (next to CPU-related PMICs close to SoC)
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi platform { · line 577
Quoted 4 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +4
-0+ }; + + west-thermal { + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX5_THM_100K_PU(1)>;
typec-thermal or usbc-thermal
Next to USB-C ports, bottom part of mainboard, facing towards the back cover.
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi platform { · line 579
Quoted 2 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +2
-0+ }; + };
There is also ssd-thermal @ SYS_THERM7
thermal-sensors = <&pmk8550_adc_tm ADC5_GEN3_AMUX6_THM_100K_PU(1)>; as I mentioned before.
Windows uses the EC sensors for throttling, although given that we don't have interrupt support for the EC yet, I think it is fine to initially use the PMIC sensors.
Thanks,
Stephan
Thanks Stephan for the additional information, that's very helpful.
We currently have an urgent thermal issue on this platform, and getting this thermal mitigation upstream is important to prevent overheating under sustained workloads.
Would it be acceptable to address the sensor naming and description improvements in a follow-up patch, so that we can get the thermal protection in place first?
Of course, if any of these changes are critical for the correctness of the thermal mitigation, we should address them now.
Quoted 189 lines · Stephan Gerhold
Quoted 41 lines · Daniel Lezcano
Add thermal zones for the ThinkPad T14s and describe the board temperature sensors exposed through the PMK8550 VADC.
Add a passive thermal zone for the keyboard area, which is the main thermal constraint under sustained load. The EC reports a thermal alert at 57.85°C, so use this value as the passive trip point and allow the thermal framework to throttle all CPUs and the GPU when the threshold is reached. Use a 1000 m°C hysteresis and a 500 ms passive polling interval.
An earlier approach used staged CPU cluster throttling in an attempt to start thermal mitigation before reaching the target temperature. Testing did not show a significant improvement compared to throttling all CPUs at the EC thermal alert threshold. It also introduced a latency imbalance between the different CPU clusters, which could negatively affect workloads depending on where tasks are scheduled.
A more optimal solution would require a significantly more complex, system-wide approach, accounting for the workload distribution and the available power and thermal headroom across the CPU clusters and other devices. Such an approach would also require kernel mechanisms which are not currently available. Keep the thermal policy simple here and use a single passive trip, which at least ensures that the system is actively mitigated before reaching temperatures that could ultimately lead to a thermal shutdown.
The mitigation temperature is derived from the platform behaviour when using the balanced power profile available under Windows. A separate change will adjust this trip point dynamically according to events reported by the embedded controller. Name the trip "keyboard-ec-alert" so that the EC driver can identify the corresponding trip point in the device tree.
Also add a 73°C critical trip to shut the system down if the keyboard temperature reaches an unsafe level.
Add a thermal zone for the back cover with a 73°C critical shutdown trip.
Describe the SoC, SMB, SDX, east and west board temperature sensors as monitoring-only thermal zones.
Quoted 7 lines
Thermal camera measurements were also used to compare the reported temperatures with the physical temperature of the chassis. The measured values appear to primarily represent temperatures inside the enclosure rather than the user-contact surface temperature. No unsafe external surface temperature was observed during these tests, although this should not be considered a substitute for formal platform thermal qualification.
Thanks to Mark, I was able to get some info on the location/purpose of the thermal sensors in the T14s. As you noted already here, the sensors are primarily focused on specific components inside the enclosure rather than user-contact surface temperatures. Below I added some suggestions for more accurate names for the thermal zones. Perhaps that helps to optimize the thermal control further.
Quoted 13 lines
Finally, enable ADC thermal monitoring on the corresponding PMK8550 VADC channels used by these thermal zones.
Signed-off-by Daniel Lezcano<[email protected]>--- .../qcom/x1e78100-lenovo-thinkpad-t14s.dtsi | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+)arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +0
-0arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi platform { · line 509
Quoted 8 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +5
-0@@ -502,6 +502,81 @@ platform { }; }; }; + + thermal-zones { + backcover-thermal { + critical-action = "shutdown"; + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_THM_100K_PU(1)>;dram-thermal or memory-thermal (or maybe keyboard-thermal if you want to give it a user-surface name, although that purpose seems to be secondary).
Next to DRAM memory, on the top part of the mainboard, facing upwards to the keyboard. Unrelated to the backcover.
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi platform { · line 516
Quoted 7 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +7
-0+ + trips { + backcover-critical { + temperature = <73000>; + hysteresis = <1000>; + type = "critical"; + };Is this critical temperature is appropriate for the DRAM temperature? Windows seems to have 115°C here as critical trip point which is maybe a bit too high.
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi platform { · line 521
Quoted 5 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +5
-0+ }; + }; + + east-thermal { + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX4_THM_100K_PU(1)>;gpu-pmic-thermal (next to GPU-related PMICs close to the SoC)
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi platform { · line 528
Quoted 7 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +7
-0+ }; + + keyboard-thermal { + critical-action = "shutdown"; + polling-delay-passive = <500>; + + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX2_GPIO_100K_PU(1)>;fan-thermal or heatpipe-thermal (or maybe backcover-thermal if you want to give it a user-surface name, although that purpose seems to be secondary).
Next to fan/heat pipe, on the bottom part of the mainboard, facing downwards to the back cover. Unrelated to the keyboard.
Quoted 27 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +27
-0+ + trips { + keyboard_ec_alert: keyboard-ec-alert { + temperature = <57850>; + hysteresis = <1000>; + type = "passive"; + }; + + keyboard-critical { + temperature = <73000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&keyboard_ec_alert>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu8 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi platform { · line 565
Quoted 10 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +10
-0+ <&cpu9 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu10 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu11 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + sdx-thermal { + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX3_THM_100K_PU(1)>;wwan-thermal
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi platform { · line 569
Quoted 4 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +4
-0+ }; + + smb-thermal { + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX2_THM_100K_PU(1)>;charger-thermal
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi platform { · line 573
Quoted 4 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +4
-0+ }; + + soc-thermal { + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_GPIO_100K_PU(1)>;cpu-pmic-thermal (next to CPU-related PMICs close to SoC)
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi platform { · line 577
Quoted 4 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +4
-0+ }; + + west-thermal { + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX5_THM_100K_PU(1)>;typec-thermal or usbc-thermal
Next to USB-C ports, bottom part of mainboard, facing towards the back cover.
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi platform { · line 579
Quoted 2 lines
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi +2
-0+ }; + };There is also ssd-thermal @
SYS_THERM7
thermal-sensors = <&pmk8550_adc_tmADC5_GEN3_AMUX6_THM_100K_PU(1)>; as I mentioned before.Windows uses the EC sensors for throttling, although given that we don't have interrupt support for the EC yet, I think it is fine to initially use the PMIC sensors.
Thanks,
Stephan
Quoted 7 lines · Daniel Lezcano
Thanks Stephan for the additional information, that's very helpful.
We currently have an urgent thermal issue on this platform, and getting this thermal mitigation upstream is important to prevent overheating under sustained workloads.
Quoted 7 lines
Would it be acceptable to address the sensor naming and description improvements in a follow-up patch, so that we can get the thermal protection in place first?
Of course, if any of these changes are critical for the correctness of the thermal mitigation, we should address them now.
I have no intention to delay this patch. In fact, since I'm using the latest unmodified stable kernel on my T14s, I'm also suffering from these thermal issues. :-)
On the other hand, we are at the beginning of the merge window and Bjorn is unlikely to queue patches until that ends. The changes that I suggested are purely cosmetic (the names of the thermal zones), there is no need to repeat the thermal validation. The throttling behavior will be identical no matter which name is used for the thermal zones.
IMO we should use the remaining time until the merge window ends to correct the naming to avoid any confusion for people reading the patch once it lands.
Thanks,
Stephan
Quoted 26 lines · Stephan Gerhold
Quoted 7 lines · Daniel Lezcano
Thanks Stephan for the additional information, that's very helpful.
We currently have an urgent thermal issue on this platform, and getting this thermal mitigation upstream is important to prevent overheating under sustained workloads.
Quoted 7 lines
Would it be acceptable to address the sensor naming and description improvements in a follow-up patch, so that we can get the thermal protection in place first?
Of course, if any of these changes are critical for the correctness of the thermal mitigation, we should address them now.
I have no intention to delay this patch. In fact, since I'm using the latest unmodified stable kernel on my T14s, I'm also suffering from these thermal issues. :-)
On the other hand, we are at the beginning of the merge window and Bjorn is unlikely to queue patches until that ends. The changes that I suggested are purely cosmetic (the names of the thermal zones), there is no need to repeat the thermal validation. The throttling behavior will be identical no matter which name is used for the thermal zones.
Quoted 3 lines
IMO we should use the remaining time until the merge window ends to correct the naming to avoid any confusion for people reading the patch once it lands.
Ok, fair enough
I propose the following names for the thermal zone:
dram-board-thermal
gpu-board-thermal
fan-board-thermal
wwan-board-thermal
chg-board-thermal
cpu-board-thermal
typec-board-thermal
so we can capture with the name the ones related to the non-on-die sensors
Sounds good ?
Quoted 43 lines · Daniel Lezcano
Quoted 26 lines · Stephan Gerhold
Quoted 7 lines · Daniel Lezcano
Thanks Stephan for the additional information, that's very helpful.
We currently have an urgent thermal issue on this platform, and getting this thermal mitigation upstream is important to prevent overheating under sustained workloads.
Quoted 7 lines
Would it be acceptable to address the sensor naming and description improvements in a follow-up patch, so that we can get the thermal protection in place first?
Of course, if any of these changes are critical for the correctness of the thermal mitigation, we should address them now.
I have no intention to delay this patch. In fact, since I'm using the latest unmodified stable kernel on my T14s, I'm also suffering from these thermal issues. :-)
On the other hand, we are at the beginning of the merge window and Bjorn is unlikely to queue patches until that ends. The changes that I suggested are purely cosmetic (the names of the thermal zones), there is no need to repeat the thermal validation. The throttling behavior will be identical no matter which name is used for the thermal zones.
Quoted 3 lines
IMO we should use the remaining time until the merge window ends to correct the naming to avoid any confusion for people reading the patch once it lands.
Ok, fair enough
I propose the following names for the thermal zone:
dram-board-thermal
gpu-board-thermal
fan-board-thermal
wwan-board-thermal
chg-board-thermal
cpu-board-thermal
typec-board-thermal
Quoted 3 lines
so we can capture with the name the ones related to the non-on-die sensors
Sounds good ?
That works for me, I don't have a strong opinion about the naming (maybe @Konrad has?). I guess people reading this might mistakenly assume that these refer to separate "sub-boards" in the sense that there is a "mainboard", a "Type-C board", a "DRAM board", a "GPU board", etc. But I can't think of a better name either. :-)
Thanks,
Stephan
Quoted 46 lines · Stephan Gerhold
Quoted 45 lines · Daniel Lezcano
Quoted 26 lines · Stephan Gerhold
Quoted 7 lines · Daniel Lezcano
Thanks Stephan for the additional information, that's very helpful.
We currently have an urgent thermal issue on this platform, and getting this thermal mitigation upstream is important to prevent overheating under sustained workloads.
Quoted 7 lines
Would it be acceptable to address the sensor naming and description improvements in a follow-up patch, so that we can get the thermal protection in place first?
Of course, if any of these changes are critical for the correctness of the thermal mitigation, we should address them now.
I have no intention to delay this patch. In fact, since I'm using the latest unmodified stable kernel on my T14s, I'm also suffering from these thermal issues. :-)
On the other hand, we are at the beginning of the merge window and Bjorn is unlikely to queue patches until that ends. The changes that I suggested are purely cosmetic (the names of the thermal zones), there is no need to repeat the thermal validation. The throttling behavior will be identical no matter which name is used for the thermal zones.
Quoted 3 lines
IMO we should use the remaining time until the merge window ends to correct the naming to avoid any confusion for people reading the patch once it lands.
Ok, fair enough
I propose the following names for the thermal zone:
dram-board-thermal
gpu-board-thermal
fan-board-thermal
wwan-board-thermal
chg-board-thermal
cpu-board-thermal
typec-board-thermalso we can capture with the name the ones related to the non-on-die sensors
Quoted 7 lines
Quoted 1 line
Sounds good ?
That works for me, I don't have a strong opinion about the naming (maybe @Konrad has?). I guess people reading this might mistakenly assume that these refer to separate "sub-boards" in the sense that there is a "mainboard", a "Type-C board", a "DRAM board", a "GPU board", etc. But I can't think of a better name either. :-)
Hmm, yes. That is a good a point