Skip to content

arm64: dts: apple: t6050: fans on J775c/J873s, shared MagSafe 3 PD and keyboard backlight - #2397

Draft
RyanTheTide wants to merge 5 commits into
mainfrom
dtfill-power/fans-t6050-desktop
Draft

RyanTheTide wants to merge 5 commits into
mainfrom
dtfill-power/fans-t6050-desktop

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

What: arm64: dts: apple: t6050: fans on J775c/J873s, shared MagSafe 3 PD and keyboard backlight. This PR now carries these drafts as one feature (merge commits, the commits themselves unchanged):

Tested: each part as tested on its own PR (folded bodies below; no hardware row on this head yet). Combined with current main (ba29027) together with the other folds of 11-25: full arm64 build (Image, modules, dtbs; fleet89 config, clang 22, rustc 1.97.1) clean.

Risk: two-way · M5 Pro/Max Macs (T6050)

Not yet: a boot row per changed T6050 board (J714c/J716c/J716s/J775c/J873s) on this head.

#2397 original description

Problem

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. Neither board shows a fan speed in sensors.

Change

Testing

  • DTB build (cpp + dtc with kbuild flags) for all 11 T6050 boards, before and after: all build, 0 dtc warnings before and after.
  • Byte-identical: J714c, J714s, J716c, J716s, J775d, K114c, K114s, K116c, K116s.
  • Changed: J775c (+2 fan nodes, +PD0R), J873s (+1 fan node, PSTR, PDTR, PMVR, VD0R, ID0R).
  • dt-validate on J775c, J775d, J873s: 0 messages before, 0 after.

Still to run

  • J775c (DjDeveloperr, satchlj): sensors shows "Fan 1" and "Fan 2" with non-zero RPM and "DC Input Power". cat /sys/class/hwmon/hwmon*/fan*_input gives two non-zero values. dmesg | grep -i macsmc shows no "optional keys not found" line and no SMC errors.
  • J873s (no known owner): sensors shows "Fan" with RPM (it may read 0 at idle if the fan is stopped) and the discovered T* keys. cat /sys/class/hwmon/hwmon*/fan1_input gives a value. dmesg has no "optional keys not found" line for F0Ac. Also check whether PSTR/PDTR read 0 here as they do on the Studio. If they do, a later change can drop hwmon-common, as on J775d.
  • J775d (funkzy): regression only. sensors shows both fans and "DC Input Power" as before. The DTB is byte-identical, so no change is expected.

This does not depend on a loader change. It applies on its own and does not overlap the J775d/J873s hunks of #2279, #2277, #2278, #2291 or #1973.

Per-board values and DTB diffs

J775c, added under /soc/smc/hwmon:

fan-F0Ac { apple,key-id = "F0Ac"; label = "Fan 1"; apple,fan-minimum = "F0Mn"; apple,fan-maximum = "F0Mx"; apple,fan-target = "F0Tg"; apple,fan-mode = "F0md"; };
fan-F1Ac { apple,key-id = "F1Ac"; label = "Fan 2"; apple,fan-minimum = "F1Mn"; apple,fan-maximum = "F1Mx"; apple,fan-target = "F1Tg"; apple,fan-mode = "F1md"; };
power-PD0R { apple,key-id = "PD0R"; label = "DC Input Power"; };

J873s, added under /soc/smc/hwmon:

fan-F0Ac { apple,key-id = "F0Ac"; label = "Fan"; apple,fan-minimum = "F0Mn"; apple,fan-maximum = "F0Mx"; apple,fan-target = "F0Tg"; apple,fan-mode = "F0md"; };
power-PSTR "Total System Power", power-PDTR "AC Input Power", power-PMVR "3.8 V Rail Power",
voltage-VD0R "AC Input Voltage", current-ID0R "AC Input Current"

J775d: IDENTICAL-DTB (the hwmon nodes moved from t6050-j775d.dts into t6050-j775-hwmon.dtsi unchanged).

