[PATCH v2 0/3] Apple T7000 (A8) die temperature sensors and thermal zones
From: Jeroen Trappers
Date: Fri Dec 04 2026 - 02:43:44 EST
The Apple A8 has no thermal zones in Linux today. Unlike Apple Silicon
Macs, it has no SMC doing thermal management in firmware; on iOS the
kernel reads the die sensors itself. With nothing reading them, the
only protection is the hardware failsafe (SoCHOT) at 120 C.
This series adds a binding and a driver for the A8's five die
temperature sensors, in two blocks: two sensors in the power manager
(PMGR) and three in the CPU complex (TCC). It also adds thermal zones
in t7000.dtsi on three of the sensors. The zones throttle the CPUs
from 70 C, with 90 C hot and 100 C critical.
The register interface is the one iOS drives (AppleT700XTempSensor):
- only 32-bit accesses;
- a freeze / read / restart of each sensor's accumulator;
- no writes to calibration, alarm or SoCHOT registers;
- the per-sensor offsets from the tempsensor0..4 nodes of the iPhone 6
device tree.
The driver is adapted from Berkay Kösebay's out-of-tree A9 (S8003)
driver for the same block.
Changes in v2 (all from the Sashiko review of v1):
- Binding: each block is its own node, with its own compatible
(apple,t7000-pmgr-thermal and apple,t7000-tcc-thermal) and the
sensor index within the block as the cell. This replaces one node
with two reg pages, where the TCC page was optional.
- Driver: an accumulation interval is never cut shorter than 100 ms,
so fast polling cannot starve the accumulator. In v1, a read that
found no sample still restarted the interval.
- Driver: a sensor without a valid sample for 5 s reads -EIO, and one
disabled since probe reads -ENODEV without being restarted. v1 kept
returning the last sample forever.
- Driver: a sensor is only started once a zone using it is
registered. Sensors no zone uses are not written at all; v1 started
and then stopped them.
- DTS: both CPUs are in the cooling maps.
- DTS: the commit message explains why TCC sensors 0 and 1 get no zone
yet.
Testing on v2, on an iPhone 6 (N61): the driver is byte-identical on a
7.3-rc1 based kernel, the iPhone 6 port this work comes from. That
kernel's n61 device tree has the same two sensor nodes and zones, plus
a GPU cooling map for a GPU driver that is not upstream. The v7.4-rc5
tree itself was not booted.
- Both nodes bind after a cold boot. The zones read 31.5 / 29.0 /
29.8 C idle (CPU complex / SOC0 / SOC1).
- 2000 back-to-back reads of the CPU zone return no errors.
- The unused TCC sensors 0 and 1 keep the CTL0 value the boot chain
left. The three used sensors accumulate while bound, stop on unbind,
and start again on rebind.
- Two busy cores take the CPU complex sensor from 33 to 62 C in 5 s.
It is back at 34 C seconds after the load stops.
The 70 C throttling step was tested on v1, with the same zones and
trips: the CPUs stepped to 1128 MHz and held 67-74 C. It was not
repeated on v2.
On v7.4-rc5, all of these are clean:
- a W=1 arm64 build;
- checkpatch --strict;
- dt_binding_check;
- CHECK_DTBS for every t7000 board.
v1: https://lore.kernel.org/r/20261203155600.3911447-1-jeroen.trappers@xxxxxxxxx
Tool use (Documentation/process/generated-content.rst): the series was
written with an LLM coding assistant over a longer working session. The
assistant drafted:
- the driver, adapting the A9 driver to the A8 offsets and the iOS
register sequence;
- the binding;
- the device tree nodes;
- the changelogs.
Under my direction, it also ran the on-device tests and the build and
schema checks, and made the v2 changes. A separate LLM review pass, with
the review prompts Sashiko uses, found an issue that was fixed before
posting. I have reviewed the series and can answer for it.
Jeroen Trappers (3):
dt-bindings: thermal: Add Apple T7000 die temperature sensors
thermal/drivers/apple: Add T7000 (A8) on-die temperature sensor driver
arm64: dts: apple: t7000: Add die temperature sensors and thermal
zones
.../bindings/thermal/apple,t7000-thermal.yaml | 57 ++++
MAINTAINERS | 8 +
arch/arm64/boot/dts/apple/t7000.dtsi | 130 ++++++++
drivers/thermal/Kconfig | 13 +
drivers/thermal/Makefile | 1 +
drivers/thermal/apple_t7000_thermal.c | 295 ++++++++++++++++++
6 files changed, 504 insertions(+)
create mode 100644 Documentation/devicetree/bindings/thermal/apple,t7000-thermal.yaml
create mode 100644 drivers/thermal/apple_t7000_thermal.c
base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
--
2.47.3