From: Alexandre Bailon <abailon@baylibre.com>
To: rafael@kernel.org, daniel.lezcano@linaro.org, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org
Cc: rui.zhang@intel.com, lukasz.luba@arm.com,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Alexandre Bailon <abailon@baylibre.com>
Subject: [PATCH v3 6/6] ARM64: mt8195: Use thermal aggregation for big and little cpu
Date: Fri, 24 May 2024 16:31:50 +0200 [thread overview]
Message-ID: <20240524143150.610949-7-abailon@baylibre.com> (raw)
In-Reply-To: <20240524143150.610949-1-abailon@baylibre.com>
This uses the thermal aggregation for the mt8195 to get the maximal
temperature of big and little cpu clusters.
Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
---
arch/arm64/boot/dts/mediatek/mt8195.dtsi | 212 +++--------------------
1 file changed, 27 insertions(+), 185 deletions(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
index 5d8b68f86ce4..8aa2bf142622 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi
@@ -3600,50 +3600,31 @@ dp_tx: dp-tx@1c600000 {
};
thermal_zones: thermal-zones {
- cpu0-thermal {
+ cpu-little {
polling-delay = <1000>;
- polling-delay-passive = <250>;
- thermal-sensors = <&lvts_mcu MT8195_MCU_LITTLE_CPU0>;
+ polling-delay-passive = <100>;
+ thermal-sensors = <&lvts_mcu MT8195_MCU_LITTLE_CPU0>,
+ <&lvts_mcu MT8195_MCU_LITTLE_CPU1>,
+ <&lvts_mcu MT8195_MCU_LITTLE_CPU2>,
+ <&lvts_mcu MT8195_MCU_LITTLE_CPU3>;
+ sustainable-power = <1500>;
+ aggregation = "max";
trips {
- cpu0_alert: trip-alert {
- temperature = <85000>;
+ cpu_little_threshold: trip-point {
+ temperature = <68000>;
hysteresis = <2000>;
type = "passive";
};
- cpu0_crit: trip-crit {
- temperature = <100000>;
- hysteresis = <2000>;
- type = "critical";
- };
- };
-
- cooling-maps {
- map0 {
- trip = <&cpu0_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>;
- };
- };
- };
-
- cpu1-thermal {
- polling-delay = <1000>;
- polling-delay-passive = <250>;
- thermal-sensors = <&lvts_mcu MT8195_MCU_LITTLE_CPU1>;
-
- trips {
- cpu1_alert: trip-alert {
+ cpu_little_target: target {
temperature = <85000>;
hysteresis = <2000>;
type = "passive";
};
- cpu1_crit: trip-crit {
- temperature = <100000>;
+ cpu_little_soc_max_crit: soc-max-crit {
+ temperature = <115000>;
hysteresis = <2000>;
type = "critical";
};
@@ -3651,7 +3632,7 @@ cpu1_crit: trip-crit {
cooling-maps {
map0 {
- trip = <&cpu1_alert>;
+ trip = <&cpu_little_target>;
cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
<&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
<&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
@@ -3660,170 +3641,31 @@ map0 {
};
};
- cpu2-thermal {
+ cpu-big {
polling-delay = <1000>;
polling-delay-passive = <250>;
- thermal-sensors = <&lvts_mcu MT8195_MCU_LITTLE_CPU2>;
+ thermal-sensors = <&lvts_mcu MT8195_MCU_BIG_CPU0>,
+ <&lvts_mcu MT8195_MCU_BIG_CPU1>,
+ <&lvts_mcu MT8195_MCU_BIG_CPU2>,
+ <&lvts_mcu MT8195_MCU_BIG_CPU3>;
+ sustainable-power = <1500>;
+ aggregation = "max";
trips {
- cpu2_alert: trip-alert {
- temperature = <85000>;
+ cpu_big_threshold: trip-point {
+ temperature = <68000>;
hysteresis = <2000>;
type = "passive";
};
- cpu2_crit: trip-crit {
- temperature = <100000>;
- hysteresis = <2000>;
- type = "critical";
- };
- };
-
- cooling-maps {
- map0 {
- trip = <&cpu2_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>;
- };
- };
- };
-
- cpu3-thermal {
- polling-delay = <1000>;
- polling-delay-passive = <250>;
- thermal-sensors = <&lvts_mcu MT8195_MCU_LITTLE_CPU3>;
-
- trips {
- cpu3_alert: trip-alert {
- temperature = <85000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
- cpu3_crit: trip-crit {
- temperature = <100000>;
- hysteresis = <2000>;
- type = "critical";
- };
- };
-
- cooling-maps {
- map0 {
- trip = <&cpu3_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 {
- polling-delay = <1000>;
- polling-delay-passive = <250>;
- thermal-sensors = <&lvts_mcu MT8195_MCU_BIG_CPU0>;
-
- trips {
- cpu4_alert: trip-alert {
+ cpu_big_target: target {
temperature = <85000>;
hysteresis = <2000>;
type = "passive";
};
- cpu4_crit: trip-crit {
- temperature = <100000>;
- hysteresis = <2000>;
- type = "critical";
- };
- };
-
- cooling-maps {
- map0 {
- trip = <&cpu4_alert>;
- cooling-device = <&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>;
- };
- };
- };
-
- cpu5-thermal {
- polling-delay = <1000>;
- polling-delay-passive = <250>;
- thermal-sensors = <&lvts_mcu MT8195_MCU_BIG_CPU1>;
-
- trips {
- cpu5_alert: trip-alert {
- temperature = <85000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
- cpu5_crit: trip-crit {
- temperature = <100000>;
- hysteresis = <2000>;
- type = "critical";
- };
- };
-
- cooling-maps {
- map0 {
- trip = <&cpu5_alert>;
- cooling-device = <&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>;
- };
- };
- };
-
- cpu6-thermal {
- polling-delay = <1000>;
- polling-delay-passive = <250>;
- thermal-sensors = <&lvts_mcu MT8195_MCU_BIG_CPU2>;
-
- trips {
- cpu6_alert: trip-alert {
- temperature = <85000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
- cpu6_crit: trip-crit {
- temperature = <100000>;
- hysteresis = <2000>;
- type = "critical";
- };
- };
-
- cooling-maps {
- map0 {
- trip = <&cpu6_alert>;
- cooling-device = <&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>;
- };
- };
- };
-
- cpu7-thermal {
- polling-delay = <1000>;
- polling-delay-passive = <250>;
- thermal-sensors = <&lvts_mcu MT8195_MCU_BIG_CPU3>;
-
- trips {
- cpu7_alert: trip-alert {
- temperature = <85000>;
- hysteresis = <2000>;
- type = "passive";
- };
-
- cpu7_crit: trip-crit {
- temperature = <100000>;
+ cpu_big_soc_max_crit: soc-max-crit {
+ temperature = <115000>;
hysteresis = <2000>;
type = "critical";
};
@@ -3831,7 +3673,7 @@ cpu7_crit: trip-crit {
cooling-maps {
map0 {
- trip = <&cpu7_alert>;
+ trip = <&cpu_big_target>;
cooling-device = <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
<&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
<&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
--
2.44.1
next prev parent reply other threads:[~2024-05-24 14:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-24 14:31 [PATCH v3 0/6] thermal: Add support of multiple sensors Alexandre Bailon
2024-05-24 14:31 ` [PATCH v3 1/6] dt-bindings: thermal: Restore the thermal-sensors property Alexandre Bailon
2024-05-24 14:31 ` [PATCH v3 2/6] thermal: Add support of multi sensors to thermal_core Alexandre Bailon
2024-05-27 7:00 ` Krzysztof Kozlowski
2024-05-27 7:02 ` Krzysztof Kozlowski
2024-05-29 8:23 ` Alexandre Bailon
2024-05-24 14:31 ` [PATCH v3 3/6] thermal: Add support of multi sensors to thermal_of Alexandre Bailon
2024-05-24 14:31 ` [PATCH v3 4/6] dt-bindings: thermal: Add a property to select the aggregation type Alexandre Bailon
2024-05-27 6:55 ` Krzysztof Kozlowski
2024-05-29 8:06 ` Alexandre Bailon
2024-05-28 17:00 ` Rob Herring
2024-05-24 14:31 ` [PATCH v3 5/6] thermal: of: Parse aggregation property to select the aggegration type Alexandre Bailon
2024-05-24 14:31 ` Alexandre Bailon [this message]
2024-05-27 6:56 ` [PATCH v3 6/6] ARM64: mt8195: Use thermal aggregation for big and little cpu Krzysztof Kozlowski
2024-05-29 8:19 ` Alexandre Bailon
2024-05-29 12:39 ` Krzysztof Kozlowski
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=20240524143150.610949-7-abailon@baylibre.com \
--to=abailon@baylibre.com \
--cc=conor+dt@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=rafael@kernel.org \
--cc=robh+dt@kernel.org \
--cc=rui.zhang@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).