* [PATCH v2 0/3] arm64: dts: qcom: hamoa-crd: Introduce thermistor-based CPU throttling
@ 2026-09-05 3:05 Bjorn Andersson
2026-09-05 3:05 ` [PATCH v2 1/3] arm64: dts: qcom: hamoa-pmics: Mark pmk8550_vadc thermal sensor provider Bjorn Andersson
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Bjorn Andersson @ 2026-09-05 3:05 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Abel Vesa, Krzysztof Kozlowski, Shawn Guo
The Hamoa CRD has multiple thermistors throughout the board to allow
measuring the temperature across different parts of the system. In line
with other platforms these are wired to the PMIC ADC and thermal monitor
blocks.
While "limits" hardware management provides rapid throttling of the
CPU cores, software needs to throttle the system e.g. during prolonged
CPU usage. Wire up the 7 thermistors found in the CRD as thermal zones
and throttle the CPU based on the "keyboard hotspot" thermistor.
The same mechanism is used on other Hamoa-based boards, but the
thermistor configuration and mapping is board-specific. As such, these
settings goes into the CRD dts. It's plausible that it could be shared
with the Purwa CRD, but this hasn't been confirmed.
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
---
Changes in v2:
- Dropped second keyboard alert as the cooling maps where the same
- Added mitigation of GPU based on back-cover sensor
- Changed keyboard trip label prefixes from skin_ to keyboard_
- Added "critical-action" to clarify the expected behavior
- Link to v1: https://patch.msgid.link/20260830-hamoa-sys-therm-v1-0-27108c40fba5@oss.qualcomm.com
To: Bjorn Andersson <andersson@kernel.org>
To: Konrad Dybcio <konradybcio@kernel.org>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
Cc: linux-arm-msm@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
Bjorn Andersson (3):
arm64: dts: qcom: hamoa-pmics: Mark pmk8550_vadc thermal sensor provider
arm64: dts: qcom: hamoa-crd: Add thermal control
arm64: defconfig: Enable PMIC5 Gen3 ADC thermal monitor
arch/arm64/boot/dts/qcom/hamoa-pmics.dtsi | 1 +
arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 119 ++++++++++++++++++++++++++++++
arch/arm64/configs/defconfig | 2 +
3 files changed, 122 insertions(+)
---
base-commit: 3d83758432b5e6ed9507500a57efb0f3af41ee7d
change-id: 20260830-hamoa-sys-therm-fb4f80fd6770
Best regards,
--
Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/3] arm64: dts: qcom: hamoa-pmics: Mark pmk8550_vadc thermal sensor provider
2026-09-05 3:05 [PATCH v2 0/3] arm64: dts: qcom: hamoa-crd: Introduce thermistor-based CPU throttling Bjorn Andersson
@ 2026-09-05 3:05 ` Bjorn Andersson
2026-09-05 3:05 ` [PATCH v2 2/3] arm64: dts: qcom: hamoa-crd: Add thermal control Bjorn Andersson
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2026-09-05 3:05 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson, Abel Vesa
The PMK8550 VADC is typically providing thermal measurements based on
on-board thermistors, define #thermal-sensor-cells to allow referencing
it as such.
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/hamoa-pmics.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/qcom/hamoa-pmics.dtsi b/arch/arm64/boot/dts/qcom/hamoa-pmics.dtsi
index 17d754d57e18..7fad4a9b92fa 100644
--- a/arch/arm64/boot/dts/qcom/hamoa-pmics.dtsi
+++ b/arch/arm64/boot/dts/qcom/hamoa-pmics.dtsi
@@ -288,6 +288,7 @@ pmk8550_vadc: adc@9000 {
#address-cells = <1>;
#size-cells = <0>;
#io-channel-cells = <1>;
+ #thermal-sensor-cells = <1>;
pinctrl-0 = <&sys_therm_0_gpio3>, <&sys_therm_1_gpio4>;
pinctrl-names = "default";
--
2.55.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 2/3] arm64: dts: qcom: hamoa-crd: Add thermal control
2026-09-05 3:05 [PATCH v2 0/3] arm64: dts: qcom: hamoa-crd: Introduce thermistor-based CPU throttling Bjorn Andersson
2026-09-05 3:05 ` [PATCH v2 1/3] arm64: dts: qcom: hamoa-pmics: Mark pmk8550_vadc thermal sensor provider Bjorn Andersson
@ 2026-09-05 3:05 ` Bjorn Andersson
2026-10-20 8:11 ` Konrad Dybcio
2026-09-05 3:05 ` [PATCH v2 3/3] arm64: defconfig: Enable PMIC5 Gen3 ADC thermal monitor Bjorn Andersson
2026-09-16 22:31 ` (subset) [PATCH v2 0/3] arm64: dts: qcom: hamoa-crd: Introduce thermistor-based CPU throttling Bjorn Andersson
3 siblings, 1 reply; 6+ messages in thread
From: Bjorn Andersson @ 2026-09-05 3:05 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson, Abel Vesa
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.
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.
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 119 ++++++++++++++++++++++++++++++
1 file changed, 119 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
index 429deffcf3e9..29150fe91250 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts
@@ -11,6 +11,95 @@
/ {
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 {
+ critical-action = "shutdown";
+ polling-delay-passive = <1000>;
+
+ thermal-sensors = <&pmk8550_vadc ADC5_GEN3_AMUX2_GPIO_100K_PU(1)>;
+
+ trips {
+ keyboard_alert0: trip-point0 {
+ 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 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 {
+ 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)>;
+ };
+ };
};
&gpu_zap_shader {
@@ -20,3 +109,33 @@ &gpu_zap_shader {
&iris {
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;
+ };
+};
--
2.55.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 3/3] arm64: defconfig: Enable PMIC5 Gen3 ADC thermal monitor
2026-09-05 3:05 [PATCH v2 0/3] arm64: dts: qcom: hamoa-crd: Introduce thermistor-based CPU throttling Bjorn Andersson
2026-09-05 3:05 ` [PATCH v2 1/3] arm64: dts: qcom: hamoa-pmics: Mark pmk8550_vadc thermal sensor provider Bjorn Andersson
2026-09-05 3:05 ` [PATCH v2 2/3] arm64: dts: qcom: hamoa-crd: Add thermal control Bjorn Andersson
@ 2026-09-05 3:05 ` Bjorn Andersson
2026-09-16 22:31 ` (subset) [PATCH v2 0/3] arm64: dts: qcom: hamoa-crd: Introduce thermistor-based CPU throttling Bjorn Andersson
3 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2026-09-05 3:05 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Bjorn Andersson,
Abel Vesa, Krzysztof Kozlowski, Shawn Guo
All Qualcomm Hamoa-based devices uses PMIC5 Gen3 ADC connected to
thermistors for measuring temperature across the system.
Enable the Qualcomm PMIC Gen3 ADC, and it's associated ADC_TM auxiliary,
drivers to enable these use cases.
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Tested-by: Shawn Guo <shengchao.guo@oss.qualcomm.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
---
arch/arm64/configs/defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 6ec8d3a69c98..08ff68643e21 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -800,6 +800,7 @@ CONFIG_TEGRA_BPMP_THERMAL=m
CONFIG_GENERIC_ADC_THERMAL=m
CONFIG_QCOM_TSENS=y
CONFIG_QCOM_SPMI_ADC_TM5=m
+CONFIG_QCOM_SPMI_ADC_TM5_GEN3=m
CONFIG_QCOM_SPMI_TEMP_ALARM=m
CONFIG_QCOM_LMH=m
CONFIG_UNIPHIER_THERMAL=y
@@ -1699,6 +1700,7 @@ CONFIG_MEDIATEK_MT6359_AUXADC=m
CONFIG_MEDIATEK_MT6577_AUXADC=m
CONFIG_QCOM_SPMI_VADC=m
CONFIG_QCOM_SPMI_ADC5=m
+CONFIG_QCOM_SPMI_ADC5_GEN3=m
CONFIG_ROCKCHIP_SARADC=m
CONFIG_RZG2L_ADC=m
CONFIG_RZT2H_ADC=m
--
2.55.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: (subset) [PATCH v2 0/3] arm64: dts: qcom: hamoa-crd: Introduce thermistor-based CPU throttling
2026-09-05 3:05 [PATCH v2 0/3] arm64: dts: qcom: hamoa-crd: Introduce thermistor-based CPU throttling Bjorn Andersson
` (2 preceding siblings ...)
2026-09-05 3:05 ` [PATCH v2 3/3] arm64: defconfig: Enable PMIC5 Gen3 ADC thermal monitor Bjorn Andersson
@ 2026-09-16 22:31 ` Bjorn Andersson
3 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2026-09-16 22:31 UTC (permalink / raw)
To: Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Bjorn Andersson
Cc: linux-arm-msm, devicetree, linux-kernel, Abel Vesa,
Krzysztof Kozlowski, Shawn Guo
On Sat, 05 Sep 2026 03:05:02 +0000, Bjorn Andersson wrote:
> The Hamoa CRD has multiple thermistors throughout the board to allow
> measuring the temperature across different parts of the system. In line
> with other platforms these are wired to the PMIC ADC and thermal monitor
> blocks.
>
> While "limits" hardware management provides rapid throttling of the
> CPU cores, software needs to throttle the system e.g. during prolonged
> CPU usage. Wire up the 7 thermistors found in the CRD as thermal zones
> and throttle the CPU based on the "keyboard hotspot" thermistor.
>
> [...]
Applied, thanks!
[3/3] arm64: defconfig: Enable PMIC5 Gen3 ADC thermal monitor
commit: 897cf6d54f366885e190e75b3a221e7b3ae35065
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/3] arm64: dts: qcom: hamoa-crd: Add thermal control
2026-09-05 3:05 ` [PATCH v2 2/3] arm64: dts: qcom: hamoa-crd: Add thermal control Bjorn Andersson
@ 2026-10-20 8:11 ` Konrad Dybcio
0 siblings, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2026-10-20 8:11 UTC (permalink / raw)
To: Bjorn Andersson, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Abel Vesa
On 9/5/26 5:05 AM, 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.
>
> 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.
>
> Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
> ---
A good start!
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-10-20 8:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-05 3:05 [PATCH v2 0/3] arm64: dts: qcom: hamoa-crd: Introduce thermistor-based CPU throttling Bjorn Andersson
2026-09-05 3:05 ` [PATCH v2 1/3] arm64: dts: qcom: hamoa-pmics: Mark pmk8550_vadc thermal sensor provider Bjorn Andersson
2026-09-05 3:05 ` [PATCH v2 2/3] arm64: dts: qcom: hamoa-crd: Add thermal control Bjorn Andersson
2026-10-20 8:11 ` Konrad Dybcio
2026-09-05 3:05 ` [PATCH v2 3/3] arm64: defconfig: Enable PMIC5 Gen3 ADC thermal monitor Bjorn Andersson
2026-09-16 22:31 ` (subset) [PATCH v2 0/3] arm64: dts: qcom: hamoa-crd: Introduce thermistor-based CPU throttling Bjorn Andersson
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®