Skip to content

iommu: apple-dart: preserve J613 MTP bypass for live RTKit adoption - #328

Closed
satchlj wants to merge 2 commits into
omacom:integration/aurorafrom
satchlj:j613-mtp-live-handoff-20261102
Closed

satchlj wants to merge 2 commits into
omacom:integration/aurorafrom
satchlj:j613-mtp-live-handoff-20261102

Conversation

@satchlj

@satchlj satchlj commented Nov 2, 2026

Copy link
Copy Markdown

The existing mtp-live-v1 RTKit adoption path needs the loader's DMA context to stay valid. Resetting J613's MTP DART at probe destroys it.

  • Admit the live bypass handoff only on J613's T8122 MTP DART at 0x2fa808000, for exactly stream 1, with bypass support and matching register readback.
  • Keep that context in an identity domain; reject paging and blocked-domain attachment; retain clocks and bypass at removal.
  • Runtime suspend returns EBUSY while the firmware session is live.

No helper-match change is needed, since the upstream T8122 DT already includes the generic ASC4 fallback. This uses the existing RTKit adoption path and doesn't add a buffer-inventory importer.

Testing: on J613 (M3 MacBook Air, T8122, firmware 26.6.2), on 2026-11-01, with the equivalent pre-rebase change and the matching U-Boot (aurora-silicon/u-boot#30): Linux adopted the running RTKit session without INIT, registered the Apple MTP keyboard and multi-touch devices, and typing and trackpad input worked. The rebase onto 4fdd0fc passes an LLVM 18 W=1 compile of apple-dart.o; the exact rebased kernel hasn't been booted yet, so this stays a draft until it has. DMA stays in bypass; isolation and suspend/resume aren't covered.

Keep the boot loader DMA context for a running J613 MTP session. Admit
only the T8122 MTP DART at 0x2fa808000, exactly stream 1, and verify
that its control register still selects bypass before skipping reset.

Select an identity domain and reject paging, blocked-domain attachment
and runtime suspend while the inherited session runs. Retain the clock
and bypass state at removal. This permits the existing mtp-live-v1 RTKit
adoption path to keep serving input without another INIT.

The C-diag11 implementation passed owner input testing on J613 with
firmware 26.6.2. The rebased series requires a separate owner boot test.

Signed-off-by: Satya Benson <satya@benson.earth>
The J613 and J615 25G83 device trees list the MTP as "apple,t8122-mtp",
"apple,t8122-rtk-helper-asc4", "apple,mtp" without the generic
"apple,rtk-helper-asc4" fallback, and say that Linux binds the
SoC-specific compatible. The helper only matches the generic one, so on
those boards it never probes, DockChannel HID defers forever and the
built-in keyboard and trackpad stay absent.

Match "apple,t8122-rtk-helper-asc4" as well.

Signed-off-by: Satya Benson <satya@benson.earth>
@satchlj

satchlj commented Nov 2, 2026

Copy link
Copy Markdown
Author

Hardware result for this PR together with aurora-silicon/u-boot#30, MacBook Air M3 (J613), firmware 26.6.2, 2026-11-02:

Booted U-Boot from #30 (3c3b759b772, plus the NVMe fix from u-boot#26 so it can boot this firmware) and this branch at cbfdfdb77db2 on integration/aurora 4fdd0fc5, with the T8122 GPU series (#301–#307) as a test-only layer for graphics.

  • U-Boot kept the MTP session running; the device tree carried apple,rtkit-handoff = "mtp-live-v1" and the buffer reservations.
  • The helper did not bind on its own: the J613 25G83 DT lists the MTP without the generic apple,rtk-helper-asc4 compatible, and the helper only matched that one. So DockChannel HID deferred and there was no built-in keyboard.
  • Binding the helper by hand (driver_override) then gave rtkit-helper 2fa400000.mtp: adopted the running RTKit session. The Apple MTP keyboard and multi-touch devices registered, and physical typing (28 key events) and trackpad use (~3,600 motion events) worked. GPU render job completed, glmark2 1191, no RTKit crash or DART faults.

I've added 5392f2cfc083 "soc: apple: rtkit-helper: match the T8122 helper compatible" to this PR so the helper binds without a manual step. That commit hasn't been booted as a binary yet; the manual bind exercised the same probe path. It stays a draft until a boot with that commit confirms it.

Written by Claude on @satchlj's behalf.

@satchlj

satchlj commented Nov 2, 2026

Copy link
Copy Markdown
Author

Hardware qualification on MacBook Air M3 (J613), firmware 26.6.2, 2026-11-02, with U-Boot from aurora-silicon/u-boot#30:

  • With this PR's two commits (cbfdfdb77db2, 5392f2cfc083), the helper now binds on its own via apple,t8122-rtk-helper-asc4, with no manual step. It logged rtkit-helper 2fa400000.mtp: adopted the running RTKit session on three separate boots, and DockChannel HID registered the Apple MTP keyboard and multi-touch devices.
  • The built-in keyboard also worked in U-Boot and Limine before Linux started, and typing and trackpad input worked in Linux. No RTKit crash, no DART faults.

These boots were on test kernels that also carry other in-progress J613 work (the GPU series #301–#307 and draft external-display changes); none of it touches the files in this PR.

Marking ready for review. DMA stays in bypass for the inherited session; isolation and suspend/resume aren't covered by this testing.

Written by Claude on @satchlj's behalf.

@satchlj

satchlj commented Nov 11, 2026

Copy link
Copy Markdown
Author

Claude Fable 5.2 on @satchlj's behalf

Closing in favour of aurora-silicon/linux#971, where this change is now maintained against aurora-silicon/linux integration/aurora (still open there).

@satchlj satchlj closed this Nov 11, 2026
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