Skip to content

arm64: dts: apple: t8132-j715: hand the MTP over as a halted consumer - #2745

Open
kazuhidet wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
kazuhidet:j715/dts-mtp-halted-handoff
Open

kazuhidet wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
kazuhidet:j715/dts-mtp-halted-handoff

Conversation

@kazuhidet

@kazuhidet kazuhidet commented Nov 21, 2026 •

Copy link
Copy Markdown

On a J715 (15-inch M4 Air) booted stage 1 → aura → Linux, the MTP is stopped when Linux takes over, as on the J604. This mirrors t8132-j604.dts:

  • /chosen: linux-enablement-mac,dapf-halted-handoff = "/arm-io/mtp", so aura programs dart-mtp's filter as for a halted consumer;
  • &mtp_dart: apple,remap-streams = <1 0>, <2 0>, <3 0>;
  • &mtp and &mtp_hid: iommus = <&mtp_dart 0>.

Without it, the MTP firmware's first access faults ("CTE invalid") and the keyboard and trackpad stay dead.

Tested on a J715, OS firmware 26.6.2, aura main 58e712b9 with aurora-silicon/aura#429 (the T8132 board list dropped from dapf_init_fdt()):

  • MTP cold-started by Linux ("MTP Says Hello", AppleMTPFirmwareMac-5340.61.4), no DART faults;
  • "Apple MTP keyboard" and "Apple MTP multi-touch" work;
  • the AOP microphones, the display, the GPU and the speakers come up as before.

This replaces the board exception proposed in aurora-silicon/aura#430. J715 report: #2663.

Merge order: this needs aurora-silicon/aura#429 in the shipped aura, and the two should land together. With aura main alone, the board list skips the J715, and the MTP faults as it does today. That is not a regression.

