* [PATCH v4 0/4] arm64: dts: qcom: sm8650: rework CPU & GPU thermal zones
@ 2025-02-03 13:23 Neil Armstrong
2025-02-03 13:23 ` [PATCH v4 1/4] arm64: dts: qcom: sm8650: drop cpu thermal passive trip points Neil Armstrong
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Neil Armstrong @ 2025-02-03 13:23 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Neil Armstrong, Konrad Dybcio
On the SM8650 platform, the dynamic clock and voltage scaling (DCVS) for
the CPUs is handled by hardware & firmware using factory and
form-factor determined parameters in order to maximize frequency while
keeping the temperature way below the junction temperature where the SoC
would experience a thermal shutdown if not permanent damages.
On the other side, the High Level Ooperating System (HLOS), like Linux,
is able to adjust the CPU and GPU frequency using the internal SoC
temperature sensors (here tsens) and it's UP/LOW interrupts, but it
effectly does the same work twice for CPU in an less effective manner.
Let's take the CPU Hardware & Firmware action in account and design the
thermal zones trip points and cooling devices mapping to use the HLOS
as a safety warant in case the platform experiences a temperature surge
to helpfully avoid a thermal shutdown and handle the scenario gracefully.
On the CPU side, the LMh hardware does the DCVS control loop, so
only keep the critical trip point that would do a software system
reboot as an emergency action to avoid the thermal shutdown.
On the GPU side, the GPU can achieve much higher temperature,
update the trip point with the downstream implementation as a
reference.
Those 2 changes optimizes the thermal management design by avoiding
concurrent thermal management, calculations & avoidable interrupts
for CPU, and allows us to use reach higher OPPs for the GPUs and
squeeze more performances in both cases.
While we're at it, also harmonize the remaining thermal blocks
by using 110C as hot trip point, and 115 as critical trip point,
and remove the unneeded polling-delay-passive properties.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
Changes in v4:
- Also uniformize the other thermal blocks, using 110 as hot, 115 as critical
- Also remove the uneeded polling-delay-passive
- Link to v3: https://lore.kernel.org/r/20250129-topic-sm8650-thermal-cpu-idle-v3-0-62ab1a64098d@linaro.org
Changes in v3:
- The GMU doesn't handle temperature, remove it from all texts, just bump the temps
- Link to v2: https://lore.kernel.org/r/20250110-topic-sm8650-thermal-cpu-idle-v2-0-5787ad79abbb@linaro.org
Changes in v2:
- Drop idle injection
- only keep critical trip points
- reword commmit msg and cover letter
- Link to v1: https://lore.kernel.org/r/20250103-topic-sm8650-thermal-cpu-idle-v1-0-faa1f011ecd9@linaro.org
---
Neil Armstrong (4):
arm64: dts: qcom: sm8650: drop cpu thermal passive trip points
arm64: dts: qcom: sm8650: setup gpu thermal with higher temperatures
arm64: dts: qcom: sm8650: harmonize all unregulated thermal trip points
arm64: dts: qcom: sm8650: drop remaining polling-delay-passive properties
arch/arm64/boot/dts/qcom/sm8650.dtsi | 430 ++++++++++-------------------------
1 file changed, 117 insertions(+), 313 deletions(-)
---
base-commit: 8155b4ef3466f0e289e8fcc9e6e62f3f4dceeac2
change-id: 20250103-topic-sm8650-thermal-cpu-idle-1e19181a94ed
Best regards,
--
Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v4 1/4] arm64: dts: qcom: sm8650: drop cpu thermal passive trip points
2025-02-03 13:23 [PATCH v4 0/4] arm64: dts: qcom: sm8650: rework CPU & GPU thermal zones Neil Armstrong
@ 2025-02-03 13:23 ` Neil Armstrong
2025-02-03 13:29 ` Konrad Dybcio
2025-02-03 13:23 ` [PATCH v4 2/4] arm64: dts: qcom: sm8650: setup gpu thermal with higher temperatures Neil Armstrong
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Neil Armstrong @ 2025-02-03 13:23 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Neil Armstrong
On the SM8650, the dynamic clock and voltage scaling (DCVS) is done in an
hardware controlled loop using the LMH and EPSS blocks with constraints and
OPPs programmed in the board firmware.
Since the Hardware does a better job at maintaining the CPUs temperature
in an acceptable range by taking in account more parameters like the die
characteristics or other factory fused values, it makes no sense to try
and reproduce a similar set of constraints with the Linux cpufreq thermal
core.
In addition, the tsens IP is responsible for monitoring the temperature
across the SoC and the current settings will heavily trigger the tsens
UP/LOW interrupts if the CPU temperatures reaches the hardware thermal
constraints which are currently defined in the DT. And since the CPUs
are not hooked in the thermal trip points, the potential interrupts and
calculations are a waste of system resources.
Drop the current passive trip points and only leave the critical trip
point that will trigger a software system reboot before an hardware
thermal shutdown in the allmost impossible case the hardware DCVS cannot
handle the temperature surge.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
arch/arm64/boot/dts/qcom/sm8650.dtsi | 180 -----------------------------------
1 file changed, 180 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8650.dtsi b/arch/arm64/boot/dts/qcom/sm8650.dtsi
index 25e47505adcb790d09f1d2726386438487255824..95509ce2713d4fcc3dbe0c5cd5827312d5681af4 100644
--- a/arch/arm64/boot/dts/qcom/sm8650.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8650.dtsi
@@ -5751,18 +5751,6 @@ cpu2-top-thermal {
thermal-sensors = <&tsens0 5>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
- trip-point1 {
- temperature = <95000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
cpu2-critical {
temperature = <110000>;
hysteresis = <1000>;
@@ -5775,18 +5763,6 @@ cpu2-bottom-thermal {
thermal-sensors = <&tsens0 6>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
- trip-point1 {
- temperature = <95000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
cpu2-critical {
temperature = <110000>;
hysteresis = <1000>;
@@ -5799,18 +5775,6 @@ cpu3-top-thermal {
thermal-sensors = <&tsens0 7>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
- trip-point1 {
- temperature = <95000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
cpu3-critical {
temperature = <110000>;
hysteresis = <1000>;
@@ -5823,18 +5787,6 @@ cpu3-bottom-thermal {
thermal-sensors = <&tsens0 8>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
- trip-point1 {
- temperature = <95000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
cpu3-critical {
temperature = <110000>;
hysteresis = <1000>;
@@ -5847,18 +5799,6 @@ cpu4-top-thermal {
thermal-sensors = <&tsens0 9>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
- trip-point1 {
- temperature = <95000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
cpu4-critical {
temperature = <110000>;
hysteresis = <1000>;
@@ -5871,18 +5811,6 @@ cpu4-bottom-thermal {
thermal-sensors = <&tsens0 10>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
- trip-point1 {
- temperature = <95000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
cpu4-critical {
temperature = <110000>;
hysteresis = <1000>;
@@ -5895,18 +5823,6 @@ cpu5-top-thermal {
thermal-sensors = <&tsens0 11>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
- trip-point1 {
- temperature = <95000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
cpu5-critical {
temperature = <110000>;
hysteresis = <1000>;
@@ -5919,18 +5835,6 @@ cpu5-bottom-thermal {
thermal-sensors = <&tsens0 12>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
- trip-point1 {
- temperature = <95000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
cpu5-critical {
temperature = <110000>;
hysteresis = <1000>;
@@ -5943,18 +5847,6 @@ cpu6-top-thermal {
thermal-sensors = <&tsens0 13>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
- trip-point1 {
- temperature = <95000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
cpu6-critical {
temperature = <110000>;
hysteresis = <1000>;
@@ -5967,18 +5859,6 @@ cpu6-bottom-thermal {
thermal-sensors = <&tsens0 14>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
- trip-point1 {
- temperature = <95000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
cpu6-critical {
temperature = <110000>;
hysteresis = <1000>;
@@ -6009,18 +5889,6 @@ cpu7-top-thermal {
thermal-sensors = <&tsens1 1>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
- trip-point1 {
- temperature = <95000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
cpu7-critical {
temperature = <110000>;
hysteresis = <1000>;
@@ -6033,18 +5901,6 @@ cpu7-middle-thermal {
thermal-sensors = <&tsens1 2>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
- trip-point1 {
- temperature = <95000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
cpu7-critical {
temperature = <110000>;
hysteresis = <1000>;
@@ -6057,18 +5913,6 @@ cpu7-bottom-thermal {
thermal-sensors = <&tsens1 3>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
- trip-point1 {
- temperature = <95000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
cpu7-critical {
temperature = <110000>;
hysteresis = <1000>;
@@ -6081,18 +5925,6 @@ cpu0-thermal {
thermal-sensors = <&tsens1 4>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
- trip-point1 {
- temperature = <95000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
cpu0-critical {
temperature = <110000>;
hysteresis = <1000>;
@@ -6105,18 +5937,6 @@ cpu1-thermal {
thermal-sensors = <&tsens1 5>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
- trip-point1 {
- temperature = <95000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
cpu1-critical {
temperature = <110000>;
hysteresis = <1000>;
--
2.34.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v4 2/4] arm64: dts: qcom: sm8650: setup gpu thermal with higher temperatures
2025-02-03 13:23 [PATCH v4 0/4] arm64: dts: qcom: sm8650: rework CPU & GPU thermal zones Neil Armstrong
2025-02-03 13:23 ` [PATCH v4 1/4] arm64: dts: qcom: sm8650: drop cpu thermal passive trip points Neil Armstrong
@ 2025-02-03 13:23 ` Neil Armstrong
2025-02-03 13:31 ` Konrad Dybcio
2025-02-03 13:23 ` [PATCH v4 3/4] arm64: dts: qcom: sm8650: harmonize all unregulated thermal trip points Neil Armstrong
` (2 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Neil Armstrong @ 2025-02-03 13:23 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Neil Armstrong
On the SM8650, the dynamic clock and voltage scaling (DCVS) for the GPU
is done from the HLOS, but the GPU can achieve a much higher temperature
before failing according the reference downstream implementation.
Set higher temperatures in the GPU trip points corresponding to
the temperatures provided by Qualcomm in the dowstream source, much
closer to the junction temperature and with a higher critical
temperature trip in the case the HLOS DCVS cannot handle the
temperature surge.
The tsens MAX_THRESHOLD is set to 120C on those platforms, so set
the hot to 110C to leave a chance to HLOS to react and critical to
115C to avoid the monitor thermal shutdown.
Fixes: 497624ed5506 ("arm64: dts: qcom: sm8650: Throttle the GPU when overheating")
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
arch/arm64/boot/dts/qcom/sm8650.dtsi | 64 ++++++++++++++++++------------------
1 file changed, 32 insertions(+), 32 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8650.dtsi b/arch/arm64/boot/dts/qcom/sm8650.dtsi
index 95509ce2713d4fcc3dbe0c5cd5827312d5681af4..798265e0300e7c7934e04cd971e3b9d3d55e3bec 100644
--- a/arch/arm64/boot/dts/qcom/sm8650.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8650.dtsi
@@ -6173,20 +6173,20 @@ map0 {
trips {
gpu0_alert0: trip-point0 {
- temperature = <85000>;
+ temperature = <95000>;
hysteresis = <1000>;
type = "passive";
};
trip-point1 {
- temperature = <90000>;
+ temperature = <110000>;
hysteresis = <1000>;
type = "hot";
};
trip-point2 {
- temperature = <110000>;
- hysteresis = <1000>;
+ temperature = <115000>;
+ hysteresis = <0>;
type = "critical";
};
};
@@ -6206,20 +6206,20 @@ map0 {
trips {
gpu1_alert0: trip-point0 {
- temperature = <85000>;
+ temperature = <95000>;
hysteresis = <1000>;
type = "passive";
};
trip-point1 {
- temperature = <90000>;
+ temperature = <110000>;
hysteresis = <1000>;
type = "hot";
};
trip-point2 {
- temperature = <110000>;
- hysteresis = <1000>;
+ temperature = <115000>;
+ hysteresis = <0>;
type = "critical";
};
};
@@ -6239,20 +6239,20 @@ map0 {
trips {
gpu2_alert0: trip-point0 {
- temperature = <85000>;
+ temperature = <95000>;
hysteresis = <1000>;
type = "passive";
};
trip-point1 {
- temperature = <90000>;
+ temperature = <110000>;
hysteresis = <1000>;
type = "hot";
};
trip-point2 {
- temperature = <110000>;
- hysteresis = <1000>;
+ temperature = <115000>;
+ hysteresis = <0>;
type = "critical";
};
};
@@ -6272,20 +6272,20 @@ map0 {
trips {
gpu3_alert0: trip-point0 {
- temperature = <85000>;
+ temperature = <95000>;
hysteresis = <1000>;
type = "passive";
};
trip-point1 {
- temperature = <90000>;
+ temperature = <110000>;
hysteresis = <1000>;
type = "hot";
};
trip-point2 {
- temperature = <110000>;
- hysteresis = <1000>;
+ temperature = <115000>;
+ hysteresis = <0>;
type = "critical";
};
};
@@ -6305,20 +6305,20 @@ map0 {
trips {
gpu4_alert0: trip-point0 {
- temperature = <85000>;
+ temperature = <95000>;
hysteresis = <1000>;
type = "passive";
};
trip-point1 {
- temperature = <90000>;
+ temperature = <110000>;
hysteresis = <1000>;
type = "hot";
};
trip-point2 {
- temperature = <110000>;
- hysteresis = <1000>;
+ temperature = <115000>;
+ hysteresis = <0>;
type = "critical";
};
};
@@ -6338,20 +6338,20 @@ map0 {
trips {
gpu5_alert0: trip-point0 {
- temperature = <85000>;
+ temperature = <95000>;
hysteresis = <1000>;
type = "passive";
};
trip-point1 {
- temperature = <90000>;
+ temperature = <110000>;
hysteresis = <1000>;
type = "hot";
};
trip-point2 {
- temperature = <110000>;
- hysteresis = <1000>;
+ temperature = <115000>;
+ hysteresis = <0>;
type = "critical";
};
};
@@ -6371,20 +6371,20 @@ map0 {
trips {
gpu6_alert0: trip-point0 {
- temperature = <85000>;
+ temperature = <95000>;
hysteresis = <1000>;
type = "passive";
};
trip-point1 {
- temperature = <90000>;
+ temperature = <110000>;
hysteresis = <1000>;
type = "hot";
};
trip-point2 {
- temperature = <110000>;
- hysteresis = <1000>;
+ temperature = <115000>;
+ hysteresis = <0>;
type = "critical";
};
};
@@ -6404,20 +6404,20 @@ map0 {
trips {
gpu7_alert0: trip-point0 {
- temperature = <85000>;
+ temperature = <95000>;
hysteresis = <1000>;
type = "passive";
};
trip-point1 {
- temperature = <90000>;
+ temperature = <110000>;
hysteresis = <1000>;
type = "hot";
};
trip-point2 {
- temperature = <110000>;
- hysteresis = <1000>;
+ temperature = <115000>;
+ hysteresis = <0>;
type = "critical";
};
};
--
2.34.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v4 3/4] arm64: dts: qcom: sm8650: harmonize all unregulated thermal trip points
2025-02-03 13:23 [PATCH v4 0/4] arm64: dts: qcom: sm8650: rework CPU & GPU thermal zones Neil Armstrong
2025-02-03 13:23 ` [PATCH v4 1/4] arm64: dts: qcom: sm8650: drop cpu thermal passive trip points Neil Armstrong
2025-02-03 13:23 ` [PATCH v4 2/4] arm64: dts: qcom: sm8650: setup gpu thermal with higher temperatures Neil Armstrong
@ 2025-02-03 13:23 ` Neil Armstrong
2025-02-11 13:34 ` Konrad Dybcio
2025-02-03 13:23 ` [PATCH v4 4/4] arm64: dts: qcom: sm8650: drop remaining polling-delay-passive properties Neil Armstrong
2025-02-26 13:40 ` [PATCH v4 0/4] arm64: dts: qcom: sm8650: rework CPU & GPU thermal zones Bjorn Andersson
4 siblings, 1 reply; 10+ messages in thread
From: Neil Armstrong @ 2025-02-03 13:23 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Neil Armstrong
While the CPUs thermal is handled by the LMH, and GPU has a passive
cooldowm via the HLOS DCVS, all the other thermal blocks only have
hot and critical and no passive/active trip points.
Passive or active thermal management for those blocks should
be either defined if somehow we can express those in DT or
in the board definition if there's an active cooling device
available.
The tsens MAX_THRESHOLD is set to 120C on those platforms, so set
the hot to 110C to leave a chance to HLOS to react and critical to
115C to avoid the monitor thermal shutdown.
In the case a passive or active cooling device would be
available, the downstream reference implementation uses
the 95C "tj" trip point, as we already use for the
gpuss thermal blocks.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
arch/arm64/boot/dts/qcom/sm8650.dtsi | 170 +++++++++++++++++------------------
1 file changed, 85 insertions(+), 85 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8650.dtsi b/arch/arm64/boot/dts/qcom/sm8650.dtsi
index 798265e0300e7c7934e04cd971e3b9d3d55e3bec..24070d99b6f097f38e618330414b5a04734e7e32 100644
--- a/arch/arm64/boot/dts/qcom/sm8650.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8650.dtsi
@@ -5661,14 +5661,14 @@ aoss0-thermal {
thermal-sensors = <&tsens0 0>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
+ aoss0-hot {
+ temperature = <110000>;
+ hysteresis = <1000>;
type = "hot";
};
aoss0-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
@@ -5679,14 +5679,14 @@ cpuss0-thermal {
thermal-sensors = <&tsens0 1>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
+ cpuss0-hot {
+ temperature = <110000>;
+ hysteresis = <1000>;
type = "hot";
};
cpuss0-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
@@ -5697,14 +5697,14 @@ cpuss1-thermal {
thermal-sensors = <&tsens0 2>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
+ cpuss1-hot {
+ temperature = <110000>;
+ hysteresis = <1000>;
type = "hot";
};
cpuss1-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
@@ -5715,14 +5715,14 @@ cpuss2-thermal {
thermal-sensors = <&tsens0 3>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
+ cpuss2-hot {
+ temperature = <110000>;
+ hysteresis = <1000>;
type = "hot";
};
cpuss2-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
@@ -5733,14 +5733,14 @@ cpuss3-thermal {
thermal-sensors = <&tsens0 4>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
+ cpuss3-hot {
+ temperature = <110000>;
+ hysteresis = <1000>;
type = "hot";
};
cpuss3-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
@@ -5871,14 +5871,14 @@ aoss1-thermal {
thermal-sensors = <&tsens1 0>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
+ aoss1-hot {
+ temperature = <110000>;
+ hysteresis = <1000>;
type = "hot";
};
aoss1-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
@@ -5951,14 +5951,14 @@ nsphvx0-thermal {
thermal-sensors = <&tsens2 6>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
+ nsphvx0-hot {
+ temperature = <110000>;
+ hysteresis = <1000>;
type = "hot";
};
- nsphvx1-critical {
- temperature = <110000>;
+ nsphvx0-critical {
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
@@ -5971,14 +5971,14 @@ nsphvx1-thermal {
thermal-sensors = <&tsens2 7>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
+ nsphvx1-hot {
+ temperature = <110000>;
+ hysteresis = <1000>;
type = "hot";
};
nsphvx1-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
@@ -5991,14 +5991,14 @@ nsphmx0-thermal {
thermal-sensors = <&tsens2 8>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
+ nsphmx0-hot {
+ temperature = <110000>;
+ hysteresis = <1000>;
type = "hot";
};
nsphmx0-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
@@ -6011,14 +6011,14 @@ nsphmx1-thermal {
thermal-sensors = <&tsens2 9>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
+ nsphmx1-hot {
+ temperature = <110000>;
+ hysteresis = <1000>;
type = "hot";
};
nsphmx1-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
@@ -6031,14 +6031,14 @@ nsphmx2-thermal {
thermal-sensors = <&tsens2 10>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
+ nsphmx2-hot {
+ temperature = <110000>;
+ hysteresis = <1000>;
type = "hot";
};
nsphmx2-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
@@ -6051,14 +6051,14 @@ nsphmx3-thermal {
thermal-sensors = <&tsens2 11>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
+ nsphmx3-hot {
+ temperature = <110000>;
+ hysteresis = <1000>;
type = "hot";
};
nsphmx3-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
@@ -6071,14 +6071,14 @@ video-thermal {
thermal-sensors = <&tsens1 12>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
+ video-hot {
+ temperature = <110000>;
+ hysteresis = <1000>;
type = "hot";
};
video-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
@@ -6091,14 +6091,14 @@ ddr-thermal {
thermal-sensors = <&tsens1 13>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
+ ddr-hot {
+ temperature = <110000>;
+ hysteresis = <1000>;
type = "hot";
};
ddr-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
@@ -6109,14 +6109,14 @@ camera0-thermal {
thermal-sensors = <&tsens1 14>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
+ camera0-hot {
+ temperature = <110000>;
+ hysteresis = <1000>;
type = "hot";
};
camera0-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
@@ -6127,14 +6127,14 @@ camera1-thermal {
thermal-sensors = <&tsens1 15>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
+ camera1-hot {
+ temperature = <110000>;
+ hysteresis = <1000>;
type = "hot";
};
camera1-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
@@ -6145,14 +6145,14 @@ aoss2-thermal {
thermal-sensors = <&tsens2 0>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
+ aoss2-hot {
+ temperature = <110000>;
+ hysteresis = <1000>;
type = "hot";
};
aoss2-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
@@ -6427,14 +6427,14 @@ modem0-thermal {
thermal-sensors = <&tsens2 9>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
+ modem0-hot {
+ temperature = <110000>;
+ hysteresis = <1000>;
type = "hot";
};
modem0-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
@@ -6445,14 +6445,14 @@ modem1-thermal {
thermal-sensors = <&tsens2 10>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
+ modem1-hot {
+ temperature = <110000>;
+ hysteresis = <1000>;
type = "hot";
};
modem1-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
@@ -6463,14 +6463,14 @@ modem2-thermal {
thermal-sensors = <&tsens2 11>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
+ modem2-hot {
+ temperature = <110000>;
+ hysteresis = <1000>;
type = "hot";
};
modem2-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
@@ -6481,14 +6481,14 @@ modem3-thermal {
thermal-sensors = <&tsens2 12>;
trips {
- trip-point0 {
- temperature = <90000>;
- hysteresis = <2000>;
+ modem3-hot {
+ temperature = <110000>;
+ hysteresis = <1000>;
type = "hot";
};
modem3-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
--
2.34.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v4 4/4] arm64: dts: qcom: sm8650: drop remaining polling-delay-passive properties
2025-02-03 13:23 [PATCH v4 0/4] arm64: dts: qcom: sm8650: rework CPU & GPU thermal zones Neil Armstrong
` (2 preceding siblings ...)
2025-02-03 13:23 ` [PATCH v4 3/4] arm64: dts: qcom: sm8650: harmonize all unregulated thermal trip points Neil Armstrong
@ 2025-02-03 13:23 ` Neil Armstrong
2025-02-26 13:40 ` [PATCH v4 0/4] arm64: dts: qcom: sm8650: rework CPU & GPU thermal zones Bjorn Andersson
4 siblings, 0 replies; 10+ messages in thread
From: Neil Armstrong @ 2025-02-03 13:23 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel, Neil Armstrong, Konrad Dybcio
Remove the remaining polling-delay-passive properties from
thermal nodes without a passive trip point.
Suggested-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
arch/arm64/boot/dts/qcom/sm8650.dtsi | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8650.dtsi b/arch/arm64/boot/dts/qcom/sm8650.dtsi
index 24070d99b6f097f38e618330414b5a04734e7e32..fbceb66969156052467473e7bf637c762df03147 100644
--- a/arch/arm64/boot/dts/qcom/sm8650.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8650.dtsi
@@ -5946,8 +5946,6 @@ cpu1-critical {
};
nsphvx0-thermal {
- polling-delay-passive = <10>;
-
thermal-sensors = <&tsens2 6>;
trips {
@@ -5966,8 +5964,6 @@ nsphvx0-critical {
};
nsphvx1-thermal {
- polling-delay-passive = <10>;
-
thermal-sensors = <&tsens2 7>;
trips {
@@ -5986,8 +5982,6 @@ nsphvx1-critical {
};
nsphmx0-thermal {
- polling-delay-passive = <10>;
-
thermal-sensors = <&tsens2 8>;
trips {
@@ -6006,8 +6000,6 @@ nsphmx0-critical {
};
nsphmx1-thermal {
- polling-delay-passive = <10>;
-
thermal-sensors = <&tsens2 9>;
trips {
@@ -6026,8 +6018,6 @@ nsphmx1-critical {
};
nsphmx2-thermal {
- polling-delay-passive = <10>;
-
thermal-sensors = <&tsens2 10>;
trips {
@@ -6046,8 +6036,6 @@ nsphmx2-critical {
};
nsphmx3-thermal {
- polling-delay-passive = <10>;
-
thermal-sensors = <&tsens2 11>;
trips {
@@ -6066,8 +6054,6 @@ nsphmx3-critical {
};
video-thermal {
- polling-delay-passive = <10>;
-
thermal-sensors = <&tsens1 12>;
trips {
@@ -6086,8 +6072,6 @@ video-critical {
};
ddr-thermal {
- polling-delay-passive = <10>;
-
thermal-sensors = <&tsens1 13>;
trips {
--
2.34.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 1/4] arm64: dts: qcom: sm8650: drop cpu thermal passive trip points
2025-02-03 13:23 ` [PATCH v4 1/4] arm64: dts: qcom: sm8650: drop cpu thermal passive trip points Neil Armstrong
@ 2025-02-03 13:29 ` Konrad Dybcio
0 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2025-02-03 13:29 UTC (permalink / raw)
To: Neil Armstrong, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel
On 3.02.2025 2:23 PM, Neil Armstrong wrote:
> On the SM8650, the dynamic clock and voltage scaling (DCVS) is done in an
> hardware controlled loop using the LMH and EPSS blocks with constraints and
> OPPs programmed in the board firmware.
>
> Since the Hardware does a better job at maintaining the CPUs temperature
> in an acceptable range by taking in account more parameters like the die
> characteristics or other factory fused values, it makes no sense to try
> and reproduce a similar set of constraints with the Linux cpufreq thermal
> core.
>
> In addition, the tsens IP is responsible for monitoring the temperature
> across the SoC and the current settings will heavily trigger the tsens
> UP/LOW interrupts if the CPU temperatures reaches the hardware thermal
> constraints which are currently defined in the DT. And since the CPUs
> are not hooked in the thermal trip points, the potential interrupts and
> calculations are a waste of system resources.
>
> Drop the current passive trip points and only leave the critical trip
> point that will trigger a software system reboot before an hardware
> thermal shutdown in the allmost impossible case the hardware DCVS cannot
> handle the temperature surge.
>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 2/4] arm64: dts: qcom: sm8650: setup gpu thermal with higher temperatures
2025-02-03 13:23 ` [PATCH v4 2/4] arm64: dts: qcom: sm8650: setup gpu thermal with higher temperatures Neil Armstrong
@ 2025-02-03 13:31 ` Konrad Dybcio
2025-02-03 13:53 ` Konrad Dybcio
0 siblings, 1 reply; 10+ messages in thread
From: Konrad Dybcio @ 2025-02-03 13:31 UTC (permalink / raw)
To: Neil Armstrong, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel
On 3.02.2025 2:23 PM, Neil Armstrong wrote:
> On the SM8650, the dynamic clock and voltage scaling (DCVS) for the GPU
> is done from the HLOS, but the GPU can achieve a much higher temperature
> before failing according the reference downstream implementation.
>
> Set higher temperatures in the GPU trip points corresponding to
> the temperatures provided by Qualcomm in the dowstream source, much
> closer to the junction temperature and with a higher critical
> temperature trip in the case the HLOS DCVS cannot handle the
> temperature surge.
>
> The tsens MAX_THRESHOLD is set to 120C on those platforms, so set
> the hot to 110C to leave a chance to HLOS to react and critical to
> 115C to avoid the monitor thermal shutdown.
>
> Fixes: 497624ed5506 ("arm64: dts: qcom: sm8650: Throttle the GPU when overheating")
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 2/4] arm64: dts: qcom: sm8650: setup gpu thermal with higher temperatures
2025-02-03 13:31 ` Konrad Dybcio
@ 2025-02-03 13:53 ` Konrad Dybcio
0 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2025-02-03 13:53 UTC (permalink / raw)
To: Neil Armstrong, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel
On 3.02.2025 2:31 PM, Konrad Dybcio wrote:
> On 3.02.2025 2:23 PM, Neil Armstrong wrote:
>> On the SM8650, the dynamic clock and voltage scaling (DCVS) for the GPU
>> is done from the HLOS, but the GPU can achieve a much higher temperature
>> before failing according the reference downstream implementation.
>>
>> Set higher temperatures in the GPU trip points corresponding to
>> the temperatures provided by Qualcomm in the dowstream source, much
>> closer to the junction temperature and with a higher critical
>> temperature trip in the case the HLOS DCVS cannot handle the
>> temperature surge.
>>
>> The tsens MAX_THRESHOLD is set to 120C on those platforms, so set
>> the hot to 110C to leave a chance to HLOS to react and critical to
>> 115C to avoid the monitor thermal shutdown.
>>
>> Fixes: 497624ed5506 ("arm64: dts: qcom: sm8650: Throttle the GPU when overheating")
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>> ---
>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Wrong copypasta, please use this one instead:
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 3/4] arm64: dts: qcom: sm8650: harmonize all unregulated thermal trip points
2025-02-03 13:23 ` [PATCH v4 3/4] arm64: dts: qcom: sm8650: harmonize all unregulated thermal trip points Neil Armstrong
@ 2025-02-11 13:34 ` Konrad Dybcio
0 siblings, 0 replies; 10+ messages in thread
From: Konrad Dybcio @ 2025-02-11 13:34 UTC (permalink / raw)
To: Neil Armstrong, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, devicetree, linux-kernel
On 3.02.2025 2:23 PM, Neil Armstrong wrote:
> While the CPUs thermal is handled by the LMH, and GPU has a passive
> cooldowm via the HLOS DCVS, all the other thermal blocks only have
> hot and critical and no passive/active trip points.
>
> Passive or active thermal management for those blocks should
> be either defined if somehow we can express those in DT or
> in the board definition if there's an active cooling device
> available.
>
> The tsens MAX_THRESHOLD is set to 120C on those platforms, so set
> the hot to 110C to leave a chance to HLOS to react and critical to
> 115C to avoid the monitor thermal shutdown.
>
> In the case a passive or active cooling device would be
> available, the downstream reference implementation uses
> the 95C "tj" trip point, as we already use for the
> gpuss thermal blocks.
>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 0/4] arm64: dts: qcom: sm8650: rework CPU & GPU thermal zones
2025-02-03 13:23 [PATCH v4 0/4] arm64: dts: qcom: sm8650: rework CPU & GPU thermal zones Neil Armstrong
` (3 preceding siblings ...)
2025-02-03 13:23 ` [PATCH v4 4/4] arm64: dts: qcom: sm8650: drop remaining polling-delay-passive properties Neil Armstrong
@ 2025-02-26 13:40 ` Bjorn Andersson
4 siblings, 0 replies; 10+ messages in thread
From: Bjorn Andersson @ 2025-02-26 13:40 UTC (permalink / raw)
To: Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Neil Armstrong
Cc: linux-arm-msm, devicetree, linux-kernel, Konrad Dybcio
On Mon, 03 Feb 2025 14:23:16 +0100, Neil Armstrong wrote:
> On the SM8650 platform, the dynamic clock and voltage scaling (DCVS) for
> the CPUs is handled by hardware & firmware using factory and
> form-factor determined parameters in order to maximize frequency while
> keeping the temperature way below the junction temperature where the SoC
> would experience a thermal shutdown if not permanent damages.
>
> On the other side, the High Level Ooperating System (HLOS), like Linux,
> is able to adjust the CPU and GPU frequency using the internal SoC
> temperature sensors (here tsens) and it's UP/LOW interrupts, but it
> effectly does the same work twice for CPU in an less effective manner.
>
> [...]
Applied, thanks!
[1/4] arm64: dts: qcom: sm8650: drop cpu thermal passive trip points
commit: 7f9a670396029116424a803d3971ff0e552ff0b3
[2/4] arm64: dts: qcom: sm8650: setup gpu thermal with higher temperatures
commit: 2250f65b32565eb8b757e89248c75977f370f498
[3/4] arm64: dts: qcom: sm8650: harmonize all unregulated thermal trip points
commit: c516beb248a96f5a93fb4f9a6cb0dda4155eadbb
[4/4] arm64: dts: qcom: sm8650: drop remaining polling-delay-passive properties
commit: 30235bb8b0487537ddd7dd4a480c907add6cd19b
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-02-26 13:40 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-03 13:23 [PATCH v4 0/4] arm64: dts: qcom: sm8650: rework CPU & GPU thermal zones Neil Armstrong
2025-02-03 13:23 ` [PATCH v4 1/4] arm64: dts: qcom: sm8650: drop cpu thermal passive trip points Neil Armstrong
2025-02-03 13:29 ` Konrad Dybcio
2025-02-03 13:23 ` [PATCH v4 2/4] arm64: dts: qcom: sm8650: setup gpu thermal with higher temperatures Neil Armstrong
2025-02-03 13:31 ` Konrad Dybcio
2025-02-03 13:53 ` Konrad Dybcio
2025-02-03 13:23 ` [PATCH v4 3/4] arm64: dts: qcom: sm8650: harmonize all unregulated thermal trip points Neil Armstrong
2025-02-11 13:34 ` Konrad Dybcio
2025-02-03 13:23 ` [PATCH v4 4/4] arm64: dts: qcom: sm8650: drop remaining polling-delay-passive properties Neil Armstrong
2025-02-26 13:40 ` [PATCH v4 0/4] arm64: dts: qcom: sm8650: rework CPU & GPU thermal zones 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®