Skip to content

arm64: dts: apple: t8122-j504: MagSafe PD controller and Touch ID sensor - #2392

Draft
RyanTheTide wants to merge 3 commits into
mainfrom
dtfill-power/hpm5-j504
Draft

RyanTheTide wants to merge 3 commits into
mainfrom
dtfill-power/hpm5-j504

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

What: arm64: dts: apple: t8122-j504: MagSafe PD controller and Touch ID sensor. 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 · iMac M3 (J504)

Not yet: a J504 boot row on this head (no J504 in the lab).

#2392 original description

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.

#2268 original description

Problem. The 14-inch M3 MacBook Pro (J504) has the Touch ID sensor on SPI2, like the M3 MacBook Airs, but its DT never enabled it.

Change. Enable SPI2 and the sensor in t8122-j504.dts, with this board's sensor power enable (AP GPIO 200 per its ADT, where the Airs use nub GPIO 29) and the Airs' chip-select timing. Name the board's calibration file, and add the sep alias so the loader reserves the SEP firmware as it does on the Airs. The chip select, the 8 MHz clock and the polled data-ready line are the same as on the Airs.

The SEP driver's Touch ID admission currently lists J613/J615 by board (drivers/soc/apple/profile.rs). The SoC-based profile selection in flight replaces that list; until it lands the sensor binds but matching stays off.

Testing. cpp + dtc on every T8122 board: same warning counts. Only the J504 DTB changes.

Still to run. On a J504: the sensor probes, and Touch ID enroll and match work once the SoC-based SEP profile lands.

RyanTheTide and others added 2 commits November 19, 2026 22:48
The 14-inch M3 MacBook Pro has the Touch ID sensor (mesa) on SPI2 like the
M3 MacBook Airs. The only difference in its wiring is the sensor power
enable: an AP GPIO (200) here instead of the Airs' nub GPIO 29. The
chip select, the 8 MHz clock and the data-ready line (AP GPIO 199, left
out as on the Airs so the driver polls) are the same.

Enable SPI2 and the sensor with this board's power GPIO and the Airs' chip
select delays. Name this board's calibration file, and add the sep alias
so the boot loader reserves the SEP firmware as it does on the Airs.

Signed-off-by: Ryan <ryan@aurorasilicon.org>
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>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Looks good; approve once the J504 MagSafe row is in. It does not block the merge: the change is DT-only and adds one inert node.

I checked the node against the other cd321x MagSafe nodes (t600x-j314-j316.dtsi:438, T8112 J413/J415): the same shape and no connector. IRQ 11 level-low is shared with hpm0/hpm1 (t8122-usbpd-i2c.dtsi:21,58), and tipd requests its IRQ with IRQF_SHARED (drivers/usb/typec/tipd/core.c:4177-4179 on integration/aurora), so a third sharer is fine. I built all 7 T8122 DTBs from this PR merged onto the current integration/aurora: only t8122-j504 changes, and the other 6 are byte-identical to the base. dt-checks and host-tests pass.

HW row: J504 on this head: probe with no tipd errors. MagSafe plugged gives a new /sys/class/typec/portN and its tps6598x-source-psy online=1, and unplugged gives online=0. hpm0/hpm1 still enumerate and still deliver a USB-C plug event on the shared IRQ 11. Plus 0 AVC, 0 failed units and 0 new kernel errors.

Assisted-by: LLM (Claude:Opus 5.5)

…ch ID sensor

Folds #2268 into this PR unchanged.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide RyanTheTide changed the title arm64: dts: apple: t8122-j504: describe the MagSafe PD controller arm64: dts: apple: t8122-j504: MagSafe PD controller and Touch ID sensor Nov 25, 2026

This branch has not been deployed

No deployments
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