Devicetree
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: st: add thermal zones on stm32mp251
@ 2026-10-04 12:12 Mateusz Nowicki
  2026-10-07  9:40 ` Patrick DELAUNAY
  0 siblings, 1 reply; 2+ messages in thread
From: Mateusz Nowicki @ 2026-10-04 12:12 UTC (permalink / raw)
  To: Alexandre Torgue, Maxime Coquelin
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
	linux-stm32, linux-arm-kernel, linux-kernel, Mateusz Nowicki

Add a CPU and a SoC thermal zone for the two DTS sensors, each with a
critical trip point at 120 degrees Celsius, below the 125 degrees
Celsius max junction temperature of the STM32MP25.

Signed-off-by: Mateusz Nowicki <mateusz.nowicki@posteo.net>
---
 arch/arm64/boot/dts/st/stm32mp251.dtsi | 28 ++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/arch/arm64/boot/dts/st/stm32mp251.dtsi b/arch/arm64/boot/dts/st/stm32mp251.dtsi
index b624f998b87c..fd174c88b26d 100644
--- a/arch/arm64/boot/dts/st/stm32mp251.dtsi
+++ b/arch/arm64/boot/dts/st/stm32mp251.dtsi
@@ -158,6 +158,34 @@ RET_PD: power-domain-retention {
 		};
 	};
 
+	thermal-zones {
+		cpu-thermal {
+			polling-delay = <1000>;
+			thermal-sensors = <&dts 1>;
+
+			trips {
+				cpu-crit {
+					temperature = <120000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+		};
+
+		soc-thermal {
+			polling-delay = <1000>;
+			thermal-sensors = <&dts 0>;
+
+			trips {
+				soc-crit {
+					temperature = <120000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+		};
+	};
+
 	timer {
 		compatible = "arm,armv8-timer";
 		interrupt-parent = <&intc>;

base-commit: f831584128ac2a36fb4fa62fe106793d08c2dbf1
-- 
2.56.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] arm64: dts: st: add thermal zones on stm32mp251
  2026-10-04 12:12 [PATCH] arm64: dts: st: add thermal zones on stm32mp251 Mateusz Nowicki
@ 2026-10-07  9:40 ` Patrick DELAUNAY
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick DELAUNAY @ 2026-10-07  9:40 UTC (permalink / raw)
  To: Mateusz Nowicki, Alexandre Torgue, Maxime Coquelin
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
	linux-stm32, linux-arm-kernel, linux-kernel, Valentin Caron

Hi,

in rules established by STMicroelectronics:
     -Tcritical = Tj - (sensor tolerance). With Tj the function temperature.
     -Tlimitation = 90% of Tcritical.

On STM32MP25, Tj=125C even if the overdrive is used. So we have:
     - STM32MP2xxA/C/D/F, Tcritical = 125-3 = 122C
     - STM32MP2xxA/C/D/F, Tlimitation = 110C

So critical value need to be adjusted to
                     temperature = <122000>;
                     hysteresis = <1000>;

On 10/4/26 14:12, Mateusz Nowicki wrote:
> Add a CPU and a SoC thermal zone for the two DTS sensors, each with a
> critical trip point at 120 degrees Celsius, below the 125 degrees
> Celsius max junction temperature of the STM32MP25.
>
> Signed-off-by: Mateusz Nowicki <mateusz.nowicki@posteo.net>
> ---
>   arch/arm64/boot/dts/st/stm32mp251.dtsi | 28 ++++++++++++++++++++++++++
>   1 file changed, 28 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/st/stm32mp251.dtsi b/arch/arm64/boot/dts/st/stm32mp251.dtsi
> index b624f998b87c..fd174c88b26d 100644
> --- a/arch/arm64/boot/dts/st/stm32mp251.dtsi
> +++ b/arch/arm64/boot/dts/st/stm32mp251.dtsi
> @@ -158,6 +158,34 @@ RET_PD: power-domain-retention {
>   		};
>   	};
>   
> +	thermal-zones {
> +		cpu-thermal {
             polling-delay-passive = <250>;

because the DTS  sensors have no interrupts support

> +			polling-delay = <1000>;
> +			thermal-sensors = <&dts 1>;
> +
> +			trips {
> +				cpu-crit {
> +					temperature = <120000>;
> +					hysteresis = <2000>;


                     temperature = <122000>;
                     hysteresis = <1000>;

> +					type = "critical";
> +				};
> +			};
> +		};
> +
> +		soc-thermal {
             polling-delay-passive = <250>;
> +			polling-delay = <1000>;
> +			thermal-sensors = <&dts 0>;
> +
> +			trips {
> +				soc-crit {
> +					temperature = <120000>;
> +					hysteresis = <2000>;

                     temperature = <122000>;
                     hysteresis = <1000>;
> +					type = "critical";
> +				};
> +			};
> +		};
> +	};
> +
>   	timer {
>   		compatible = "arm,armv8-timer";
>   		interrupt-parent = <&intc>;
>
> base-commit: f831584128ac2a36fb4fa62fe106793d08c2dbf1


Regards

Patrick


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-07  9:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-04 12:12 [PATCH] arm64: dts: st: add thermal zones on stm32mp251 Mateusz Nowicki
2026-10-07  9:40 ` Patrick DELAUNAY

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox