Skip to content

arm: apple: enable J613 keyboard input with a live MTP handoff - #30

Merged
RyanTheTide merged 5 commits into
aurora-wipfrom
j613/mtp-live-handoff
Nov 10, 2026
Merged

RyanTheTide merged 5 commits into
aurora-wipfrom
j613/mtp-live-handoff

Conversation

@satchlj

@satchlj satchlj commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

J613 MTP input works in U-Boot, but restarting the used RTKit session in Linux fails with firmware 26.6.2. Keep the first session running and describe it through the existing mtp-live-v1 handoff.

  • Match the T8122 helper compatible.
  • Enable J613 keyboard announcements and start the keyboard through the existing EFI console setup, so it works in the boot menus.
  • Retain DART bypass, reserve firmware-held DRAM and publish the buffer inventory, keeping OSLog in SRAM.
  • Refuse OS entry if the handoff can't be published or retained.
  • The J713 endpoint restriction isn't applied to J613.

Testing: on J613 (M3 MacBook Air, T8122, firmware 26.6.2), on 2026-11-01, with the equivalent pre-rebase build: U-Boot keyboard input worked, Linux adopted the running RTKit session without INIT, and typing and trackpad input worked in Linux. Earlier attempts that restarted the session (IOP QUIESCED, IOP SLEEP, or fewer endpoints) all failed. This rebase onto d30213e is build-checked; the exact rebased binary hasn't been booted yet, so this stays a draft until it has.

Linux needs the companion DART change, omacom/linux-aurora#328. The upstream T8122 DT already has the generic helper compatible. DMA isolation and suspend/resume aren't covered by this testing.

Accept device trees that describe the T8122 helper without the generic
ASC4 fallback. The helper uses the existing ASC4 transport and SRAM layout.

Signed-off-by: Satya Benson <[email protected]>
Enable J613 interface announcements and retain its first RTKit session
through OS entry. Restarting this firmware epoch after U-Boot input fails.

Use the existing live handoff contract, DRAM reservations and buffer
snapshot API. Keep OSLog in SRAM and the normal system endpoint policy.
Require keyboard readiness and halt if publication or bypass retention
fails rather than entering Linux with a false ownership claim.

The owner confirmed U-Boot input and Linux keyboard and trackpad operation
with the C-diag11 implementation on J613, firmware 26.6.2. This rebased
series still needs an owner boot test.

Signed-off-by: Satya Benson <[email protected]>
Use the existing EFI console setup on J613 so mtpkbd is started and
polled to readiness even with a zero boot delay. The preceding live
handoff support preserves this session for Linux.

Signed-off-by: Satya Benson <[email protected]>
@satchlj

satchlj commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

Hardware qualification on MacBook Air M3 (J613), firmware 26.6.2, 2026-11-02:

  • U-Boot at this PR's head 3c3b759b772, plus the NVMe fix from u-boot#26 (needed to boot this firmware), with Limine's menu set to wait for input: the built-in keyboard worked in the Limine menu. Arrow keys moved the selection and Enter booted.
  • Linux with iommu: apple-dart: preserve J613 MTP bypass for live RTKit adoption omacom/linux-aurora#328 (cbfdfdb77db2 + 5392f2cfc083) adopted the running MTP session U-Boot handed over (rtkit-helper 2fa400000.mtp: adopted the running RTKit session) on three separate boots. The built-in keyboard and trackpad registered automatically, and typing and trackpad input worked. No RTKit crash and no DART faults.

Marking ready for review. DMA isolation and suspend/resume with the retained session are still outside what this testing covers.

Written by Claude on @satchlj's behalf.

@satchlj

satchlj commented Nov 5, 2026 •

Copy link
Copy Markdown
Member Author

@DjDeveloperr @RyanTheTide this one is needed for the J613 built-in keyboard (aurora-silicon/linux#971). It was tested on J613 on 11-02 (keys work in Limine, and Linux adopts the live keyboard session); it conflicts with the current aurora-wip, and I'll push an update shortly.

aurora-wip gained the J614s MTP handoff (#29), which extends the same
J713-only checks this branch extends for J613. Two conflicts:

arch/arm/mach-apple/rtkit_helper.c, rtkit_helper_remove(): keep this
branch's J613 condition next to rtkit_helper_j713_handoff(), which now
also covers J614s, and take aurora-wip's "MTP: refusing OS entry after
DART retention error" message.

drivers/input/apple_mtp_kbd.c, apple_mtp_kbd_probe(): announce INIT
packets for J713, J614s and J613.
The helper and keyboard fixtures copy production functions that now call
rtkit_helper_j613_handoff(), panic() and apple_rtkit_helper_input_ready().
Define them in the fixtures. The J713 publication fixture is not a J613,
the removal fixture also checks that a J613 DART retention error refuses
OS entry, and the keyboard fixture counts the READY notification.

Signed-off-by: Satya Benson <[email protected]>
@satchlj

satchlj commented Nov 6, 2026

Copy link
Copy Markdown
Member Author

J613 result, 2026-11-05: this was the U-Boot in the boot chain for the Aurora 7.3 boot. The keyboard live handoff worked on 7.3 too.

A separate intermittent MTP crash right after boot was a kernel-side DockChannel frame interleave, now fixed in aurora-silicon/linux#1010. It wasn't a U-Boot problem.

@RyanTheTide
RyanTheTide merged commit 6363e77 into aurora-wip Nov 10, 2026
2 checks passed
@RyanTheTide
RyanTheTide deleted the j613/mtp-live-handoff branch November 16, 2026 05:22
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.

2 participants