Repository navigation
arm64: dts: apple: t6050: fans on J775c/J873s, shared MagSafe 3 PD and keyboard backlight - #2397
RyanTheTide wants to merge 5 commits into
Conversation
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]>
|
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.
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]>
…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]>
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
t6050-j775-hwmon.dtsi, shared by both Mac Studios: the J775d's SMC keys, moved as they are. That is DC input power (PD0R),hwmon-fan-dual.dtsi, and the T6050 fan mode keys F0md/F1md. J775c and J775d include it. The J775d DTB is byte-identical.hwmon-common.dtsi+hwmon-mini.dtsi(one fan), as on J773s and J773g. The shared temperature nodes (TH0x, TW0P) are deleted so thatapple,discover-temperaturesstill runs. J714s and J716s do the same. The fan mode key is F0md, as on J714s, J716s, K116s and J775d.drivers/hwmon/macsmc-hwmon.chas no SoC or board gate on fans. A missing optional fan key only drops that attribute, and a missing sensor key only drops its channel (dev_dbg). The open driver PRs hwmon: macsmc: Select sensor keys by key metadata, not by SoC #2353, hwmon: macsmc: SMC key inventory and sensor key checks on every SoC #2304, hwmon: macsmc: Drop the fan_control module parameter #2354 and hwmon: macsmc: retain fan ownership until automatic mode is restored #2209 do not add a gate either.Testing
Still to run
sensorsshows "Fan 1" and "Fan 2" with non-zero RPM and "DC Input Power".cat /sys/class/hwmon/hwmon*/fan*_inputgives two non-zero values.dmesg | grep -i macsmcshows no "optional keys not found" line and no SMC errors.sensorsshows "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_inputgives 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.sensorsshows 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:
J873s, added under /soc/smc/hwmon:
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
t6050-magsafe.dtsiwith thehpm5: usb-pd@8node (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.&hpm5 { status = "disabled"; }int6050-j716c-sleep.dtsi.t6050-j716c-sleep-devices.dtsistill enables it and addsapple,sleep-ssps.t6050-k114-k116-usb.dtsican include this file for all four K boards.The node was first written by DjDeveloperr (J714s), Joshua Warren (K114c) and Erik Bourget (J716c).
Testing
usb-pd@8underspmi@28a188000and nothing else.port0reg-name that this change does not touch. J716s has 0.t6050-k114c.dts. To resolve it, keep arm64: dts: apple: t6050: share the K boards' N1 and USB-C ports, add K114s and K116c #2280's side, drop the hpm5 node from its&nub_spmi_a0block, and keep the include.Still to run
/sys/class/typec/portNappears, its power supply showsonline= 1, and dmesg has no tipd errors forusb-pd@8. Unplug it andonlinegoes to 0.online.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:
nub-spmi-a0 children after: J714c
usb-pd@8 usb-pd@a, J716susb-pd@a usb-pd@8. J714s, J716c and K114c are unchanged.#2282 original description
Problem
The J716c has no keyboard backlight.
t6050-j716c.dtsleaves 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
t6050-kbd-backlight.dtsi: the pwm-leds node (pwms = <&fpwm0 0 40000>, labelkbd_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 existingapple::kbd_backlightlabel and dropsdefault-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
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.Still to run
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:
All other boards: byte-identical DTB.