Repository navigation
arm64: dts: apple: share the CPU thermal zones with the J415 and the J375c - #2260
RyanTheTide wants to merge 2 commits into
Conversation
…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>
|
Early note on this draft (no full review yet):
Assisted-by: LLM (Claude:Opus 5.5) |
|
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. |
|
Reopened and kept as a draft; the comment above lists what it still needs before review. |
RyanTheTide
left a comment
There was a problem hiding this comment.
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.
|
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. |
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 int8112.dtsi, so channels 1-5 are the same on every T8112 board. The J413 and the J415 include it.t600x-cpu-thermal.dtsi: the CPU keys, the CPU cooling cells and the CPU zones fromt600x-j314-j316.dtsi. The board definesT600X_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
Still to run
Why the J473, J493, J375d, T8103 and T602x are not included
#cooling-cellsfor 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 andget_sustainable_power()callsestimate_sustainable_power(). That sumsstate2power(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: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
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
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_inputof macsmc_hwmon, and the same as before.power_allocator: sustainable_power will be estimated.