Skip to content

arm64: dts: apple: t8122-j615: hand the MTP over running, two-stage trackpad power (stacked on #2525) - #2550

Closed
RyanTheTide wants to merge 6 commits into
satchlj/mtp-live-handoff-by-propertyfrom
j615/mtp-keep-running
Closed

RyanTheTide wants to merge 6 commits into
satchlj/mtp-live-handoff-by-propertyfrom
j615/mtp-keep-running

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Problem

On the 15" MacBook Air M3 (J615) the internal keyboard and trackpad never appear. U-Boot uses the MTP for the boot keyboard and then stops it; Linux restarts it and the MTP firmware crashes in its first epoch (data abort in the crash log), the helper fails with -ETIME, and dockchannel-hid stays deferred. The J613 (same SoC) already avoids this by handing the running session to Linux; the J615 had no such marking.

Once that is fixed, the trackpad on the 27.2 firmware rejects the one-stage interface power command (output report 0x40 ... failed with err 0xe00002c2, then iface multi-touch start timed out).

Change

t8122-j615.dts:

t8122-j615-25g83.dts is unchanged: it keeps its own apple,power-method = <2> (as on the J613 25G83). The first commit wrongly appended a <1> override there; the second commit removes it.

Stacked on #2525 (needs its property-based handoff in apple-dart and rtkit-helper). Retarget to integration/aurora once #2525 lands.

Testing

J615, 27.2 stub, aura tip-dev Stage 1, one-shot Stage 2 = aura 1.0.0b13.1 + the DTB from this tree + U-Boot from u-boot#67 (unmodified), kernel = lab tree + #2525 + this commit:

  • rtkit-helper 2fa400000.mtp: adopted the running RTKit session (4 retained buffers)
  • keyboard, stm, actuator and multi-touch interfaces now ready; no dockchannel-hid errors
  • 7 of 7 such boots clean (adopted, every interface ready, 0 errors); the internal keyboard typed the lock-screen password after an s2idle round trip on one of them (no USB input device attached)

Before (same machine, stock path): RTKit: co-processor has crashed, Failed to wake up coprocessor, probe -62, no MTP input devices.

Still to run

  • Trackpad events from a person (the interface is ready and the input device registered; no touches recorded yet).
  • A planned s2idle series: the one round trip so far was GNOME's idle suspend (51 min, clean resume, session kept); the J615 has no RTC wake alarm yet.
  • The J613 on 27.2 probably needs apple,power-method = <2> as well; not tested here (no J613).
  • A boot of the 25G83 variant (t8122-j615-25g83): it now hands the MTP over running too (inherited apple,rtkit-keep-running, as the J613 25G83 does). Untested: this J615 runs only the 27.2 stub.
Evidence and DT checks
  • Boot logs: before = boot 1 (image kernel, plain U-Boot), the fix = boot 3. The J615 DTBs (t8122-j615, t8122-j615-25g83) and t8122-j613 compile from this branch with cpp + dtc; after the second commit both J615 variants decompile with apple,power-method = <2> on the trackpad and apple,rtkit-keep-running on the MTP; the 27.2 t8122-j615 DTB is byte-for-byte what the first commit produced.
  • An intermediate trial with board-name checks instead of the property (J615 added next to the J613 checks in U-Boot and the kernel) behaved the same, so the property path is equivalent for this board.
  • Mailbox history in the boot 1 crash log shows two RTKit epochs before the crash: U-Boot's boot keyboard, then Linux's restart.

Assisted-by: LLM (Claude:Opus 5.5)

satchlj and others added 5 commits November 20, 2026 00:16
…y its properties, not by board

A boot stage that leaves the MTP running hands it over with
apple,rtkit-handoff on the MTP and apple,bypass-handoff-streams on its
DART. Two checks still named the J613: the DART probe accepted the
bypass stream only on the J613's T8122 DART at 0x2fa808000, and the
helper kept the adopted session's ASC awake over s2idle only on the J613.

The 27.2 MTP firmware on the MacBook Air M2 (J413) cannot be restarted
either, and U-Boot hands it over the same way through the T8112 DART at
0x24e808000.

- apple-dart: inherit the stream when the DART supports bypass, the
  stream is 1, and its TCR reads back as bypass. The register is the
  hardware's own record of the handoff, so it replaces the board and
  address match.
- rtkit-helper: keep an adopted session's ASC awake over s2idle on every
  board. A session is adopted only through apple,rtkit-handoff, which
  says it cannot be restarted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add apple,rtkit-keep-running to the rtk-helper binding: the helper's firmware
cannot be restarted once quiesced, so a boot stage that starts it hands its
first epoch to the OS running instead of stopping it. U-Boot used to pick
these by board (J613) and by SoC plus OS firmware version (T8112 on 27.x);
it now reads this property.

- t8122-j613: set it, as U-Boot's J613 check did.
- t8112-j413-fw27 (new): J413 with macOS 27 system firmware. It sets the
  property and the trackpad's two-stage power command (apple,power-method =
  <2>), which U-Boot used to patch in, following t8122-j613-25g83.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The helper no longer checks the board, so the harness's
