Skip to content

arm64: dts: apple: share the CPU thermal zones with the J415 and the J375c - #2260

Closed
RyanTheTide wants to merge 2 commits into
mainfrom
spec12/thermal-zones
Closed

RyanTheTide wants to merge 2 commits into
mainfrom
spec12/thermal-zones

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Problem

CPU thermal zones were described on the J413 (M2 MacBook Air 13") and the M1 Pro/Max MacBook Pros only. The M2 MacBook Air 15" (J415) is fanless like the J413 and had nothing that throttles the CPUs before the SMC's own protection. The M1 Max Mac Studio (J375c) has the same T6001 die as the J314c/J316c and showed no CPU temperature at all.

Change

  • t8112-cpu-thermal.dtsi: the J413's five CPU zones, moved unchanged. Their sensors (Te05, Tp01, Tp05, Tp09, Tp0D) are already described first among the SMC hwmon channels in t8112.dtsi, so channels 1-5 are the same on every T8112 board. The J413 and the J415 include it.
  • The J413 keeps its 6000 mW sustainable power as a per-board override, because that number belongs to the chassis. The J415 has no measured value, so it sets none and the power allocator estimates one.
  • t600x-cpu-thermal.dtsi: the CPU keys, the CPU cooling cells and the CPU zones from t600x-j314-j316.dtsi. The board defines T600X_CPU_TEMP_BASE, the channel index of the first CPU key: 8 on the laptops, 1 on the J375c. The laptops and the J375c include it.

Testing

  • The J413, J314s, J316s, J314c and J316c DTBs are byte-identical. The J473, J493 and J375d DTBs are unchanged.
  • On the J415 and the J375c, the zones resolve to the same keys as on the J413 and the J316c (zone, channel and key table below). The DT build adds no new warnings (W=1).

Still to run

  • J413 (m2): hardware row pending.
  • J316s (m1pro): hardware row pending.
  • J415 and J375c: hardware rows pending (need board owners).
Why the J473, J493, J375d, T8103 and T602x are not included
  • J473/J493 (T8112 with a fan): the 58 C alert trip was chosen for a fanless chassis. With a fan, the die runs above it under ordinary load. Without a measured sustainable power the governor's estimate is about 1.15 W (see below), so these boards would be held near their lowest speeds. They need a trip set from a load test on that chassis, as the T600x laptops have (switch-on above the loaded peak).
  • J375d (T6002): the second die's CPU keys are not described anywhere.
  • T8103 (j274/j293/j313/j456/j457) and T602x (j414/j416/j474/j475/j180d): the tree has no CPU die keys and no CPU #cooling-cells for these SoCs, so there is nothing to point a zone at yet.
Default when sustainable-power is not set (gov_power_allocator.c)

power_allocator_bind() warns and get_sustainable_power() calls estimate_sustainable_power(). That sums state2power(instance->upper) over the cooling instances of the control trip. cpufreq_state2power() multiplies the per-CPU energy-model power by the policy's CPU count. For the T8112 zones this gives:

  • P cluster at its lowest OPP: 4 x 133 mW.
  • E cluster at state 3 (1752 MHz): 4 x 155 mW.
  • Total: about 1152 mW.

The PID constants are then derived over the 58-95 C span. Below 58 C the governor allows full power (allow_maximum_power()), so idle and light loads are unchanged. Above 58 C the budget is lower than with a measured value. This is the most conservative choice, which is right for a fanless chassis whose own value has not been measured.

The T600x zones keep their sustainable power. It comes from the energy model (four cores at 2448 MHz per P cluster, E at full speed), not from a chassis measurement. Their trips (75/85 C switch-on, 105 C control) sit above the 95 C peak a J316s reaches with its fans under an all-core load. The Studio's cooler is larger, so the zones stay a backstop there.

Zone to channel to key, after the change
t8112-j413/j415: cpu-e0 1 Te05, cpu-p0 2 Tp01, cpu-p1 3 Tp05, cpu-p2 4 Tp09, cpu-p3 5 Tp0D
                 (j413 sp=6000, j415 estimated; trips 58/95 C)
t6000-j316s, t6001-j316c: cpu-e0 11 Te02, cpu-p00 14 Tp02 ... cpu-p14 41 Tp0c (unchanged)
t6001-j375c: cpu-e0 4 Te02, cpu-p00 7 Tp02 ... cpu-p14 34 Tp0c (same keys, base 1)

If a key is missing from the J375c or J415 SMC, the driver keeps that channel hidden in indexed mode and only that zone fails to register. No other zone moves to a different sensor.

Hardware rows
  • J413 (m2): run for z in /sys/class/thermal/thermal_zone*; do echo $(cat $z/type) $(cat $z/temp) $(cat $z/sustainable_power); done. Expect cpu-e0/p0/p1/p2/p3-thermal, each with sustainable_power 6000, temps matching /sys/class/hwmon/hwmon*/temp2..6_input of macsmc_hwmon, and the same as before.
  • J316s (m1pro): run the same command. Expect 11 cpu--thermal zones with sustainable_power 800 (e0) and 11600 (p), as before.
  • J415: run the same command. Expect five cpu-*-thermal zones and dmesg power_allocator: sustainable_power will be estimated.
  • J375c: expect hwmon labels "SoC Die Temperature", "E-cluster Te00"..., and 11 cpu-*-thermal zones.

…e J415

The CPU thermal zones of the T8112 were described in t8112-j413.dts
only, so the 15-inch MacBook Air (J415), which is fanless too and has
the same SoC, had nothing that throttles the CPUs on heat before the
SMC's own protection.

The zones read SoC die keys (Te05, Tp01, Tp05, Tp09, Tp0D) that
t8112.dtsi already describes first among the SMC hwmon temperature
channels, so their channel numbers (1-5) are the same on every T8112
board, and t8112.dtsi already makes the CPUs cooling devices. Move the
zones unchanged into t8112-cpu-thermal.dtsi and include it from both
fanless boards.

sustainable-power is a property of the chassis cooling, so it stays
per board: the J413 keeps its 6000 mW (from the J613 load tests, the
same 13-inch chassis) as an override on each zone. The J415 has no
measured value and sets none, so the power allocator estimates it from
the cooling devices' lowest allowed power, the most conservative
budget.

The boards with a fan (J473, J493) do not include the file: under load
their die runs above the 58 C alert trip with the fan doing its work,
and with an estimated budget the zones would hold the CPUs down there.
They need a trip set from a load test on that chassis.

The J413 DTB is byte-identical.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The CPU temperatures and thermal zones of the T6000/T6001 were
described in t600x-j314-j316.dtsi only, so the M1 Max Mac Studio
(J375c), which has the same T6001 die as the J314c/J316c, exposed no
CPU temperature and had no CPU thermal zone.

Move the CPU keys, the CPU cooling cells and the zones into
t600x-cpu-thermal.dtsi. The zones refer to the SMC hwmon temperature
channels by index, and the boards have different channels before the
CPU keys, so the board sets T600X_CPU_TEMP_BASE to the index of the
first CPU key (TCMz): 8 on the laptops (TH0x, TB0T, TCHP, TW0P and four
GPU keys), 1 on the J375c (TH0x).

Nothing in the zones is chassis-specific: the trips are a backstop
above the peak a fanned laptop reaches under an all-core load, and
sustainable-power comes from the energy model. The Studio's larger
cooler only keeps the die further below the trips. If the J375c SMC
lacks a key, the driver hides that channel and only its zone fails to
register.

The J375d (T6002) is left out: its second die's CPU keys are not known.

The J314s, J316s, J314c and J316c DTBs are byte-identical.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Early note on this draft (no full review yet):

  1. arch/arm64/boot/dts/apple/t8112-cpu-thermal.dtsi:41,47 (and the same trips at :83/89, :125/131, :167/173) and arch/arm64/boot/dts/apple/t600x-cpu-thermal.dtsi:261-296: the CPU trip temperatures and sustainable-power budgets are fixed constants in the DT, and this change extends them to boards where they were never measured (J415 via t8112-j415.dts, J375c via t6001-j375c.dts). Thermal limits that protect the hardware should come from what the machine reports (its SMC-provided limits or the thermal data in its ADT), with the zone left out when the machine provides nothing, rather than being carried as constants chosen on another chassis. Either read the trips and budget from the machine, or keep the J415 and J375c out of these zones until they can.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Closing: this carries thermal limits measured on other chassis to the J415 and J375c; those zones need limits from the machine itself or a load test on that chassis.

@RyanTheTide RyanTheTide reopened this Nov 22, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Reopened and kept as a draft; the comment above lists what it still needs before review.

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent source review at b2dc6b03ed40. The J415 newly inherits the J413 temperature trip values and the J375c takes a laptop thermal model too. Please establish these newly applied limits from the machine and show the selected sensors and passive behavior on the target chassis. A bit-identical J413 build covers the refactor there. Also verify temperature indices 1–5 after combining with #2923.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Closing: this carries thermal limits measured on other chassis to the J415 and J375c; those zones need limits from the machine itself or a load test on that chassis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant