Skip to content

arm64: dts: apple: t6041: CPU energy model and a CPU die zone at the ADT target - #1452

Merged
RyanTheTide merged 3 commits into
aurora-silicon:integration/aurorafrom
joske:pr/t6041-cpu-thermal
Nov 10, 2026
Merged

RyanTheTide merged 3 commits into
aurora-silicon:integration/aurorafrom
joske:pr/t6041-cpu-thermal

Conversation

@joske

@joske joske commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

On the M4 Max, a sustained all-core load under Linux runs into the critical trip and powers the machine off. My J614c (MacBook Pro 14", M4 Max) did that during a Mesa build. Two things combine:

  1. No CPU energy model. The T6041 CPU OPP tables have no opp-microwatt, so the power allocator has no power actors, and cpu-die-thermal never throttles anything. That applies to the new GPU zones (arm64: dts: apple: t6041-j614c-j616c: add the GPU temperatures and zones #1447) too. On the J614c the clocks stayed at 4.1 GHz up to the 114 °C test kill. This is the T6040 problem that 76815fa fixed for the M4 Pro.
  2. Trips that aren't Apple's. The J614c/J616c zone used a passive trip at 113 °C and a critical trip at 118 °C. Both ADTs carry the M4 Pro's die limits: temp-sensor and fast-die-ctrl-loop are byte-identical to the J614s's, with a 110 °C target and a 125 °C maximum (sochot). The PMP fast-die loop is off on these boards, so this zone is the CPU's only throttle.

Commit 1, t6041: add the CPU energy model: this takes T6040's measured energy model, since the cores are the same. Three P states that only T6041 has (3828, 3888 and 3948 MHz) are interpolated in frequency, and the tables stay monotonic. The model is in t6041.dtsi, so it also covers the J575c, which hasn't been tested.

Commit 2, t6041-j614c-j616c: hold the CPU die at the ADT target: this runs the power allocator the way the M4 Pro zones do, at the ADT target. Switch-on is at 75 °C and control at 110 °C, with a 20 s integral constant. sustainable-power is 48 W. Hot is 120 °C, report only, and critical is the 125 °C sochot level after three samples.

Why 110 °C and 48 W, measured on the J614c. I ran the same all-core NEON FMA load on macOS and Linux and read the whole SMC key table on both. On Linux I used a read-only debug module.

macOS Linux, old zone + energy model Linux, this PR
CPU power (PHPC) 48–51 W ~33 W —
TCMz 105–110 °C 105–116 °C, swinging 109–110 °C, steady
Fans ~4950 rpm 2317 rpm (minimum) 4000–4350 rpm

The SMC fan loop follows the dDT* hot spot, not TCMz. dDT* reads up to 16 °C above TCMz at high power. If the zone holds the CPU around 33 W, dDT never gets hot enough for the fans to ramp, and the low airflow then keeps the power down. With control at 110 °C and macOS's sustained power, the fans ramp on their own, as they do on macOS.

Testing on the J614c. linux-aurora was built from a82a1eb plus #1442. The DTB was built from this branch and installed through update-m1n1. There were no sysfs overrides.

  • Four minutes of 16-thread NEON FMA load: TCMz was held at 109–110 °C from 30 s on, and no sample went above 110 °C. The fans ramped to 4000–4350 rpm, and the hot and critical trips were never reached.
  • Before this PR, without the energy model, the same load ran into the 118 °C critical trip and the hardware-protection power-off.
  • With only the energy model, the old 113 °C trip with a 48 W budget overshot to 114–116 °C, and the fans stayed at their minimum.

Known limits:

  • Uneven throttling. The single die zone throttles the clusters unevenly: under load P1 stayed at 4.1 GHz while P0 dropped to 2.4–2.9 GHz. The M4 Pro's per-cluster zones avoid that, and that's a follow-up.
  • 48 W is a 14" measurement. The J616c has more cooling, so 48 W is on the safe side for it.
  • J616c and J575c are not booted with this. For the J616c, its ADT's temp-sensor and fast-die-ctrl-loop match the J614c's.
  • The PMP. With the M4 Pro's PMP and PMC nodes enabled, the PMP starts fine on the J614c, and aura passes 90 tunables. But it doesn't feed the SMC's power keys, and it doesn't change the fans. It's not part of this PR.

🤖 Generated with Claude Code

joske and others added 3 commits November 10, 2026 11:59
T6041's CPU OPP tables carry no opp-microwatt, so no energy model
registers, the power allocator has no power actors and no CPU thermal
zone on an M4 Max throttles anything. On a J614c an all-core load ran
at full clock into the critical trip.

Take T6040's measured energy model (t6040.dtsi): the J616s values for
the same E and P cores. T6041's P tables have three states T6040 lacks
(3828, 3888 and 3948 MHz) and none of T6040's 3852 and 3924 MHz;
interpolate those three in frequency between their neighbours. The
tables stay monotonic.

With it, the cpu-die-thermal zone of the J614c throttles the three
clusters: under an all-core load the allocator brings the clocks down
as the die passes its control point.

Signed-off-by: Jos Dehaes <jos.dehaes@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The M4 Max boards' cpu-die-thermal zone had one passive trip at 113 C and
the critical trip at 118 C. Neither is Apple's: the J614c and J616c ADTs
(temp-sensor, fast-die-ctrl-loop) give the M4 Max the M4 Pro's die
limits, a 110 C target and a 125 C maximum, the sochot level. The PMP's
fast die loop is off on these boards, so this zone is the CPU's only
throttle.

Measured on a J614c with the same all-core NEON FMA load on both
systems:

- macOS sustains 48-51 W on the CPU with TCMz at 105-110 C, and the
  fans run at about 4950 rpm.
- The SMC fans follow a power-weighted hot spot (dDT*), which reads up
  to 16 C above TCMz at high power, not TCMz. With the zone controlling
  at 105 C the CPU settled at about 33 W, dDT stayed near 110 C and the
  fans stayed at their 2317 rpm minimum, which in turn held the power
  down.

So run the power allocator as the M4 Pro zones do, at the ADT target:
switch on at 75 C, control at 110 C, integral-led with a 20 s constant
since the 1 s samples jump by about 10 C, and macOS's 48 W as
sustainable-power. A 120 C hot trip only reports; the critical trip
moves to the 125 C sochot level, after three samples.

On the J614c, four minutes of the same load with these values: TCMz
held at 109-110 C from 30 s on with no sample above 110 C, the fans
ramped to 4000-4350 rpm on their own, and no hot or critical trip was
reached. The old zone, with the energy model, overshot to 114-116 C at
the same load; without it, the load ran into the critical trip and the
hardware protection power-off.

Signed-off-by: Jos Dehaes <jos.dehaes@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s own sensors

With one die zone controlling all three clusters, the power allocator
divides the zone's budget by requested power: under an all-core load on
the J614c it held P0 at 2.4-2.9 GHz while P1 ran at 4.1 GHz, and the
E cluster at 1.02 GHz.

Add a zone per SMC core-die sensor, as the M4 Pro has, each throttling
only its own cluster. On the J614c, loading one cluster at a time shows
Tpx0-5 follow P0 (cpu0, cpu5-9), Tpx8-D follow P1 (cpu10-15) and Tex0-3
the E cluster. The zones control at the ADT's 110 C target, with the die
zone's 75 C switch-on, 120 C hot and 125 C sochot critical trips.

The P clusters share one rail meter (PHPC), which reads 25 W with either
cluster loaded alone; the E cluster adds about 2 W. macOS sustained
48-51 W on all three, so each P zone gets 24 W and each E zone 2 W.

The die zone on TCMz stays as a backstop, controlling from 115 C.

On the J614c, four minutes of all-core NEON FMA load: P0 and P1 both
held at 3.3-3.8 GHz and the E cluster at 2.59 GHz, TCMz at 109-111 C
with single samples up to 114 C, no hot or critical trip, and the fans
ramped to 4100-4450 rpm.

Signed-off-by: Jos Dehaes <jos.dehaes@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@joske

joske commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

Added a third commit, t6041-j614c-j616c: throttle each CPU cluster on its own sensors (58d5f14). With one die zone controlling all three clusters, the allocator split the budget unevenly under an all-core load: P0 ran at 2.4–2.9 GHz, P1 at 4.1 GHz and E at 1.02 GHz.

What it adds. There is now one zone per SMC core-die sensor, as on the M4 Pro, and each one throttles only its own cluster.

  • I loaded one cluster at a time on the J614c to map the sensors: Tpx0-5 follow P0, Tpx8-D follow P1 and Tex0-3 follow E.
  • The new zones control at 110 °C. The die zone stays as a backstop, controlling from 115 °C.
  • Budgets are 24 W per P cluster and 2 W for E. The two P clusters share one rail meter (PHPC), which reads 25 W with either cluster loaded alone.

Same 4-minute test on the J614c:

  • P0 and P1 both held at 3.3–3.8 GHz, and E at 2.59 GHz.
  • TCMz stayed at 109–111 °C, with single samples up to 114.
  • No hot or critical trip was reached.
  • The fans ramped to 4100–4450 rpm.

🤖 Generated with Claude Code

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.

2 participants