of_machine_is_compatible() stub was unused and failed -Werror.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…its base board

A firmware-profile variant such as t8122-j613-25g83 or t8112-j413-fw27
includes its board's .dts, so a new variant repeats every existing
warning of that board under a new DTB name and fails the check. Report a
variant's warnings under the base board's name instead. A warning only
the variant has still shows up as new.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rackpad power

The J615's MTP firmware cannot be restarted once quiesced, as on the
J613. After U-Boot used it for the boot keyboard and stopped it, Linux
restarted it, the coprocessor crashed (data abort in its first epoch),
the helper failed with -ETIME and the internal keyboard and trackpad
never appeared. Mark the MTP apple,rtkit-keep-running so a boot stage
hands its first epoch over running and Linux adopts it.

On the 27.2 firmware the trackpad answers the one-stage power command
with 0xe00002c2 and never becomes ready ("multi-touch start timed out").
It accepts the two-stage command, so set apple,power-method = <2>. The
25G83 variant keeps the one-stage command.

Tested on a J615 on the 27.2 stub, Stage 2 aura 1.0.0b13.1 with this
DTB and U-Boot with the keep-running handoff: the session is adopted
(4 retained buffers), keyboard, trackpad, STM and actuator interfaces
report ready, no dockchannel-hid errors.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>

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

Thanks, the J615 rows look great, and the &mtp property matches the #2525 / u-boot#67 contract exactly. There's one real problem and two process items.

  1. t8122-j615-25g83.dts:25-28 changes the 25G83 trackpad power method from 2 to 1.
    • The same file already sets apple,power-method = <2> at lines 15-18 ("GPIO-mediated AFE power sequencing, as on the J613 (J615 ADT gP08)"), and the J613 25G83 profile uses 2 as well.
    • In dtc the later block wins, so this PR flips the profile to 1. The description says the file "keeps" 1, but before this PR it was 2.
    • Please drop the new block. The 25G83 profile already gets 2 from both t8122-j615.dts and its own lines 15-18.
    • If you have evidence that the 25G83 J615 trackpad needs method 1, change lines 15-18 and cite that evidence there, rather than adding a second override.
  2. The 25G83 profile now hands its MTP over running too. It inherits apple,rtkit-keep-running from t8122-j615.dts, so U-Boot will hand that MTP over running. That matches the crash its comment describes, and the J613 25G83 profile does the same, so I think it's right. It is untested, though: please add a 25G83 boot to the rows if you have that firmware.
  3. CI and the base branch:
    • No CI ran on 2148416, because dt-checks and host-tests only trigger for PRs into integration/aurora or aurora-wip.
    • #2525 also needs re-signing (no Signed-off-by:), which rewrites the commits this branch sits on.
    • Once #2525 lands I'll retarget this to integration/aurora. Please then rebase onto it with the fix, so the push runs CI on the retargeted PR.

The previous commit appended a second &mtp_mt block to the 25G83 variant
that set apple,power-method = <1>. dtc applies the later block, so it
overrode the file's own <2> (GPIO-mediated AFE power sequencing, as on
the J613 25G83) and changed that profile's trackpad power command.

Drop the block. The 25G83 profile gets <2> from both t8122-j615.dts and
its own override again, as before this series; only the 27.x profile was
meant to change.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Thanks for the review.

  1. 25G83 power method: you're right. The appended block overrode the file's own <2>. It's fixed in b76dd1c, a new commit with no force push, which drops the block. Built with cpp + dtc from the new head:
    • Both t8122-j615 and t8122-j615-25g83 now decompile with apple,power-method = <0x02> on the trackpad and apple,rtkit-keep-running on the MTP.
    • The 27.2 t8122-j615.dtb is byte-identical to the one from 2148416 (sha256 119cd7ab...), so the J615 rows still apply.
    • The PR description no longer says the 25G83 variant "keeps" 1.
  2. 25G83 keep-running: agreed it's untested. Our J615 runs only the 27.2 stub and has no 25G83 install, so we can't add that row tonight. I've left it listed under "still to run".
  3. Rebase / CI: our lab rule is no force pushes. So once iommu/apple-dart, soc: apple: rtkit-helper: take a live MTP handoff by its properties, not by board #2525 lands with its re-signed commits, I'll open a fresh branch with one squashed, signed-off commit on integration/aurora as a new PR that supersedes this one, and close this with a link. That push runs dt-checks and host-tests. If you'd rather retarget this PR and accept a merge commit instead, say so.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Superseded by #2576: the same change as one signed-off commit on integration/aurora now that #2525 is merged (this branch also carried #2525's pre-sign-off commits, and our rule is no force push). It includes the 25G83 fix from your review: that profile keeps power method 2. Closing this one.

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