Skip to content

arm64: dts: apple: t6050: share the MagSafe 3 PD controller, add it to J714c and J716s - #2400

Draft
RyanTheTide wants to merge 1 commit into
integration/aurorafrom
dtfill-power/hpm5-t6050
Draft

RyanTheTide wants to merge 1 commit into
integration/aurorafrom
dtfill-power/hpm5-t6050

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

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.

Assisted-by: LLM (Claude:Opus 5.5)

…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 <ryan@aurorasilicon.org>
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