From 1f64e3b947f716bb3d198ea1f4f0e8ff90735b36 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Fri, 20 Nov 2026 01:25:28 +1100 Subject: [PATCH] arm64: dts: apple: t6050: describe the fans on J775c and J873s The Mac Studio (M5 Max, J775c) and the Mac mini (M5 Pro, J873s) have the SMC hwmon node from t6050-die0.dtsi but no fan or power keys, so neither shows a fan speed. Move the J775d's SMC keys (DC input power PD0R, the two fans with the T6050 mode keys F0md/F1md) into a new t6050-j775-hwmon.dtsi and include it from both Studios. The J775d DTB is byte-identical. The J775c board support by Satya Benson and Diljit Singh uses the same keys. The J873s takes the Mac mini pattern (hwmon-common.dtsi, hwmon-mini.dtsi: one fan), drops the shared temperature nodes so that key discovery still runs, as J714s and J716s do, and uses the T6050 fan mode key F0md. No new SMC keys: all of them are in the shared hwmon files or already used on other T6050 boards. The other nine T6050 DTBs are unchanged. Suggested-by: Jeff Queisser Signed-off-by: Ryan Murray --- .../boot/dts/apple/t6050-j775-hwmon.dtsi | 37 +++++++++++++++++++ arch/arm64/boot/dts/apple/t6050-j775c.dts | 4 ++ arch/arm64/boot/dts/apple/t6050-j775d.dts | 30 +-------------- arch/arm64/boot/dts/apple/t6050-j873s.dts | 26 +++++++++++++ 4 files changed, 68 insertions(+), 29 deletions(-) create mode 100644 arch/arm64/boot/dts/apple/t6050-j775-hwmon.dtsi diff --git a/arch/arm64/boot/dts/apple/t6050-j775-hwmon.dtsi b/arch/arm64/boot/dts/apple/t6050-j775-hwmon.dtsi new file mode 100644 index 0000000000000..dcdec14140c22 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6050-j775-hwmon.dtsi @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * SMC hwmon keys shared by the T6050 Mac Studios (J775c M5 Max, J775d M5 Ultra): + * the DC input power and the two fans. + * + * Copyright The Asahi Linux Contributors + */ + +/* + * The Studio's DC input. PSTR and PDTR read 0 on the Studio; PD0R is its DC input (36.5 W at an + * idle desktop). + */ +&smc_hwmon { + power-PD0R { + apple,key-id = "PD0R"; + label = "DC Input Power"; + }; +}; + +#include "hwmon-fan-dual.dtsi" + +/* + * The Studio's SMC has F0Ac/F0Mn/F0Mx/F0Tg and F1*, but its mode keys are F0md/F1md (ui8, flags 0xd0: + * readable, writable, a function key), not the F0Md/F1Md the dtsi names; with the dtsi's names fan + * creation failed on the missing key. With the real keys the fans can be set by the kernel's + * thermal policy (the M5 GPU governor, through macsmc_hwmon_fans_request()). No + * apple,fan-manual-control: userspace still only reads them. + */ +&smc_hwmon { + fan-F0Ac { + apple,fan-mode = "F0md"; + }; + + fan-F1Ac { + apple,fan-mode = "F1md"; + }; +}; diff --git a/arch/arm64/boot/dts/apple/t6050-j775c.dts b/arch/arm64/boot/dts/apple/t6050-j775c.dts index 65d92d3a17480..4170a7bd2b499 100644 --- a/arch/arm64/boot/dts/apple/t6050-j775c.dts +++ b/arch/arm64/boot/dts/apple/t6050-j775c.dts @@ -7,6 +7,8 @@ * One T6050 die (t6050-max.dtsi). Nobody has booted Linux on this board * yet: beyond the SoC this file only adds the board's hardware inventory * (t6050-peripherals.dtsi), all of it disabled, from the board's ADT. + * The SMC hwmon keys (DC input power, two fans) are the J775d's + * (t6050-j775-hwmon.dtsi). * * Copyright The Asahi Linux Contributors */ @@ -32,5 +34,7 @@ status = "disabled"; }; +#include "t6050-j775-hwmon.dtsi" + #define T6050_J775C #include "t6050-peripherals.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6050-j775d.dts b/arch/arm64/boot/dts/apple/t6050-j775d.dts index 68b4c324aca02..d72e1725f9024 100644 --- a/arch/arm64/boot/dts/apple/t6050-j775d.dts +++ b/arch/arm64/boot/dts/apple/t6050-j775d.dts @@ -284,35 +284,7 @@ status = "okay"; }; -/* - * The Studio's DC input. PSTR and PDTR read 0 on the Studio; PD0R is its DC input (36.5 W at an - * idle desktop). - */ -&smc_hwmon { - power-PD0R { - apple,key-id = "PD0R"; - label = "DC Input Power"; - }; -}; - -#include "hwmon-fan-dual.dtsi" - -/* - * The Studio's SMC has F0Ac/F0Mn/F0Mx/F0Tg and F1*, but its mode keys are F0md/F1md (ui8, flags 0xd0: - * readable, writable, a function key), not the F0Md/F1Md the dtsi names; with the dtsi's names fan - * creation failed on the missing key. With the real keys the fans can be set by the kernel's - * thermal policy (the M5 GPU governor, through macsmc_hwmon_fans_request()). No - * apple,fan-manual-control: userspace still only reads them. - */ -&smc_hwmon { - fan-F0Ac { - apple,fan-mode = "F0md"; - }; - - fan-F1Ac { - apple,fan-mode = "F1md"; - }; -}; +#include "t6050-j775-hwmon.dtsi" /* * The boot NOR's NVRAM: the loader fills the partition from ADT /arm-io/qspi/spinor/anvram reg diff --git a/arch/arm64/boot/dts/apple/t6050-j873s.dts b/arch/arm64/boot/dts/apple/t6050-j873s.dts index 0a7976e50230f..2b0bd266c13da 100644 --- a/arch/arm64/boot/dts/apple/t6050-j873s.dts +++ b/arch/arm64/boot/dts/apple/t6050-j873s.dts @@ -7,6 +7,7 @@ * One T6050 die (t6050-max.dtsi). Nobody has booted Linux on this board * yet: beyond the SoC this file only adds the board's hardware inventory * (t6050-peripherals.dtsi), all of it disabled, from the board's ADT. + * The SMC hwmon keys (one fan) follow the other Mac minis. * * Copyright The Asahi Linux Contributors */ @@ -32,5 +33,30 @@ status = "disabled"; }; +/* + * SMC sensors, as on the other Mac minis: the shared power, voltage and current + * keys and the single fan, plus every readable float T* key through + * apple,discover-temperatures in t6050-die0.dtsi. A key this SMC lacks only + * drops its channel. + * + * Discovery refuses to run once any temperature channel exists, so the shared + * temperature nodes go (their keys are discovered anyway), as on J714s/J716s. + */ +#include "hwmon-common.dtsi" +#include "hwmon-mini.dtsi" + +&smc_hwmon { + /delete-node/ temperature-TH0x; + /delete-node/ temperature-TW0P; + + /* + * The T6050 SMC spells the fan mode key F0md, as on J714s, J716s, K116s + * and J775d. No apple,fan-manual-control: the SMC drives the fan. + */ + fan-F0Ac { + apple,fan-mode = "F0md"; + }; +}; + #define T6050_J873S #include "t6050-peripherals.dtsi"