The fan counts come from the hardware (Mac Studio: two fans, Mac mini: one fan) and match the sibling boards on earlier SoCs. Studios J375c/d, J475c/d, J575c/d use hwmon-fan-dual. Minis J274, J473, J474s, J773g, J773s use hwmon-mini.

#2400 original description

Problem

The MagSafe 3 port's PD controller (an SN201202x at SPMI address 0x8 on nub-spmi-a0) is not described on J714c and J716s. J714s, J716c and K114c each describe it in their own file, as three copies of the same node.

Change

  • New t6050-magsafe.dtsi with the hpm5: usb-pd@8 node (compatible, reg, apple,no-liquid-detection). No connector node: the port has no USB data path. tipd registers a Type-C port and a power supply for it, as on J714s.
  • J714s, J716c and K114c: their own node is removed and the file is included where the node was, after hpm1.
  • J716c keeps its one delta: &hpm5 { status = "disabled"; } in t6050-j716c-sleep.dtsi. t6050-j716c-sleep-devices.dtsi still enables it and adds apple,sleep-ssps.
  • J714c and J716s: the file is included. The J716s Type-C comment now points at it.
  • Every 14" and 16" board's ADT has the same hpm5 node (same SID, same port type, same features). So there are no per-board values.
  • Not changed: J775c, J775d and J873s (no MagSafe). K116s gets the node in T6050: firmware-driven deep sleep on the K116s (16-inch M5 Pro, firmware 27.2) #2201. K114s and K116c do not describe nub-spmi-a0 yet. That waits for arm64: dts: apple: t6050: share the K boards' N1 and USB-C ports, add K114s and K116c #2280, and then t6050-k114-k116-usb.dtsi can include this file for all four K boards.

The node was first written by DjDeveloperr (J714s), Joshua Warren (K114c) and Erik Bourget (J716c).

Testing

Still to run

  • J714c (XY55bqg6iAw8ttP): plug MagSafe in. A new /sys/class/typec/portN appears, its power supply shows online = 1, and dmesg has no tipd errors for usb-pd@8. Unplug it and online goes to 0.
  • J716s (rolotrealanis98): the same row.
  • J714s, J716c, K114c regression: the DTB is unchanged. MagSafe plug and unplug still toggle the power supply's online.
  • K116s (axboe): the same row as J714c, on T6050: firmware-driven deep sleep on the K116s (16-inch M5 Pro, firmware 27.2) #2201.
Per-board values and DTB diffs

hpm5 in each board's ADT: nub-spmi-a0, SID 0x8, port-type 0x11, features-supported 3. This is the same on J714c, J714s, J716c, J716s, K114c, K114s, K116c and K116s. J775c and J873s have no such node.

J714c and J716s DTB diff (decompiled, sorted), the same on both:

 			compatible = "apple,t6050-spmi", "apple,t8142-spmi";
 			reg = <0x02 0x8a188000 0x00 0x4000>;
 
