Skip to content

arm64: dts: apple: t8132-laptop: describe the MagSafe 3 PD controller - #2395

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

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

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Problem

The M4 MacBook Air 13/15 (J713, J715) and the MacBook Pro 14 M4 (J604) have no node for the MagSafe 3 port's PD controller (hpm5). Charging works through the SMC, but there is no Type-C port and no tps6598x power supply for MagSafe. The J604 file said hpm5 "is not wired".

Change

  • t8132-laptop.dtsi (included by J604, J713 and J715): add hpm5: usb-pd@8 on nub_spmi_a0, compatible apple,t8132-sn201202x, apple,sn201202x, with the event, sleep and wake interrupts, apple,no-liquid-detection and no connector node. Same shape as the J714s hpm5 and the J815 one in arm64: dts: apple: t8142-j815: MagSafe 3 PD controller #1907, with the T8132 interrupt layout of hpm0/hpm1.
  • t8132-j604.dts: the stale comment now points at the shared node.
  • No per-board deltas: the three ADTs give the same values. No wakeup-source for now (hpm0/hpm1 have it); MagSafe plug wake can be added once the port is seen working.

The tipd SPMI driver takes a node without a connector (the role switch and mux lookups get NULL, as on J714s). No board list in the driver excludes T8132 for this node. The sleep lists in core.c (tipd_sleep_ssps_rules) and spmi.c (sn201202x_sleep_board) do not name T8132 boards, the same as for hpm0/hpm1.

Testing

  • DTB build (cpp + dtc, kbuild flags) for all six T8132 boards. J623, J624, J773g: byte-identical DTB. J604, J713, J715: +1 node each, the same 7 lines. dtc warnings unchanged (J713 keeps its 1 existing warning).
  • dt-validate against the in-tree bindings (apple,sn201202x.yaml): 0 new messages on J604, J713, J715.

Still to run

  • J713 (lab Mac): plug MagSafe -> a new /sys/class/typec/portN appears and the hpm5 tps6598x-source-psy-* power supply shows online=1; unplug -> online=0; dmesg | grep -i tps6598x shows no probe errors for usb-pd@8.
  • J604 (owner IronsideXXVI): the same check.
  • J715 (no known owner): the same check.

No loader change is needed.

Per-board values and DTB diffs
Board Bus SID Interrupts (irq, sleep, wake) port-type features-supported
J604 nub-spmi-a0 8 63, 69, 71 0x11 3
J713 nub-spmi-a0 8 63, 69, 71 0x11 3
J715 nub-spmi-a0 8 63, 69, 71 0x11 3

Values come from each board's ADT (27.x), and also match the public live ADTs for J713 and J604.

DTB diff (identical on J604, J713, J715):

+			usb-pd@8 {
+				apple,no-liquid-detection;
+				compatible = "apple,t8132-sn201202x", "apple,sn201202x";
+				interrupt-names = "irq", "sleep", "wake";
+				interrupts = <0x3f 0x01 0x45 0x01 0x47 0x01>;
+				reg = <0x08 0x00>;
+			};

Assisted-by: LLM (Claude:Opus 5.5)

The M4 laptops (J604, J713, J715) have a third SN201202x on nub-spmi-a0
for the MagSafe 3 port (hpm5). It is not described, so there is no
Type-C port and no tps6598x power supply for MagSafe; only the SMC sees
the charger.

Each board's ADT gives the same values: SID 8 on nub-spmi-a0, event,
sleep and wake interrupts 63, 69 and 71 (the order of hpm0's 11, 17,
19), port-type 0x11, and features-supported <3> ("Power In" only). Add
it once to t8132-laptop.dtsi, which all three include, with the T8132
compatible (selection is polled, event/sleep/wake use interrupts), no
connector node (no USB data path) and apple,no-liquid-detection, as the
J714s and the J815 MagSafe nodes do. The J604's comment that said hpm5
is not wired now points at the shared node.

The desktops (J623, J624, J773g) do not include t8132-laptop.dtsi and
build to identical DTBs.

The node follows the J815 MagSafe node by Nick (m0d16l14n1) and the
J714s one.

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