From b56051f86b40ffa508c85767af3af723c6ede09c Mon Sep 17 00:00:00 2001 From: Roberto Dantas <7robertodantas@gmail.com> Date: Sun, 22 Nov 2026 21:08:08 -0300 Subject: [PATCH] arm64: dts: apple: t6041-j575c: let userspace set the fan speeds The J575c SMC has no F0Md/F1Md fan mode keys: it spells them F0md/F1md, as the T6050 SMC does, so macsmc-hwmon drops the mode key at probe ("Fan F0Ac: optional keys not found: mode F0Md") and fanX_target stays read-only. Name the keys this SMC has and mark both fans apple,fan-manual-control, as the J614c/J616c already are. This SMC has no Ftst unlock key either; the fans are in automatic mode and take the manual mode write directly. The SMC drives the fans until userspace writes a target, and writing 0 hands a fan back. The J775D Mac Studio uses the same key spelling but keeps its fans read-only for userspace only because they have not been tested this way yet (the J714s change, 7a479d4a41c9, left J716s and J775D out until then), not because of a known hardware difference. Tested on a J575c (7.3.0-1-106, integration/aurora f5fae3cbb) with a one-shot Stage 2 whose J575c DTB differs only by this change: both fanX_target are 0644 and the probe message is gone; fan 1 set to 2000 rpm ran at 2000 and returned to the SMC's 1000 rpm after 0 was written; both fans set to 3000 ran at 2994/2990 and returned the same way; with fan 1 held at 2000 an s2idle cycle handed it back to the SMC. After these cycles, a 15 min all-core load (84 W, die up to 99 C) had the SMC raise both fans from 1000 to 1569 rpm on its own. No macsmc-hwmon messages in the kernel log. Then on 7.3.0-1-108 (integration/aurora e892113c7, this commit's base) with this commit's DTB: both fans set to their 3625 rpm maximum ran at about 3640 rpm, and 5000 was clamped to 3625. With both fans held at their 1000 rpm minimum, the same 15 min all-core load (84-85 W) took the die to 96 C after 5 min, 104 C after 10 min and 106-108 C over the last 3 min. That is below the first cpu-die trip (112 C), so no cooling device engaged and the clocks stayed at 4512/2592/4512 MHz with the same throughput as under SMC control; the SMC did not trip, shut down or override the held fans, and took them to 2500 rpm on its own after 0 was written. With fan 1 held at 2000 rpm, both a reboot and a poweroff followed by power-on came up with the fans under SMC control (1000 rpm) on a boot whose device tree has no fan control. 0 failed units, and the same kernel errors and warnings as with the base DTB. Signed-off-by: Roberto Dantas <7robertodantas@gmail.com> --- arch/arm64/boot/dts/apple/t6041-j575c.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t6041-j575c.dts b/arch/arm64/boot/dts/apple/t6041-j575c.dts index a9b42e9a63ab1..12677f9d797e8 100644 --- a/arch/arm64/boot/dts/apple/t6041-j575c.dts +++ b/arch/arm64/boot/dts/apple/t6041-j575c.dts @@ -1089,6 +1089,24 @@ #include "hwmon-common.dtsi" #include "hwmon-fan-dual.dtsi" +&smc_hwmon { + /* + * This SMC spells the fan mode keys F0md/F1md, as the T6050 one does + * (it has no F0Md/F1Md and no Ftst unlock key). It accepts a manual + * speed for both fans from userspace and returns them to firmware + * control when the request is dropped. + */ + fan-F0Ac { + apple,fan-mode = "F0md"; + apple,fan-manual-control; + }; + + fan-F1Ac { + apple,fan-mode = "F1md"; + apple,fan-manual-control; + }; +}; + &pinctrl { status = "okay";