Repository navigation
arm64: dts: apple: t8142: Share the MagSafe 3 PD controller with J704 and J813 (on #1907) - #2401
RyanTheTide wants to merge 4 commits into
Conversation
hpm5 on nub-spmi-a0 (SID 8) is the MagSafe 3 port's PD controller (ADT
port-type 0x11). It has no USB data path, so it gets no connector node;
tipd registers a Type-C port and a power supply for it, as on J714s. The
bus is polled on T8142, so like hpm0 and hpm1 it has no interrupts. Its
ADT features-supported is <3> ("Power In" only), so it is marked
apple,no-liquid-detection.
Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
… and J813 The J704 (MacBook Pro 14-inch, M5) and J813 (MacBook Air 13-inch, M5) have the same MagSafe 3 PD controller as the J815: each board's ADT has hpm5 on nub-spmi-a0, SID 8, port-type 0x11, features-supported <3>, with the same values on all three boards. Move the J815's hpm5 node into a new t8142-magsafe.dtsi and include it at the end of t8142-j813-usb.dtsi (J813, J815) and t8142-j704-usb.dtsi (J704), after nub_spmi_a0 is defined. The node itself is unchanged. The J815 DTB is byte-identical to the one before this change. The J704 and J813 DTBs gain only the usb-pd@8 node under nub-spmi-a0. The node was written by Nick for the J815. Suggested-by: Nick <nekreshen@yandex.ru> Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
J813 (MacBook Air 13" M5), macOS 27.2 stub, with #2401 on #2135's merged head:
🤖 Generated with Claude Code |
|
Blockers: 2.
The node values are the same on all three boards per the ADT table, and including the file after HW row: needed on the rebased head. The J813 row above was on a different kernel (#2135's head), with deep sleep only and no s2idle. Run J813 and J704: MagSafe plug/unplug ( Assisted-by: LLM (Claude:Opus 5.5) |
|
Status check against integration/aurora 4a17f73: #1907 has merged (85e255d), so the J815 half of this branch is on the tip, in its reviewed form with |
#1907 has landed on main in its reviewed form: the J815's hpm5 in t8142-j815.dts with apple,sleep-ssps and apple,sleep-ssps-rules. This branch still carried the pre-review copy of that commit, so the merge was textually clean but left two hpm5 nodes (and labels) on the J815. Resolve it the way the branch meant: the J815 board file no longer defines hpm5; t8142-magsafe.dtsi (included from the J704 and J813 USB files) does, and the sleep properties stay the board's: the J815 sets both on &hpm5 where its node was, and the J813, whose hpm0/hpm1 follow the same rules, sets them too. The J704's hpm0/hpm1 have no sleep properties, so neither does its hpm5. The J815 DTB is byte-identical to main's; the J704 and J813 gain only usb-pd@8 under nub-spmi-a0 (the J813's with the two sleep properties). Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Updated: merged main @f02bd68a08cb (bf71be2) and fixed the stale-#1907 problem from the review in the merge.
Still needed (queued in HWROWS): a J813 row on this head including s2idle cycles (no M5 Air in the lab). |
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
Problem
The J813 (MacBook Air 13-inch, M5) and J704 (MacBook Pro 14-inch, M5) have no node for the MagSafe 3 PD controller, so tipd registers no Type-C port and no power supply for MagSafe on them. #1907 adds this node for the J815 only.
Change
This branch is based on #1907 and keeps its commit as is. On top of it, one commit moves the J815's hpm5 node, unchanged, into a new
t8142-magsafe.dtsi. That file is included at the end oft8142-j813-usb.dtsi(J813, J815) andt8142-j704-usb.dtsi(J704), afternub_spmi_a0is defined.Each board's ADT has hpm5 with the same values: nub-spmi-a0, SID 8, port-type 0x11, features-supported <3> (power in only), and the same interrupt numbers as on the J815. The bus is polled on T8142, so there are no interrupts in the node, as for hpm0 and hpm1. The public J813 ADT shows the same values.
The node was written by Nick (m0d16l14n1) in #1907. This should merge after #1907, or #1907 can be closed in favour of this one.
Testing
usb-pd@8underspmi@388908000. dtc warnings are the same as before.t8142-j813-usb.dtsiort8142-j704-usb.dtsi. The only edit tot8142-j815.dtsis removing the block that arm64: dts: apple: t8142-j815: MagSafe 3 PD controller #1907 added at the end of the file.Still to run
/sys/class/typec/portNappears with a partner, andtps6598x-source-psy-1-08showsonline= 1. Unplug it andonlinegoes to 0. Thenecho s2idle > /sys/power/mem_sleep; rtcwake -m mem -s 20three times with MagSafe plugged in: no tipd or1-08errors indmesg, andonlineis still 1 after each wake.Per-board values and DTB diffs
Values from each board's ADT (hpm5):
The J704 also has hpm3 on nub-spmi-a1 (a USB-C port, already described). It does not affect hpm5.
The decompiled DTB diff is the same on J704 and J813 (J815: none compared with #1907):
Driver notes (no change in this PR):
drivers/usb/typec/tipd/gates hpm5 by board.apple,no-liquid-detectionis read inspmi.c.tipd_sleep_ssps_rules()incore.clists J714s, J716c, J813 and J815, but not J704. It only matters withapple,sleep-ssps, which this node does not set. On the J813 only hpm0 and hpm1 have it, int8142-j813-j815-sleep.dtsi.