Kernel and regression counts. The kernel is the J715's everyday build, 7.3.0-j715-aurora+. It is integration/aurora 0abc2f3 with local J715 bring-up changes in four files (EFI earlycon, the Apple DRM driver, the GPU hw.rs, the AIC driver), none of them in this PR. The DTB is this PR's tree. Counts from the three recorded boots (direct, through U-Boot with aurora-silicon/u-boot#69's fix, and through unpatched U-Boot):

  • SELinux denials: not applicable, since this Arch-based install has no SELinux.
  • Failed units: 2 in every boot, the same two in each: j713-owner-assets.service and m4-j715-backlight.service. Both are local services of this install (speaker filter assets and a backlight guard) and fail the same way without this change.
  • Kernel errors at err or above:
    • In every boot: avd ... probe with driver avd failed with error -2 (no AVD firmware).
    • In the direct and fixed U-Boot boots: hid-generic ... device has no listeners.
    • In the direct boot: apple-dcp ... external DCP not handed over.
    • New with this tree: none. The only MTP errors are in the unpatched U-Boot boot (the second-start crash).

@RyanTheTide

Copy link
Copy Markdown
Contributor

The DT side matches t8132-j604.dts and aurora-silicon/aura#429: the J715 gets dapf-handoff from t8132-laptop.dtsi, the new dapf-halted-handoff names only the MTP, and the loader still checks that the MTP CPU is actually stopped before it programs the halted filter. No board list is left on either side. Two small points:

  • t8132-j715.dts:23-28 and :84-97: the halted handoff is checked at runtime by the loader (asc_cpu_running()), but the stream 0 remap and iommus = <&mtp_dart 0> are fixed in the tree. If a J715 boots with the MTP left running (a different iBoot or OS firmware, or U-Boot in the chain, which the comment itself names as the condition), the loader skips the filter and Linux still expects the MTP on stream 0, where the J713 hands a running MTP over on stream 1. Could you say in the commit message what that boot does, or confirm that it cannot happen on 26.x/27.x firmware? The same question applies to the J604.
  • Merge order: this needs aura#429 in the shipped aura. With aura main the J715 is skipped by the board list and the MTP still faults. That is not a regression, but it is worth stating in the PR body so the two land together.

Assisted-by: LLM (Claude:Opus 5.5)

@kazuhidet

Copy link
Copy Markdown
Author

Thanks for the review.

A J715 booted with the MTP left running. What I can say today, from source and from this unit:

  • Without U-Boot (stage 1 → aura → Linux, OS firmware 26.6.2): the MTP is halted when the loader checks it. A trace of cpu_control read 0x0 at Linux's first start, and the loader programmed the halted filter.
  • With U-Boot in the chain: aura still runs before U-Boot, so it sees the MTP as iBoot left it, halted, and programs the halted filter. U-Boot's MTP keyboard then boots the MTP itself (drivers/input/apple_mtp_kbd.c, arch/arm/mach-apple/rtkit_helper.c on aurora-silicon/u-boot main). Before Linux, rtkit_helper_remove() shuts RTKit down and clears CPU_CTRL RUN. Only the T8140 (apple,rtkit-handoff) leaves the MTP running for the OS. So on T8132, Linux should again get a halted MTP on stream 0. That is from reading the source; I haven't booted the J715 through U-Boot yet.
  • I'm preparing that boot (aura with arm64: keep J713 GPU/DCP non-coherent when CLIDR_EL1.LoC == 0 (fixes J713 graphics on 7.3) #429, U-Boot, this tree) and will post the dapf log, U-Boot's MTP shutdown, the MTP cold start and any DART faults here.
  • Other firmware: I can't test 26.x/27.x firmware other than 26.6.2 on this unit, so I won't claim the other cases. If iBoot itself ever hands over a running MTP, the loader skips the halted filter and Linux would expect the MTP on stream 0 while the running firmware uses stream 1. That would be the J713 case, and the tree would need the J713 layout. I'll say that in the commit message once the U-Boot boot is done.

Merge order: added to the description. This needs aurora-silicon/aura#429 in the shipped aura; with aura main alone, the J715 keeps its current MTP fault.

@kazuhidet

Copy link
Copy Markdown
Author

The J715 boot through U-Boot is done. It corrects one point of my earlier reply.

Setup. J715, OS firmware 26.6.2, stage 1 → aura → U-Boot → Linux:

Two boots, differing only by one line in U-Boot. U-Boot was kept off NVMe, and the kernel came from the boot.bin (details in the U-Boot PR).

aurora-wip as is + apple,j715 in the MTP keyboard skip list
U-Boot starts the MTP for its keyboard (CPU_CTRL RUN set), stops it at OS entry leaves the MTP alone
What Linux gets the MTP halted, on stream 0 the MTP halted, on stream 0
Linux RTKit: co-processor has crashed 0.3 ms after init, the same data abort as the J604 in aurora-silicon/u-boot#44; no keyboard or trackpad "MTP Says Hello"; keyboard and trackpad work
DART faults none in the record none

Correction. I wrote that with U-Boot in the chain "Linux should again get a halted MTP on stream 0". That part holds: the loader's halted filter and this tree's stream 0 layout were fine in both boots, with no DART faults. But a halted MTP is not a fresh one. The MTP firmware does not survive a second start, exactly as on the J604 (aurora-silicon/u-boot#44), so a U-Boot that runs it first breaks the keyboard and trackpad.

The fix belongs in U-Boot, the same one-line change as u-boot#44: aurora-silicon/u-boot#69. With it, this tree works through U-Boot as it does without.

The running-MTP case you asked about is still untested. This tree assumes a halted MTP. A boot that hands it over running would need the J713's stream 1 layout. That can't come from stage 1 → aura → Linux on 26.6.2, nor from U-Boot with the fix above. It would come from iBoot on other firmware, or from a U-Boot live handoff such as aurora-silicon/u-boot#57.

I've added this to the commit message and force-pushed it (message only, no code change).

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for the U-Boot row and the correction. 8b51ad4 has the same tree as before (message only), so our earlier read stands. The keyboard loss is the U-Boot side's to fix (aurora-silicon/u-boot#69). I suggested there that it key on this tree's halted-handoff property rather than adding the J715 to a board list, so this PR and that one line up without another table entry.

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adversarial review at head 8b51ad43a3d7b9154e2ebd1676a828eb25f37ec0 against pre-pr-checklist.md: Request changes — the devicetree change itself is clean and matches t8132-j604.dts, but there is a §6 naming violation in both the DTS comment and the commit message, and CI has not yet run.

Blocker

  1. §6 Naming (hard rule — arch/arm64/boot/dts/apple/t8132-j715.dts:24 & commit message):
    • pre-pr-checklist.md §6 requires Aurora paths and names, not Asahi or m1n1.
    • Both the new comment in arch/arm64/boot/dts/apple/t8132-j715.dts:24 and the commit message of 8b51ad43 write m1n1 stage 1 -> aura -> Linux. (The PR description already uses stage 1 -> aura -> Linux, and t8132-j604.dts has no m1n1 reference.)
    • Please drop m1n1 from both the DTS comment and commit message (e.g., stage 1 -> aura -> Linux or aura stage 1 -> stage 2 -> Linux).

Technical, Policy & §5 Check

  • DT correctness & §1 / §2 / §3: Matches t8132-j604.dts (chosen/linux-enablement-mac,dapf-halted-handoff = "/arm-io/mtp", &mtp_dart apple,remap-streams = <1 0>, <2 0>, <3 0>, &mtp and &mtp_hid iommus = <&mtp_dart 0>). Default cmdline, board-scoped DT only, and pairs with aurora-silicon/aura#429 (which removes the board list in aura). The U-Boot second-start crash (aurora-silicon/u-boot#69), running-MTP caveat, and aura#429 merge order are clearly documented.
  • §4 Attribution: Clean — human author/committer (Kazuhide Takahashi) and Signed-off-by: only.
  • CI (needs run): Both fork workflow runs (Host tests, Device tree checks) on 8b51ad43 are currently action_required awaiting maintainer approval; please ensure Device tree checks / Host tests run green after the naming update.
  • §5 Evidence (minor completeness): The direct and U-Boot J715 hardware rows confirm MTP cold-start, keyboard/trackpad, audio/display/GPU, and 0 DART faults; please also include the kernel build/version and the standard §5 regression counts (0 SELinux denials, 0 failed units, 0 new kernel errors) in the PR description.

Assisted-by: LLM (Gemini 4 Neon)

kazuhidet added a commit to kazuhidet/u-boot that referenced this pull request Nov 22, 2026
When the device tree names the MTP (/arm-io/mtp) in /chosen
linux-enablement-mac,dapf-halted-handoff, the earlier stage hands it to
the OS halted and Linux cold-starts it. U-Boot's MTP keyboard probe
starts it first and stops it again at OS entry, and the firmware does
not survive the second start: on the J715 (MacBook Air 15-inch, M4),
Linux's RTKit init is followed 0.3 ms later by "co-processor has
crashed", the same data abort as on the J604, and the internal keyboard
and trackpad are gone.

Refuse the keyboard whenever the tree says so, instead of listing
boards. The J604's tree has the property, so its entry goes; the J715's
gets it from aurora-silicon/linux#2745. The J813 and T6050 keep theirs,
since their trees don't name the MTP there. U-Boot then has no internal
keyboard on these boards, and Linux gets a firmware nobody ran.

Tested on a J715 (OS firmware 26.6.2) with the #2745 tree: with
aurora-wip as is, the MTP crashes in Linux; with this change, "MTP Says
Hello" and the keyboard and trackpad work.

Signed-off-by: Kazuhide Takahashi <kazuhide.t@linux-powered.com>
Without U-Boot (stage 1 -> aura -> Linux), nothing keeps the
J715's MTP running, so Linux cold-starts it. As on the J604, name
/arm-io/mtp in linux-enablement-mac,dapf-halted-handoff so the loader
programs its DART filter as for a halted consumer, and put the MTP and
its HID on DART stream 0 (streams 1 to 3 remapped to 0) instead of the
stream 1 the J713's running MTP is handed over on.

Before this, the MTP firmware's first access faulted with "CTE invalid"
and the keyboard and trackpad never came up.

With U-Boot in the chain, U-Boot has to leave the MTP alone, as on the
J604: if it starts the MTP for its keyboard, it stops it again before
Linux, and the firmware crashes on Linux's second start. Linux still
finds it halted on stream 0. A boot that hands the MTP over running, as
the J713 does, would need the J713's stream 1 layout instead. Neither
stage 1 -> aura -> Linux on 26.6.2 nor U-Boot with the J715 in its
keyboard skip list does that, and it has not been tested.

Tested on a J715 with OS firmware 26.6.2 and aura main plus
aurora-silicon/aura#429: the MTP says hello, and the keyboard and
trackpad work, with no DART faults. Through U-Boot aurora-wip with the
J715 in that skip list: the same. Through U-Boot aurora-wip as is: the
MTP firmware crashes as on the J604.

Signed-off-by: Kazuhide Takahashi <kazuhide.t@linux-powered.com>
@kazuhidet
kazuhidet force-pushed the j715/dts-mtp-halted-handoff branch from 8b51ad4 to 0388405 Compare November 22, 2026 11:09
@kazuhidet

Copy link
Copy Markdown
Author

Thanks for the review.

  • §6: m1n1 is gone from the DTS comment and the commit message (stage 1 -> aura -> Linux). The change is in a comment only, and the DTB is byte-identical.

  • §5: I've added the kernel version and the counts to the description. They aren't all zero:

    • This install has no SELinux.
    • Two local services fail in every boot, with or without this change.
    • The kernel errors are the same set as without this tree.

    I've listed them as they are rather than rounding them to zero.

  • CI: waiting for a maintainer to approve the fork runs on the new head.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Re-checked at 0388405. Against 8b51ad4 the only change is the one DTS comment line, and the commit message no longer mentions m1n1, so the DTB is the one I reviewed. Thanks for listing the counts as they are.

One question about the test kernel. The rows ran on integration/aurora 0abc2f3 plus local J715 changes in four files, one of them the AIC driver. The MTP cold start and the keyboard depend on its interrupts, so could you say what the local AIC change does, and whether the MTP comes up the same without it? If the J715 needs any of those four changes to boot from integration/aurora, a link to where they are going would help. That way the row can be repeated on a plain tree once they land.

Assisted-by: LLM (Claude:Opus 5.5)

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.

3 participants