Skip to content

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

Merged
DjDeveloperr merged 4 commits into
integration/aurorafrom
satchlj/port-328-20261104
Nov 11, 2026
Merged

DjDeveloperr merged 4 commits into
integration/aurorafrom
satchlj/port-328-20261104

Conversation

@satchlj

@satchlj satchlj commented Nov 5, 2026

Copy link
Copy Markdown
Member

Keep the exact J613 MTP bypass stream alive for live RTKit adoption, with identity-domain attachment and readback checks. Retain Aurora’s independent J614s/J713, radio and display policies. Requires the matching loader in aurora-silicon/u-boot#30.

Port of omacom/linux-aurora#328. The original PR remains untouched.

Validation: arm64 defconfig + asahi.config, Image/modules/DTBs with BTF and KUnit enabled, LLVM 18/Rust 1.85.0, passed at stack top #343 (11d802aa9a17), which includes this branch. The validated integration base is b500668. QEMU loaded the test-bearing modules successfully with no additional failures. The combined run retains four pre-existing SEP store failures (plus their suite aggregate), reproduced on the unmodified Aurora base. The unmodified pinned base also crashes in apple-av-audio-lifetime/av_lifetime_devres_order; that unrelated audio suite is explicitly excluded. All tests added by these ports run through KUnit debugfs on Cortex-A76. This is not a fully green or complete-tree KUnit run. No new host fixture was authored for this layer; the arm64 module build and QEMU module-load smoke test passed. No 7.3 hardware boot or deployment has been performed.

@satchlj

satchlj commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

@DjDeveloperr @RyanTheTide ready for your regression testing. It hasn't been boot-tested on J613 with 7.3 yet; I'll post the result here when I have it.

@satchlj

satchlj commented Nov 6, 2026

Copy link
Copy Markdown
Member Author

J613 boot result on 7.3 (rubra, M3 MacBook Air 13", macOS 26.6.2 / 25G83 firmware), 2026-11-05.

@RyanTheTide RyanTheTide 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.

The new probe check rejects any DART that carries apple,bypass-handoff-streams unless it is the J613 instance. On t8140 (J700) the keyboard/trackpad DART at 314800000 has that property with value 0, so it now fails to probe:

apple-dart 314800000.iommu: probe with driver apple-dart failed with error -22

The MTP then only appears ~20 s into boot after the deferred-probe timeout, without its DART. Please restrict the new path to the boards it is meant for (or treat a zero/absent stream mask as "no handoff" and fall through to the existing probe) so other SoCs keep their current behaviour.

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>
J700 advertises apple,bypass-handoff-streams with value zero. Skip the live MTP admission checks in that case, as for an absent property, so the ordinary probe path remains available. Nonzero handoffs retain the J613 identity and bypass checks.

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

Assisted-by: LLM
@satchlj
satchlj force-pushed the satchlj/port-328-20261104 branch from 2e785e9 to f891a95 Compare November 10, 2026 19:48
@satchlj

satchlj commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

Rebased onto current integration and fixed the zero-value case: J700's apple,bypass-handoff-streams = <0> now takes the existing probe path, as an absent property does. Nonzero handoffs still require the qualified J613 instance. The actual admission block passes offline absent/zero/nonzero/J613 checks. I have not boot-tested this new head on J700 or J613.

@satchlj

satchlj commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

Claude Opus 5.5 on @satchlj's behalf

Tested on J613 (MacBook Air M3), system firmware 26.6.2 / 25G83. Kernel: exact head
f891a957fc26e8c9e6b1823f25e1cfd4f37b2c59 with no extra commits, release
7.3.0-aurora73-pr971-f891a95-ARCH (packaged default config, debug info/BTF off), UKI
sha256 38788238…3f48f01, booted as a one-shot trial.

  • rtkit-helper 2fa400000.mtp: adopted the running RTKit session (4 retained buffers).
    dockchannel-hid interfaces stm, keyboard, actuator and multi-touch all ready. Input
    devices: "Apple MTP keyboard", "Apple MTP multi-touch", "Apple MTP multi-touch Force
    Click"; MTP haptics initialised.
  • Physical input during a 60 s evdev capture: trackpad 26,933 ABS events and 33 button
    presses; keyboard 9 key events from 2 distinct keys. The person at the machine
    confirmed that typing, pointer movement and clicks behaved normally.
  • No Oops, BUG, call trace, DART fault or MTP crash in dmesg.
  • Baseline for comparison: an upstream integration/aurora kernel without this PR on
    the same machine had no MTP driver bound and no keyboard or trackpad.
  • Not tested: force-click and haptic feedback deliberately, suspend/resume of MTP, long
    uptime.

This also means a J700 boot of this head is still owed for the zero-stream fix; I don't have one.

The live J613 MTP session is adopted without resetting its DART.
Its RTKit helper admits suspend-to-idle with firmware kept running,
but the DART rejects every suspend with EBUSY.

Allow only that retained-power state and skip resume reset as well;
deeper sleep remains refused. Matched 30.6 devices/platform pm_test
passes; the current PR971 composition fails at 2fa808000.iommu.
Hardware retest of this change is pending.

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

satchlj commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

GPT-6.1 Sol on @satchlj's behalf

2026-11-10 hardware re-test with #971 head 6debb6f. Matched running 30.6 devices/platform PM tests reached their five-second checkpoints. The previous f891a95 composition aborted at apple-dart 2fa808000.iommu with -16. Its sysfs consumers are MTP 2fa400000 and input 2fab28000. With the new suspend/resume bypass guards, freezer/devices/platform each returned rc=0 and reached all three five-second checkpoints. No DART EBUSY or retained-state-loss message; keyboard/multitouch/Force Click devices remained registered afterward. pm_test restored to none. No RTC wakealarm was available; no real s2idle, wake or sleep-power test was run.

J613/T8122 M3 Air, integration dc8f6f7 plus #971/#973/#974/#978/#1340/#1486/#1491, composed source 112007b70271. Hardware-tested release 7.3.0-aurora73-upstream-2-ARCH; UKI SHA256 248283ad7750793cf60f8530e3e2331f7c1a58d733d2f3e8880f8a959e87becc. Composition evidence, not an isolated PR kernel. The same binary passed a one-shot trial and the normal new-default reboot. Installed package revision 30.10 corrects only the installer's pre-extraction space estimate; all 2054 Linux-package usr regular files match the qualified 30.9 package. Stage1/Stage2 unchanged, four boot hooks masked.

@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.

Codex (GPT-6.1 Sol), reviewing on @DjDeveloperr’s behalf.

No blocking findings on the current head. The admission check now treats absent/zero bypass-handoff streams as no live handoff, preserving the existing J700 path; nonzero handoff remains restricted to the qualified J613 DART/stream with bypass readback. Latest J613 suspend/resume guards retain the live epoch and refuse deeper sleep. Exact-head source, Rust, KUnit and host checks pass. Posted J613 physical input and later composition PM diagnostics are attributed evidence, not fresh tests by this review. A J700 zero-stream boot/input smoke and deliberate force-click/long-uptime qualification remain rollout follow-ups; real MTP retention for the distinct #972 implementation is not inferred from these results.

@DjDeveloperr
DjDeveloperr merged commit df115c8 into integration/aurora Nov 11, 2026
4 checks passed
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