* [PATCH v2 1/2] arm64: dts: ti: k3-am62a: Enable CPU freq throttling on thermal alert
@ 2025-05-06 11:41 Daniel Schultz
2025-05-06 11:41 ` [PATCH v2 2/2] arm64: dts: ti: k3-am62x-phyboard-lyra-gpio-fan: Update cooling maps Daniel Schultz
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Daniel Schultz @ 2025-05-06 11:41 UTC (permalink / raw)
To: nm, vigneshr, kristo, robh, krzk+dt, conor+dt, linux-arm-kernel,
devicetree, linux-kernel
Cc: upstream, Daniel Schultz
Enable throttling down the CPU frequency when an alert temperature
threshold (lower than the critical threshold) is reached.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
---
Changes in v2:
* Increased passive trip point to 115C (10C below crit)
* Dropped patch which decreased critical trip point.
arch/arm64/boot/dts/ti/k3-am62a-thermal.dtsi | 57 ++++++++++++++++++--
arch/arm64/boot/dts/ti/k3-am62a7.dtsi | 4 ++
2 files changed, 58 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/boot/dts/ti/k3-am62a-thermal.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-thermal.dtsi
index c7486fb2a5b4..3aa127157d24 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a-thermal.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62a-thermal.dtsi
@@ -12,12 +12,29 @@ main0_thermal: main0-thermal {
thermal-sensors = <&wkup_vtm0 0>;
trips {
+ main0_alert: main0-alert {
+ temperature = <115000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
main0_crit: main0-crit {
temperature = <125000>; /* milliCelsius */
hysteresis = <2000>; /* milliCelsius */
type = "critical";
};
};
+
+ cooling-maps {
+ map0 {
+ trip = <&main0_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>;
+ };
+ };
};
main1_thermal: main1-thermal {
@@ -26,25 +43,59 @@ main1_thermal: main1-thermal {
thermal-sensors = <&wkup_vtm0 1>;
trips {
+ main1_alert: main1-alert {
+ temperature = <115000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
main1_crit: main1-crit {
temperature = <125000>; /* milliCelsius */
hysteresis = <2000>; /* milliCelsius */
type = "critical";
};
};
+
+ cooling-maps {
+ map0 {
+ trip = <&main1_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>;
+ };
+ };
};
main2_thermal: main2-thermal {
- polling-delay-passive = <250>; /* milliSeconds */
- polling-delay = <500>; /* milliSeconds */
- thermal-sensors = <&wkup_vtm0 2>;
+ polling-delay-passive = <250>; /* milliSeconds */
+ polling-delay = <500>; /* milliSeconds */
+ thermal-sensors = <&wkup_vtm0 2>;
trips {
+ main2_alert: main2-alert {
+ temperature = <115000>;
+ hysteresis = <2000>;
+ type = "passive";
+ };
+
main2_crit: main2-crit {
temperature = <125000>; /* milliCelsius */
hysteresis = <2000>; /* milliCelsius */
type = "critical";
};
};
+
+ cooling-maps {
+ map0 {
+ trip = <&main2_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>;
+ };
+ };
};
};
diff --git a/arch/arm64/boot/dts/ti/k3-am62a7.dtsi b/arch/arm64/boot/dts/ti/k3-am62a7.dtsi
index 6c99221beb6b..b6e5eee99370 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a7.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62a7.dtsi
@@ -50,6 +50,7 @@ cpu0: cpu@0 {
next-level-cache = <&L2_0>;
operating-points-v2 = <&a53_opp_table>;
clocks = <&k3_clks 135 0>;
+ #cooling-cells = <2>;
};
cpu1: cpu@1 {
@@ -66,6 +67,7 @@ cpu1: cpu@1 {
next-level-cache = <&L2_0>;
operating-points-v2 = <&a53_opp_table>;
clocks = <&k3_clks 136 0>;
+ #cooling-cells = <2>;
};
cpu2: cpu@2 {
@@ -82,6 +84,7 @@ cpu2: cpu@2 {
next-level-cache = <&L2_0>;
operating-points-v2 = <&a53_opp_table>;
clocks = <&k3_clks 137 0>;
+ #cooling-cells = <2>;
};
cpu3: cpu@3 {
@@ -98,6 +101,7 @@ cpu3: cpu@3 {
next-level-cache = <&L2_0>;
operating-points-v2 = <&a53_opp_table>;
clocks = <&k3_clks 138 0>;
+ #cooling-cells = <2>;
};
};
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] arm64: dts: ti: k3-am62x-phyboard-lyra-gpio-fan: Update cooling maps
2025-05-06 11:41 [PATCH v2 1/2] arm64: dts: ti: k3-am62a: Enable CPU freq throttling on thermal alert Daniel Schultz
@ 2025-05-06 11:41 ` Daniel Schultz
2025-05-07 5:38 ` [Upstream] " Wadim Egorov
2025-05-06 18:35 ` [PATCH v2 1/2] arm64: dts: ti: k3-am62a: Enable CPU freq throttling on thermal alert Bryan Brattlof
2025-05-09 12:20 ` Nishanth Menon
2 siblings, 1 reply; 5+ messages in thread
From: Daniel Schultz @ 2025-05-06 11:41 UTC (permalink / raw)
To: nm, vigneshr, kristo, robh, krzk+dt, conor+dt, linux-arm-kernel,
devicetree, linux-kernel
Cc: upstream, Daniel Schultz
Rename 'main0_thermal_trip0' to a more descriptive name that
includes 'fan', as the current name is too generic for a fan control
trip point.
Move the fan to a new cooling map to avoid overwriting the passive
trip point used for CPU frequency throttling when this overlay is
enabled. Also, add the fan to the existing cooling map.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
---
.../dts/ti/k3-am62x-phyboard-lyra-gpio-fan.dtso | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/ti/k3-am62x-phyboard-lyra-gpio-fan.dtso b/arch/arm64/boot/dts/ti/k3-am62x-phyboard-lyra-gpio-fan.dtso
index f0b2fd4165a7..1fd0aaff3193 100644
--- a/arch/arm64/boot/dts/ti/k3-am62x-phyboard-lyra-gpio-fan.dtso
+++ b/arch/arm64/boot/dts/ti/k3-am62x-phyboard-lyra-gpio-fan.dtso
@@ -33,7 +33,7 @@ AM62X_IOPAD(0x0a4, PIN_OUTPUT, 7) /* (M22) GPMC0_DIR.GPIO0_40 */
&thermal_zones {
main0_thermal: main0-thermal {
trips {
- main0_thermal_trip0: main0-thermal-trip {
+ main0_fan: main0-fan {
temperature = <65000>; /* millicelsius */
hysteresis = <2000>; /* millicelsius */
type = "active";
@@ -42,7 +42,17 @@ main0_thermal_trip0: main0-thermal-trip {
cooling-maps {
map0 {
- trip = <&main0_thermal_trip0>;
+ trip = <&main0_alert>;
+ cooling-device =
+ <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&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>;
+ };
+
+ map1 {
+ trip = <&main0_fan>;
cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] arm64: dts: ti: k3-am62a: Enable CPU freq throttling on thermal alert
2025-05-06 11:41 [PATCH v2 1/2] arm64: dts: ti: k3-am62a: Enable CPU freq throttling on thermal alert Daniel Schultz
2025-05-06 11:41 ` [PATCH v2 2/2] arm64: dts: ti: k3-am62x-phyboard-lyra-gpio-fan: Update cooling maps Daniel Schultz
@ 2025-05-06 18:35 ` Bryan Brattlof
2025-05-09 12:20 ` Nishanth Menon
2 siblings, 0 replies; 5+ messages in thread
From: Bryan Brattlof @ 2025-05-06 18:35 UTC (permalink / raw)
To: Daniel Schultz
Cc: nm, vigneshr, kristo, robh, krzk+dt, conor+dt, linux-arm-kernel,
devicetree, linux-kernel, upstream
On May 6, 2025 thus sayeth Daniel Schultz:
> Enable throttling down the CPU frequency when an alert temperature
> threshold (lower than the critical threshold) is reached.
>
> Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
> ---
> Changes in v2:
> * Increased passive trip point to 115C (10C below crit)
> * Dropped patch which decreased critical trip point.
>
> arch/arm64/boot/dts/ti/k3-am62a-thermal.dtsi | 57 ++++++++++++++++++--
> arch/arm64/boot/dts/ti/k3-am62a7.dtsi | 4 ++
> 2 files changed, 58 insertions(+), 3 deletions(-)
>
Looks good to me :)
Reviewed-by: Bryan Brattlof <bb@ti.com>
~Bryan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Upstream] [PATCH v2 2/2] arm64: dts: ti: k3-am62x-phyboard-lyra-gpio-fan: Update cooling maps
2025-05-06 11:41 ` [PATCH v2 2/2] arm64: dts: ti: k3-am62x-phyboard-lyra-gpio-fan: Update cooling maps Daniel Schultz
@ 2025-05-07 5:38 ` Wadim Egorov
0 siblings, 0 replies; 5+ messages in thread
From: Wadim Egorov @ 2025-05-07 5:38 UTC (permalink / raw)
To: Daniel Schultz, nm, vigneshr, kristo, robh, krzk+dt, conor+dt,
linux-arm-kernel, devicetree, linux-kernel
Cc: upstream
Am 06.05.25 um 14:41 schrieb Daniel Schultz:
> Rename 'main0_thermal_trip0' to a more descriptive name that
> includes 'fan', as the current name is too generic for a fan control
> trip point.
>
> Move the fan to a new cooling map to avoid overwriting the passive
> trip point used for CPU frequency throttling when this overlay is
> enabled. Also, add the fan to the existing cooling map.
>
> Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
> ---
> .../dts/ti/k3-am62x-phyboard-lyra-gpio-fan.dtso | 14 ++++++++++++--
> 1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/ti/k3-am62x-phyboard-lyra-gpio-fan.dtso b/arch/arm64/boot/dts/ti/k3-am62x-phyboard-lyra-gpio-fan.dtso
> index f0b2fd4165a7..1fd0aaff3193 100644
> --- a/arch/arm64/boot/dts/ti/k3-am62x-phyboard-lyra-gpio-fan.dtso
> +++ b/arch/arm64/boot/dts/ti/k3-am62x-phyboard-lyra-gpio-fan.dtso
> @@ -33,7 +33,7 @@ AM62X_IOPAD(0x0a4, PIN_OUTPUT, 7) /* (M22) GPMC0_DIR.GPIO0_40 */
> &thermal_zones {
> main0_thermal: main0-thermal {
> trips {
> - main0_thermal_trip0: main0-thermal-trip {
> + main0_fan: main0-fan {
> temperature = <65000>; /* millicelsius */
> hysteresis = <2000>; /* millicelsius */
> type = "active";
> @@ -42,7 +42,17 @@ main0_thermal_trip0: main0-thermal-trip {
>
> cooling-maps {
> map0 {
> - trip = <&main0_thermal_trip0>;
> + trip = <&main0_alert>;
> + cooling-device =
> + <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
> + <&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>;
> + };
> +
> + map1 {
> + trip = <&main0_fan>;
> cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> };
> };
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] arm64: dts: ti: k3-am62a: Enable CPU freq throttling on thermal alert
2025-05-06 11:41 [PATCH v2 1/2] arm64: dts: ti: k3-am62a: Enable CPU freq throttling on thermal alert Daniel Schultz
2025-05-06 11:41 ` [PATCH v2 2/2] arm64: dts: ti: k3-am62x-phyboard-lyra-gpio-fan: Update cooling maps Daniel Schultz
2025-05-06 18:35 ` [PATCH v2 1/2] arm64: dts: ti: k3-am62a: Enable CPU freq throttling on thermal alert Bryan Brattlof
@ 2025-05-09 12:20 ` Nishanth Menon
2 siblings, 0 replies; 5+ messages in thread
From: Nishanth Menon @ 2025-05-09 12:20 UTC (permalink / raw)
To: vigneshr, kristo, robh, krzk+dt, conor+dt, linux-arm-kernel,
devicetree, linux-kernel, Daniel Schultz
Cc: Nishanth Menon, upstream
Hi Daniel Schultz,
On Tue, 06 May 2025 04:41:33 -0700, Daniel Schultz wrote:
> Enable throttling down the CPU frequency when an alert temperature
> threshold (lower than the critical threshold) is reached.
>
>
I have applied the following to branch ti-k3-dts-next on [1].
Thank you!
[1/2] arm64: dts: ti: k3-am62a: Enable CPU freq throttling on thermal alert
commit: 8785b579d431b2a76a64f105328434d3c543debf
[2/2] arm64: dts: ti: k3-am62x-phyboard-lyra-gpio-fan: Update cooling maps
commit: 625e540cee2cfa0e514e0c8fb929fe2893e6d3bf
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-05-09 12:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-06 11:41 [PATCH v2 1/2] arm64: dts: ti: k3-am62a: Enable CPU freq throttling on thermal alert Daniel Schultz
2025-05-06 11:41 ` [PATCH v2 2/2] arm64: dts: ti: k3-am62x-phyboard-lyra-gpio-fan: Update cooling maps Daniel Schultz
2025-05-07 5:38 ` [Upstream] " Wadim Egorov
2025-05-06 18:35 ` [PATCH v2 1/2] arm64: dts: ti: k3-am62a: Enable CPU freq throttling on thermal alert Bryan Brattlof
2025-05-09 12:20 ` Nishanth Menon
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).