From: Stephan Gerhold <stephan.gerhold@linaro.org>
To: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] arm64: dts: qcom: hamoa-crd: Add thermal control
Date: Mon, 31 Aug 2026 10:58:56 +0200 [thread overview]
Message-ID: <apVCUObyxf8Akbsc@linaro.org> (raw)
In-Reply-To: <20260830-hamoa-sys-therm-v1-2-27108c40fba5@oss.qualcomm.com>
On Sun, Aug 30, 2026 at 09:02:03PM +0000, Bjorn Andersson wrote:
> The "limits" hardware performs rapid thermal management of the CPU
> cores, but during prolonged CPU usage the system's overall temperature
> need to be further managed by software.
>
> The reference design provides seven "system thermistors", connected to
> the PMK8550 VADC. Particularly interesting is the "keyboard hotspot
> thermistor", which is wired up to sys_therm1.
>
> Use this to throttle the CPUs, in the same way that we're throttling
> previous generation laptops based on "skin-temp". The trips are chosen
> from those existing examples, but are comparable with the ACPI thermal
> policy.
>
In general, following the ACPI thermal policy as close as possible is
better than following existing examples. Most X1E-based devices use
hybrid active/passive cooling, with the fan controlled independently by
the EC. If you start throttling even just 1-2°C before the EC reaches
its highest fan trip point, it will result in bad performance. Linux
will try to keep the temperature below the specified temperature, and
the EC will never fully ramp up the fan.
This is what I determined from the CRD ACPI tables last year:
https://github.com/stephan-gh/linux/commit/24f053436ec2eaf70968803adfa8c17905e53cae.patch
The fact that GPU is only throttled based on back-thermal is a little
odd, but this is what the ACPI tables specified back then as far as
I could tell (maybe it was fixed since then).
Your changes seem close enough to not cause the performance problem
I mentioned above, although I think it would be worth setting a good
examples for others to follow.
> While not used for cooling/throttling, also add the other thermal zones
> for temperature reporting purposes.
>
> Enable thermal-monitor mode for all 7 channels in the ADC.
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
> ---
> arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 116 ++++++++++++++++++++++++++++++
> 1 file changed, 116 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
> index 429deffcf3e9..065af18357d7 100644
> --- a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
> +++ b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
> @@ -11,6 +11,92 @@
> / {
> model = "Qualcomm Technologies, Inc. X1E80100 CRD";
> compatible = "qcom,x1e80100-crd", "qcom,x1e80100";
> +
> + thermal-zones {
> + soc-thermal {
> + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_GPIO_100K_PU(1)>;
> + };
> +
> + keyboard-thermal {
> + polling-delay-passive = <250>;
> +
> + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX2_GPIO_100K_PU(1)>;
> +
> + trips {
> + skin_alert0: trip-point0 {
> + temperature = <55000>;
> + hysteresis = <1000>;
> + type = "passive";
> + };
> +
> + skin_alert1: trip-point1 {
> + temperature = <58000>;
> + hysteresis = <1000>;
> + type = "passive";
> + };
What does this second trip point do differently than the first? It has
the same cooling devices. Will it try throttling "harder" than before?
I know sc8280xp-lenovo-thinkpad-x13s.dts has the same, but I'm not
entirely sure what it does there either.
My experience was if you specify 55°C as one passive trip point, then
Linux will try its best to keep it with the specified cooling devices.
> +
> + skin-crit {
> + temperature = <73000>;
> + hysteresis = <1000>;
> + type = "critical";
> + };
> + };
> +
> + cooling-maps {
> + map0 {
> + trip = <&skin_alert0>;
> + 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>;
> + };
> +
> + map1 {
> + trip = <&skin_alert1>;
> + 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>;
> + };
> + };
> + };
> +
> + backcover-thermal {
> + thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX1_THM_100K_PU(1)>;
> + };
Should we add throttling here as well to match Windows?
Thanks,
Stephan
next prev parent reply other threads:[~2026-08-31 8:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-30 21:02 [PATCH 0/3] arm64: dts: qcom: hamoa-crd: Introduce thermistor-based CPU throttling Bjorn Andersson
2026-08-30 21:02 ` [PATCH 1/3] arm64: dts: qcom: hamoa-pmics: Mark pmk8550_vadc thermal sensor provider Bjorn Andersson
2026-08-31 8:32 ` Abel Vesa
2026-08-30 21:02 ` [PATCH 2/3] arm64: dts: qcom: hamoa-crd: Add thermal control Bjorn Andersson
2026-08-31 8:32 ` Abel Vesa
2026-08-31 8:58 ` Stephan Gerhold [this message]
2026-08-31 14:20 ` Bjorn Andersson
2026-08-31 16:11 ` Stephan Gerhold
2026-08-31 18:14 ` Bjorn Andersson
2026-08-31 19:11 ` Stephan Gerhold
2026-08-30 21:02 ` [PATCH 3/3] arm64: defconfig: Enable PMIC5 Gen3 ADC thermal monitor Bjorn Andersson
2026-08-31 8:31 ` Abel Vesa
2026-09-01 11:50 ` Krzysztof Kozlowski
2026-09-03 2:52 ` Shawn Guo
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=apVCUObyxf8Akbsc@linaro.org \
--to=stephan.gerhold@linaro.org \
--cc=andersson@kernel.org \
--cc=bjorn.andersson@oss.qualcomm.com \
--cc=conor+dt@kernel.org \
--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