mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans de Goede <johannes.goede@oss.qualcomm.com>
To: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>,
	andersson@kernel.org, konradybcio@kernel.org,
	abelvesa@kernel.org
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: dts: qcom: x1e78100-thinkpad-t14s: Add thermal zones for PMICs
Date: Wed, 23 Sep 2026 21:43:28 +0200	[thread overview]
Message-ID: <067c2405-575d-44bb-8301-9c8dbd00febe@oss.qualcomm.com> (raw)
In-Reply-To: <339deca4-8b35-4fb2-bc1d-adf471f94d06@oss.qualcomm.com>

Hi all,

On 23-Sep-26 21:07, johannes.goede@oss.qualcomm.com wrote:
> Hi all,
> 
> On 22-Sep-26 20:18, Daniel Lezcano wrote:
>> 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.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
>> ---
>>  .../qcom/x1e78100-lenovo-thinkpad-t14s.dts    | 142 ++++++++++++++++++
>>  1 file changed, 142 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts
>> index 5cc6a63d1ef6..9407868864ad 100644
>> --- a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts
>> +++ b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts
> 
> 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.

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




>> @@ -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;
>> +	};
>> +};
> 


      reply	other threads:[~2026-09-23 19:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22 18:18 Daniel Lezcano
2026-09-23  9:08 ` Konrad Dybcio
2026-09-23 19:07 ` johannes.goede
2026-09-23 19:43   ` Hans de Goede [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=067c2405-575d-44bb-8301-9c8dbd00febe@oss.qualcomm.com \
    --to=johannes.goede@oss.qualcomm.com \
    --cc=abelvesa@kernel.org \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=daniel.lezcano@oss.qualcomm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®