+			usb-pd@8 {
+				apple,no-liquid-detection;
+				compatible = "apple,sn201202x";
+				reg = <0x08 0x00>;
+			};
+
 			usb-pd@a {

nub-spmi-a0 children after: J714c usb-pd@8 usb-pd@a, J716s usb-pd@a usb-pd@8. J714s, J716c and K114c are unchanged.

#2282 original description

Problem

The J716c has no keyboard backlight. t6050-j716c.dts leaves fpwm0 disabled and has no pwm-leds node. Its ADT has the same pwm0 kbd-backlight node as the J714s, the J716s and the K114/K116 boards: channel 0 of fpwm0 at 25 kHz.

The J714s and J716s carry identical copies of the LED block. The K boards have their own copy, with a different label.

Change

  • New t6050-kbd-backlight.dtsi: the pwm-leds node (pwms = <&fpwm0 0 40000>, label kbd_backlight, default-state = "keep") and &fpwm0 { status = "okay"; }.
  • t6050-j714s.dts, t6050-j716s.dts: the copy is replaced by the include.
  • t6050-k114-k116.dtsi: includes the file. A small override keeps the existing apple::kbd_backlight label and drops default-state, so the K boards' DTBs do not change. The rear logo LED stays in the same controller.
  • t6050-j716c.dts: includes the file. This is the only functional change.

J714c: #1984 adds the same LED block to t6050-j714c.dts, with the same label, default-state and period. It can rebase onto this PR and use #include "t6050-kbd-backlight.dtsi" instead. This PR does not touch J714c.

Testing

  • Full kernel tree make dtbs CHECK_DTBS=y (dtschema) for every T6050 DTB on this branch: builds clean, no dtc warnings, and no schema message that integration/aurora does not already have.
  • All 11 T6050 DTBs build with no dtc warnings, before and after.
  • J714c, J714s, J716s, J775c, J775d, J873s, K114c, K114s, K116c and K116s DTBs are byte-identical.
  • J716c gains the led-controller node, and its fpwm0 goes to okay (diff below). ps_fpwm0 is already on.
  • dt-validate on J716c: no new messages (14 before, 14 after, all pre-existing opp-table and pcie messages).

Still to run

  • J716c (erikwb): brightnessctl -d kbd_backlight set 50% lights the keys. The level is the same after an s2idle cycle.

No loader change is needed. It does not depend on #2208/#2209. Those touch other nodes in t6050-j716c.dts, so a rebase there is trivial.

Per-board values and DTB diffs

Values come from each board's ADT: pwm0 kbd-backlight, channel 0, 25 kHz, so a 40000 ns period. This is the same on J714c, J714s, J716c, J716s and K116s (checked in each board's ADT) and on the other K boards (already described that way).

J716c, decompiled DTB, phandle renumbering masked:

+	led-controller {
+		compatible = "pwm-leds";
+		led-0 {
+			color = <0x00>;          /* LED_COLOR_ID_WHITE */
+			default-state = "keep";
+			function = "kbd_backlight";
+			label = "kbd_backlight";
+			max-brightness = <0xff>;
+			pwms = <&fpwm0 0x00 0x9c40>;
+		};
+	};
 ...
 pwm@505040000 {
+	phandle = <...>;
-	status = "disabled";
+	status = "okay";
 };

All other boards: byte-identical DTB.

The J716c leaves fpwm0 disabled and has no keyboard backlight LED. Its
ADT has the same pwm0 kbd-backlight node as the J714s, J716s and the
K114/K116 boards: channel 0 of fpwm0 at 25 kHz.

Move the pwm-leds node and the fpwm0 enable, which the J714s and J716s
each carried as an identical copy, into a new t6050-kbd-backlight.dtsi.
Include it from the J714s, J716s, J716c and t6050-k114-k116.dtsi. The
K boards keep their own LED label and no default-state through a small
override, and keep their rear logo LED in the same controller.

The J716c gains the LED and an enabled fpwm0. The J714s, J716s, K114c,
K114s, K116c and K116s DTBs are byte-identical; no other T6050 board
changes. The J714c can take the same include.

The J714s block was added by DjDeveloperr, the J716s one by Rolando
Trevino.

Signed-off-by: Ryan Murray <[email protected]>
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 <[email protected]>
Signed-off-by: Ryan Murray <[email protected]>
…o J714c and J716s

The MagSafe 3 port's PD controller is an SN201202x at SPMI address 0x8 on
nub-spmi-a0. Each 14" and 16" M5 Pro/Max MacBook Pro's ADT has the same
node (port-type 0x11, power in only, no liquid detection). J714s, J716c and
K114c describe it in their own files; J714c and J716s do not.

Move the node to a new t6050-magsafe.dtsi and include it from J714s, J716c,
K114c, J714c and J716s. The include sits after each board's hpm1 node, so
hpm5 stays the last child of nub-spmi-a0. J716c keeps its delta: the node
is disabled in t6050-j716c-sleep.dtsi until the sleep devices enable it.

