Skip to content

arm64: dts: apple: t8122-j504: describe the MagSafe PD controller - #2392

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

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

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Problem

The MacBook Pro 14 (M3, J504) has a MagSafe 3 port. Its USB PD controller (hpm5, a cd321x) is on i2c0 with the two USB-C controllers, but t8122-j504.dts and t8122-usbpd-i2c.dtsi only describe hpm0 and hpm1. Without the node, Linux does not see the MagSafe port or its power supply.

Change

  • t8122-j504.dts: add hpm5: usb-pd@3a on i2c0, apple,cd321x, no connector. This is the same shape as the MagSafe node on T600x J314/J316 and T8112 J413/J415. The bus, address and interrupt line come from the board's ADT. The interrupt is AP GPIO 11, level low, which hpm0 and hpm1 already share.
  • J504 is the only T8122 board with a MagSafe controller on i2c, so the node goes in the board file and not in the shared t8122-usbpd-i2c.dtsi (also used by J433/J434, which have no MagSafe).
  • J613/J615 already describe their MagSafe controller (SPMI apple,sn201202x, hpm5 at 0x8) in t8122-usbpd-spmi.dtsi. No change there.
  • The tipd driver accepts a cd321x without a connector child, with no board list. This is the same path the T600x and T8112 MagSafe nodes use.

Testing

Still to run

  • J504 (owner: freber or scottjones): plug in a MagSafe charger. A new /sys/class/typec/portN appears for hpm5, and its /sys/class/power_supply/*/online reads 1. Unplug it: online reads 0. dmesg | grep -i tipd shows no probe or IRQ errors, and hpm0/hpm1 still work as before (both share IRQ 11).
  • J615 (BRINGUP-J615 lane, no DT change here): run the same MagSafe plug/unplug check against the existing SPMI hpm5 node, to confirm parity.
  • No loader or other PR dependency.
Per-board values and DTB diffs

Values from each board's ADT:

Board hpm5 bus address interrupt DT
J504 i2c0 0x3a AP GPIO 11, level low (shared with hpm0/hpm1) added here
J613 SPMI nub 0x8 nub IRQs 63/69/71 already in t8122-usbpd-spmi.dtsi
J615 SPMI nub 0x8 nub IRQs 63/69/71 already in t8122-usbpd-spmi.dtsi
J433/J434 none - - unchanged

t8122-j504 decompiled DTB diff:

+			usb-pd@3a {
+				compatible = "apple,cd321x";
+				interrupt-names = "irq";
+				interrupt-parent = <0x13>;
+				interrupts = <0x0b 0x08>;
+				reg = <0x3a>;
+			};

IDENTICAL-DTB: t8122-j433, t8122-j434, t8122-j613, t8122-j613-25g83, t8122-j615, t8122-j615-25g83.

Assisted-by: LLM (Claude:Opus 5.5)

The MacBook Pro 14 (M3, J504) charges over a MagSafe 3 port whose
cd321x USB PD controller (hpm5) sits on i2c0 next to the two USB-C
controllers, but the board DT only described hpm0 and hpm1.

Add hpm5 at 0x3a on i2c0 without a connector, the same shape as the
MagSafe node on the T600x J314/J316 and T8112 J413/J415. The bus,
address and interrupt line (AP GPIO 11, shared with hpm0 and hpm1)
come from the board's ADT.

The J613 and J615 already describe their MagSafe controller in
t8122-usbpd-spmi.dtsi; the J433 and J434 have no MagSafe port. Their
DTBs are unchanged.

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