[PATCH 06/10] arm64: dts: amlogic: meson-s4: add the CPU thermal sensor and zone

From: christian . koever-draxl

Date: Fri Nov 06 2026 - 05:48:27 EST


From: Christian Stefan Kövér-Draxl <ckoever@xxxxxxxxxx>

Add the CPU temperature sensor with its bus and functional clocks; it
reads its calibration through the secure monitor. Add a CPU thermal
zone with a passive trip that throttles the GPU, which shares the die,
and a hot and a critical trip. The CPUs can join the passive trip once
CPU frequency scaling is in place.

Signed-off-by: Christian Stefan Kövér-Draxl <ckoever@xxxxxxxxxx>
---
arch/arm64/boot/dts/amlogic/meson-s4.dtsi | 48 +++++++++++++++++++++++
1 file changed, 48 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi
index 69105c8abf12..1e8b845b80c3 100644
--- a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi
@@ -11,6 +11,7 @@
#include <dt-bindings/clock/amlogic,s4-peripherals-clkc.h>
#include <dt-bindings/power/meson-s4-power.h>
#include <dt-bindings/reset/amlogic,meson-s4-reset.h>
+#include <dt-bindings/thermal/thermal.h>

/ {
cpus {
@@ -748,6 +749,17 @@ gpio_intc: interrupt-controller@4080 {
<10 11 12 13 14 15 16 17 18 19 20 21>;
};

+ cpu_temp: temperature-sensor@20000 {
+ compatible = "amlogic,s4-thermal";
+ reg = <0x0 0x20000 0x0 0x50>;
+ interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clkc_periphs CLKID_TS_PLL>,
+ <&clkc_periphs CLKID_TS>;
+ clock-names = "bus", "core";
+ #thermal-sensor-cells = <0>;
+ amlogic,secure-monitor = <&sm 1>;
+ };
+
eth_phy: mdio-multiplexer@28000 {
compatible = "amlogic,g12a-mdio-mux";
reg = <0x0 0x28000 0x0 0xa4>;
@@ -1025,4 +1037,40 @@ emmc: mmc@fe08c000 {
assigned-clock-rates = <24000000>;
};
};
+
+ thermal-zones {
+ cpu-thermal {
+ polling-delay = <1000>;
+ polling-delay-passive = <100>;
+ thermal-sensors = <&cpu_temp>;
+
+ trips {
+ cpu_passive: cpu-passive {
+ temperature = <85000>;
+ hysteresis = <5000>;
+ type = "passive";
+ };
+
+ cpu_hot: cpu-hot {
+ temperature = <95000>;
+ hysteresis = <5000>;
+ type = "hot";
+ };
+
+ cpu_critical: cpu-critical {
+ temperature = <105000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+ cooling-maps {
+ /* the GPU shares the die and the sensor */
+ map0 {
+ trip = <&cpu_passive>;
+ cooling-device = <&gpu THERMAL_NO_LIMIT
+ THERMAL_NO_LIMIT>;
+ };
+ };
+ };
+ };
};
--
2.56.0