The J714s, J716c and K114c DTBs are byte-identical. J714c and J716s gain
the usb-pd@8 node. J775c, J775d and J873s have no MagSafe and are
unchanged. K116s is described by its sleep series. K114s and K116c do not
yet describe nub-spmi-a0 and are left for the USB-C series.

The node was first written for the J714s by DjDeveloperr, and for the K114c
by Joshua Warren; J716c's by Erik Bourget.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

No blockers.

I built all 11 T6050 DTBs from this PR merged onto the current integration/aurora. J775d and the eight others are byte-identical to the base. J775c gains only fan-F0Ac/F1Ac (F0md/F1md) and power-PD0R. J873s gains only the hwmon-common power/voltage/current keys and one fan, and TH0x/TW0P are deleted, so apple,discover-temperatures still runs. In drivers/hwmon/macsmc-hwmon.c:1113-1150 (integration/aurora), a key the SMC lacks drops only that attribute. A kernel fan request needs the mode, minimum, maximum and target keys, and its target comes from the SMC's own min/max (:649-661). The new fan nodes add no hardcoded limit. dt-checks and host-tests pass.

  1. Nit, arch/arm64/boot/dts/apple/t6050-j775-hwmon.dtsi:24-25: the moved comment still says "with the dtsi's names fan creation failed on the missing key". Since the optional-key change, the driver drops only the mode attribute. Say that the fan loses its mode key, and so kernel control, with the F0Md/F1Md names.

HW row (not blocking, both boards are DT-inventory only today): J775c and J873s, once booted: sensors shows the fan(s) with RPM, no "optional keys not found" line, J775c "DC Input Power" non-zero. Plus 0 AVC, 0 failed units and 0 new kernel errors.

Assisted-by: LLM (Claude:Opus 5.5)

… PD controller, add it to J714c and J716s

Folds #2400 into this PR unchanged.

Signed-off-by: Ryan Murray <[email protected]>
…backlight, add it to J716c

Folds #2282 into this PR unchanged.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide RyanTheTide changed the title arm64: dts: apple: t6050: describe the fans on J775c and J873s arm64: dts: apple: t6050: fans on J775c/J873s, shared MagSafe 3 PD and keyboard backlight Nov 25, 2026
muness pushed a commit to muness/linux that referenced this pull request Dec 1, 2026
…ight USB4 router

The J716s ADT has the left-back port (hpm0, atc-phy0, usb-drd0, acio0,
acio-cpu0, dart-acio0, apciec0, dart-apciec0) and the right port's
USB4/Thunderbolt router (acio2, acio-cpu2, dart-acio2, apciec2,
dart-apciec2) at the T6050 addresses (adt-coverage/t6050-j716s.txt),
but its device tree described neither: the left-back port was absent and
the right port got USB only.

Enable them as the K boards do. The ATC0 enable overlay is renamed from
t6050-k114-k116-atc0.dtsi to t6050-atc0-enable.dtsi, since it is no
longer K-board only, and gives the J716s the 16-inch RX_TOP value. The
right router takes t6050-max-atc2-router.dtsi, the ATC2 DP tunnel and
the router domains as in t6050-k114-usb.dtsi, with the K114sAP host DROM
(the boot loader replaces it), and the AOP GPIO controller exposes pins
77 and 81.

The shared ATC0 connector label typec2 becomes atc0_typec: the J716s
already calls its right connector typec2. Labels are not in the DTBs,
so only t6050-j716s.dtb changes; every other T6050 DTB is
byte-identical, and CHECK_DTBS reports the same as main.

The left-front router stays with aurora-silicon#3281 and the MagSafe controller with
aurora-silicon#2397.

Signed-off-by: Ryan Murray <[email protected]>

This branch has not been deployed

No deployments
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