From: Jeroen Trappers <jeroen.trappers@gmail.com>
To: rafael@kernel.org, daniel.lezcano@kernel.org, sven@kernel.org,
j@jannau.net, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org
Cc: rui.zhang@intel.com, lukasz.luba@arm.com, neal@gompa.dev,
towinchenmi@gmail.com, konradybcio@kernel.org,
asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Jeroen Trappers <jeroen.trappers@gmail.com>
Subject: [PATCH v2 3/3] arm64: dts: apple: t7000: Add die temperature sensors and thermal zones
Date: Fri, 4 Dec 2026 08:43:28 +0100 [thread overview]
Message-ID: <20261204074328.3741080-4-jeroen.trappers@gmail.com> (raw)
In-Reply-To: <20261204074328.3741080-1-jeroen.trappers@gmail.com>
Describe the A8's two die temperature sensor blocks and add three
zones: the CPU complex (TCC sensor 2) and the two power manager
sensors. The CPUs throttle from 70 C (apple-soc-cpufreq is the cooling
device), 90 C is hot and 100 C, the alarm temperature in the boot
chain's device tree, is critical, below the hardware failsafe (SoCHOT)
at 120 / 125 C. The CPUs are the only cooling device, so the power
manager sensors, which also see the GPU's heat, throttle them too. Both
CPUs are listed in the cooling maps, so throttling works whichever CPU
the kernel boots on.
TCC sensors 0 and 1 get no zone yet: sensor 2 is the one checked
against CPU load, and where in the CPU complex the other two sit is not
measured yet.
The power manager page lies after the end of the pmgr node's range
(0x20e000000 + 0x24000), like the watchdog's.
The trips were validated on the iPhone 6 (N61); they are conservative
for the other T7000 devices, which share the SoC.
The nodes were drafted with an LLM coding assistant and reviewed by me.
Signed-off-by: Jeroen Trappers <jeroen.trappers@gmail.com>
---
arch/arm64/boot/dts/apple/t7000.dtsi | 130 +++++++++++++++++++++++++++
1 file changed, 130 insertions(+)
diff --git a/arch/arm64/boot/dts/apple/t7000.dtsi b/arch/arm64/boot/dts/apple/t7000.dtsi
index 0342455d3444..529083268524 100644
--- a/arch/arm64/boot/dts/apple/t7000.dtsi
+++ b/arch/arm64/boot/dts/apple/t7000.dtsi
@@ -12,6 +12,7 @@
#include <dt-bindings/interrupt-controller/apple-aic.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/apple.h>
+#include <dt-bindings/thermal/thermal.h>
/ {
interrupt-parent = <&aic>;
@@ -34,6 +35,7 @@ cpu0: cpu@0 {
reg = <0x0 0x0>;
cpu-release-addr = <0 0>; /* To be filled in by loader */
performance-domains = <&cpufreq>;
+ #cooling-cells = <2>;
operating-points-v2 = <&typhoon_opp>;
enable-method = "spin-table";
device_type = "cpu";
@@ -47,6 +49,7 @@ cpu1: cpu@1 {
reg = <0x0 0x1>;
cpu-release-addr = <0 0>; /* To be filled in by loader */
performance-domains = <&cpufreq>;
+ #cooling-cells = <2>;
operating-points-v2 = <&typhoon_opp>;
enable-method = "spin-table";
device_type = "cpu";
@@ -118,6 +121,12 @@ cpufreq: performance-controller@202220000 {
#performance-domain-cells = <0>;
};
+ tcc_temp: thermal-sensor@202230000 {
+ compatible = "apple,t7000-tcc-thermal";
+ reg = <0x2 0x02230000 0x0 0x1000>;
+ #thermal-sensor-cells = <1>;
+ };
+
serial0: serial@20a0c0000 {
compatible = "apple,s5l-uart";
reg = <0x2 0x0a0c0000 0x0 0x4000>;
@@ -216,6 +225,12 @@ wdt: watchdog@20e027000 {
interrupts = <AIC_IRQ 4 IRQ_TYPE_LEVEL_HIGH>;
};
+ pmgr_temp: thermal-sensor@20e02b000 {
+ compatible = "apple,t7000-pmgr-thermal";
+ reg = <0x2 0x0e02b000 0x0 0x1000>;
+ #thermal-sensor-cells = <1>;
+ };
+
aic: interrupt-controller@20e100000 {
compatible = "apple,t7000-aic", "apple,aic";
reg = <0x2 0x0e100000 0x0 0x100000>;
@@ -274,6 +289,121 @@ i2c3_pins: i2c3-pins {
};
};
+ /*
+ * The CPUs throttle from 70 C, 90 C is hot and 100 C (the alarm
+ * temperature in the boot chain's device tree) is critical, below
+ * the hardware failsafe (SoCHOT) at 120 / 125 C. The CPUs are the
+ * only cooling device, so the power manager sensors, which also see
+ * the GPU's heat, throttle them as well.
+ *
+ * Of the CPU complex sensors only sensor 2 has a zone: it is the one
+ * checked against CPU load. Which part of the complex sensors 0 and 1
+ * sit in is not known yet; they get zones once that is measured.
+ */
+ thermal-zones {
+ cpu-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <1000>;
+ thermal-sensors = <&tcc_temp 2>;
+
+ trips {
+ cpu_alert: cpu-alert {
+ temperature = <70000>;
+ hysteresis = <3000>;
+ type = "passive";
+ };
+
+ cpu-hot {
+ temperature = <90000>;
+ hysteresis = <3000>;
+ type = "hot";
+ };
+
+ cpu-crit {
+ temperature = <100000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&cpu_alert>;
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+ };
+
+ soc0-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <1000>;
+ thermal-sensors = <&pmgr_temp 0>;
+
+ trips {
+ soc0_alert: soc0-alert {
+ temperature = <70000>;
+ hysteresis = <3000>;
+ type = "passive";
+ };
+
+ soc0-hot {
+ temperature = <90000>;
+ hysteresis = <3000>;
+ type = "hot";
+ };
+
+ soc0-crit {
+ temperature = <100000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&soc0_alert>;
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+ };
+
+ soc1-thermal {
+ polling-delay-passive = <250>;
+ polling-delay = <1000>;
+ thermal-sensors = <&pmgr_temp 1>;
+
+ trips {
+ soc1_alert: soc1-alert {
+ temperature = <70000>;
+ hysteresis = <3000>;
+ type = "passive";
+ };
+
+ soc1-hot {
+ temperature = <90000>;
+ hysteresis = <3000>;
+ type = "hot";
+ };
+
+ soc1-crit {
+ temperature = <100000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&soc1_alert>;
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+ };
+ };
+
timer {
compatible = "arm,armv8-timer";
interrupt-parent = <&aic>;
--
2.47.3
prev parent reply other threads:[~2026-12-04 7:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 7:43 [PATCH v2 0/3] Apple T7000 (A8) die temperature sensors and thermal zones Jeroen Trappers
2026-12-04 7:43 ` [PATCH v2 1/3] dt-bindings: thermal: Add Apple T7000 die temperature sensors Jeroen Trappers
2026-12-04 7:43 ` [PATCH v2 2/3] thermal/drivers/apple: Add T7000 (A8) on-die temperature sensor driver Jeroen Trappers
2026-12-04 7:43 ` Jeroen Trappers [this message]
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=20261204074328.3741080-4-jeroen.trappers@gmail.com \
--to=jeroen.trappers@gmail.com \
--cc=asahi@lists.linux.dev \
--cc=conor+dt@kernel.org \
--cc=daniel.lezcano@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=j@jannau.net \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=neal@gompa.dev \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=rui.zhang@intel.com \
--cc=sven@kernel.org \
--cc=towinchenmi@gmail.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