Skip to content

arm64: dts: apple: t8122-j615: hand the MTP over running, two-stage trackpad power - #2576

Open
RyanTheTide wants to merge 1 commit into
integration/aurorafrom
j615/mtp-keep-running-v2
Open

RyanTheTide wants to merge 1 commit into
integration/aurorafrom
j615/mtp-keep-running-v2

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Supersedes #2550 (same change, one signed-off commit on integration/aurora after #2525 merged, so dt-checks and host-tests run; that branch also carried #2525's pre-sign-off commits). Includes the 25G83 fix from #2550's review: that profile's trackpad stays on power method 2.

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 not touched: it keeps its own apple,power-method = <2> (as on the J613 25G83) and inherits the keep-running handoff, as the J613 25G83 does.

Needs #2525 (merged: the property-based handoff in apple-dart and rtkit-helper) and aurora-silicon/u-boot#67 (the boot stage that reads the property).

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; both J615 variants decompile with apple,power-method = <2> on the trackpad and apple,rtkit-keep-running on the MTP.
  • 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)

…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 already sets <2> itself (as on the J613 25G83) and now
also inherits the keep-running handoff, as the J613 25G83 does.

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

Copy link
Copy Markdown
Contributor Author

J615 (15" M3 Air) planned s2idle series with this PR's head d5cc1f6, as part of the fleet77 kernel (integration b4cd7b3 + this PR, on the J615's default loader). PASS 3/3.

  • Boot: the MTP is adopted running (adopted the running RTKit session), keyboard and trackpad ready at 1.3 s, no MTP errors.
  • 3 x rtcwake -m freeze -s 20 on the PMU RTC: all 3 woke on the alarm, suspend_stats 3 success / 0 fail. Keyboard and trackpad input devices still there after each resume, no MTP or dockchannel errors in dmesg, 0 failed units.
  • Trackpad touches after resume still need a person; not covered here.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merge-train adversarial review (MERGETRAIN-LINUX2) at d5cc1f6: NO BLOCKERS.

Code read only, nothing built here. Before the merge it still needs Dj's verdict at this head; the missing rows are listed below.

Full review

#2576 arm64: dts: apple: t8122-j615: hand the MTP over running, two-stage trackpad power @d5cc1f60

VERDICT: NO BLOCKERS

What I checked:

  • t8122-j615.dts &mtp { apple,rtkit-keep-running; } copies J613 (t8122-j613.dts:437-438). The binding says the OS never reads it (apple,rtk-helper-asc4.yaml). The kernel acts only on the producer-written apple,rtkit-handoff (drivers/soc/apple/rtkit-helper.c:140-157), which also requires the ASC CPU to be running. The producer, u-boot#67, merged on 2026-11-20.
  • With an old U-Boot that does not hand over, nothing changes: Linux restarts the MTP as before, which is the existing failure and not a new one. With the new U-Boot and a missing or invalid handoff, the helper warns and returns an error, so it cannot silently adopt garbage.
  • &mtp_mt { apple,power-method = <2>; }: dockchannel-hid requires the AFE reset line for method 2 (drivers/hid/dockchannel-hid/dockchannel-hid.c:1724-1734, :297-301). The shared t8122-j613-j615.dtsi:90 provides apple,afe-reset-gpios = <&smc_gpio 8 ...>, so probe will not fail with "needs the AFE reset line". The inherited-MTP method-2 path (:781-808, which includes a pre-existing 50 ms fsleep) is what this PR exercises.
  • No driver change, no new gates or params. The kernel has no J615 board check in the MTP/DART/rtkit paths (grep).

Nits:

  1. The comment at t8122-j615.dts (+149) says "The 27.x trackpad firmware answers only the two-stage power command". That frames a board DT property as a firmware-version fact. The same tree's 25G83 variant gives the opposite reason: "GPIO-mediated AFE power sequencing (J615 ADT gP08)" (t8122-j615-25g83.dts:15). If it really is firmware-version dependent, the plain j615 DTB now hard-wires 27.x behaviour. That is fine while every stub is pinned to 27.2, but it is the kind of version gate J413 handled with a separate -fw27 DTB. If it is a board/ADT fact (gP08), say so. Either way the J613 plain DTB (t8122-j613.dts:427) stays on method 1 with the same ADT and firmware, which is inconsistent and probably broken on 27.2 (the PR body admits as much).
  2. The base is 245 commits behind but merges clean.

Missing rows:

  • Real trackpad touches and clicks on J615 (only "interface ready" so far).
  • An s2idle series on the adopted MTP: only one idle suspend so far, and J615 has no RTC wake alarm yet.
  • J615-25G83 boot: it now inherits keep-running.
  • J613 on 27.2 with method 2. No J613 in the lab; that is a separate PR.

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

Pre-PR checklist review at live head d5cc1f60ea32eb6cd2e5c25ff0b0b38a43144f30: 0 code, policy (§1–§4, §6), attribution, naming, or CI blockers (dt-checks and host-tests green; linux#2525 and u-boot#67 both merged).

Verified against surrounding kernel source:

  • &mtp { apple,rtkit-keep-running; }; matches t8122-j613.dts:437-438; drivers/soc/apple/rtkit-helper.c adopts only when U-Boot provides a valid apple,rtkit-handoff with the ASC running, falling back cleanly otherwise.
  • &mtp_mt { apple,power-method = <2>; }; satisfies drivers/hid/dockchannel-hid/dockchannel-hid.c:297-301 because t8122-j613-j615.dtsi:90 provides apple,afe-reset-gpios = <&smc_gpio 8 GPIO_ACTIVE_LOW>.
  • t8122-j615-25g83.dts includes t8122-j615.dts and inherits cleanly with no conflict.

Holding only for §5 hardware evidence at d5cc1f60

  1. Real trackpad input events on J615 (touches/clicks/pointer movement confirmed by a person, both at boot and after s2idle — so far only interface ready and input device registration have been verified).
  2. Explicit full §5 regression line on live head d5cc1f60: 0 SELinux AVC denials, 0 failed units, 0 new kernel errors (the 11-21 s2idle 3/3 PASS comment reported 0 failed units and 0 MTP/dockchannel errors, without AVC count or full kernel error count).

Non-blocking nit

  • arch/arm64/boot/dts/apple/t8122-j615.dts:149 comments The 27.x trackpad firmware answers only the two-stage power command, whereas t8122-j615-25g83.dts:15 frames apple,power-method = <2> as GPIO-mediated AFE power sequencing, as on the J613 (J615 ADT gP08). Worth clarifying whether this is a board/ADT property (which would also apply to plain t8122-j613.dts in a follow-up PR) rather than a firmware-version rule.

Ready to approve once the §5 trackpad-event and regression rows at d5cc1f60 are posted.

Assisted-by: LLM (Gemini 4 Neon)

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Regression counts at d5cc1f6 on the J615 (15-inch M3 Air), for the open "0 AVC / 0 failed / 0 new kernel errors" item.

The kernel is 7.3.0-aurora-fleet81, the J615's default since 11-23. It is integration/aurora eb6d9ec plus open heads, including this PR at d5cc1f6. It booted on the default command line with the J615's configured Stage 2. The comparison is the J615's previous default, 7.3.0-aurora-g15g272a, booted the same day.

previous default fleet81 (this head)
SELinux Enforcing Enforcing
AVC denials 0 0
failed units 0 0
kernel error lines 12 12 (the same lines)
kernel warnings 15 15
firmware crashes / oopses 0 / 0 0 / 0
s2idle (rtcwake on the PMU RTC) 1/1 1/1

On the fleet81 boot the MTP is adopted running: rtkit-helper 2fa400000.mtp: adopted the running RTKit session (4 retained buffers). There are no MTP or dockchannel error lines before or after the s2idle cycle.

Still to run: trackpad touches by a person, at boot and after s2idle. This row has no person at the Mac.

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.

2 participants