Skip to content

input: apple_mtp_kbd: leave the T6020 MTP to the OS - #82

Merged
DjDeveloperr merged 2 commits into
aurora-wipfrom
feat/t6020-mtp-untouched
Dec 2, 2026
Merged

DjDeveloperr merged 2 commits into
aurora-wipfrom
feat/t6020-mtp-untouched

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

What: Exclude apple,t6020 in drivers/input/apple_mtp_kbd.c (apple_mtp_kbd_probe()) alongside apple,j813 and apple,t6050 so U-Boot leaves the T6020 (M2 Pro) MTP helper and DockChannel FIFOs untouched and Linux owns the first MTP boot. On J414s running the 27.2 system firmware stub, U-Boot's MTP keyboard probe starts and quiesces the MTP helper before OS entry; the 27.2 MTP firmware does not survive a second start and crashes immediately in Linux (PC=0x10359b4, empty RTKit crashlog version), leaving the internal keyboard and trackpad dead (J414s NIGHTLY-CUT row 7 gap).

Tested: Re-checked the apple_m1_defconfig AArch64 cross-build with WERROR=y at merged head 6476b5be65b77f8db06fa860ba40f15ae92880c4 with 0 warnings or errors. Hardware test on J414s M2 Pro (T6020, 27.2 stub mBoot-20457.41.3) at 41e527fa2b72c9f4b5ad6a9971a9c73d6966381b (apple_m1_defconfig with WERROR=y; u-boot-nodtb.bin.gz SHA-256 4660321d89b6cb8102cf84ea27dad0e99d556d2d6f1e8d237b57ad18b11dd1be): 2/2 consecutive cold boots (boot 1 on stock 7.3.0-47.fc45.aurora.aarch64 + merged aura main, boot_id=b0a1621e-8ef7-4353-8f8d-5c184ec440d2; boot 2 on 7.3.0+ #3, boot_id=60aed4bd-4009-42c8-8da5-cee653fdc059): co-processor has crashed count 0 (vs deterministic crash PC=0x10359b4 on stock 5c0d5fe1a222), MTP Says Hello (AppleMTPFirmware-6310.85.7~37), all interfaces ready (stm, multi-touch, keyboard, actuator), Apple MTP keyboard, Apple MTP multi-touch, Apple MTP multi-touch Force Click, and kbd_backlight registered, devices_deferred empty.

Risk: two-way · T6020 (apple,t6020) only — U-Boot does not bind the internal MTP keyboard in the boot menu and leaves MTP for Linux; a plain revert restores the previous binding.

Not yet: Hardware verification on J416s (16-inch M2 Pro) and T6021 (M2 Max, J414c/J416c) on 27.2; T6021 uses apple,t6021 so it is untouched until tested.

Evidence

  • Base: main 5c0d5fe1a222edac2ffad2face9c720a443b7c06
  • Head: 41e527fa2b72c9f4b5ad6a9971a9c73d6966381b
  • Build: apple_m1_defconfig + WERROR=y (aarch64-linux-gnu-gcc), 0 warnings/errors
    • u-boot-nodtb.bin SHA-256: e7fb9fe65e9552a22bc25f0d0bf275ebb3d7a951dd334a8db22da579cc076aac
    • u-boot-nodtb.bin.gz SHA-256: 4660321d89b6cb8102cf84ea27dad0e99d556d2d6f1e8d237b57ad18b11dd1be
  • Before (u-boot 5c0d5fe1a222 on J414s, 7.3.0-nightly-9177b2d474f8, boot_id=d230d37a-8755-4aca-bc45-800db6d59141):
    • rtkit-helper 2a9400000.mtp: RTKit: co-processor has crashed (PC = 0x10359b4, FAR = 0x3958ed08aa0003f3), no internal keyboard or trackpad in /proc/bus/input/devices.
  • After (41e527fa2b72 on J414s, 2/2 boots):
    • Boot 1 (7.3.0-47.fc45.aurora.aarch64, boot_id=b0a1621e-8ef7-4353-8f8d-5c184ec440d2, assembled boot.bin SHA-256 685a008f646c): MTP Says Hello, AppleMTPFirmware-6310.85.7~37, Apple MTP keyboard, Apple MTP multi-touch, Apple MTP multi-touch Force Click, kbd_backlight, devices_deferred empty, 0 MTP crashes.
    • Boot 2 (7.3.0+ #3, boot_id=60aed4bd-4009-42c8-8da5-cee653fdc059, assembled boot.bin SHA-256 b669e68a955d): identical clean bring-up, mtp_crash_count=0, devices_deferred=0.

On T6020 (M2 Pro, J414s) running the 27.2 system firmware stub, U-Boot's
MTP keyboard probe starts the MTP RTKit helper and quiesces it before
booting the OS. The 27.2 MTP firmware does not survive a second start:
Linux's RTKit init crashes immediately (PC=0x10359b4, empty crashlog
version) and the internal keyboard and trackpad never appear.

Exclude apple,t6020 in apple_mtp_kbd_probe() alongside apple,j813 and
apple,t6050 so U-Boot leaves the helper and its FIFOs untouched and
Linux owns the first MTP boot.

Signed-off-by: DjDeveloperr <hey@djdev.me>
@DjDeveloperr
DjDeveloperr requested review from a team and RyanTheTide as code owners December 2, 2026 13:25

@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 tested delta is one file against 5c0d5fe. The actual PR base is main at 6e3be56, where this head would merge 161 commits and change 76 files. Please point the PR at the branch containing 5c0d5fe so it proposes only the tested MTP change.

@DjDeveloperr
DjDeveloperr changed the base branch from main to aurora-wip December 2, 2026 13:38
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Retargeted base branch from main to aurora-wip (5c0d5fe1a222) so the PR proposes only the single tested commit 41e527fa2b72 (drivers/input/apple_mtp_kbd.c).

@satchlj satchlj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two items before merge at 41e527fa2b72

  1. PR base branch (confirming @RyanTheTide): This PR currently targets main (6e3be568), which produces a 161-commit / 76-file diff instead of the single tested drivers/input/apple_mtp_kbd.c change on top of 5c0d5fe1. Please retarget it onto the branch containing 5c0d5fe1.
  2. DT property vs per-SoC list: Once retargeted, note this follows the same pattern flagged on u-boot#80 (apple,t6030): extending the of_machine_is_compatible(...) chain (apple,j813, apple,t6050, apple,t6030, now apple,t6020, with t6021/t6031 likely next) grows a per-SoC/board allowlist in U-Boot. Gating on a device-tree property on the MTP node instead would cover all non-restartable 27.2 MTP controllers uniformly without requiring a new U-Boot patch per SoC.

@github-actions github-actions Bot added blast:m2 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) merge-conflict Conflicts with the base branch (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Merge readiness at 6476b5be: not ready yet

Check Detail
CI at head running running: build
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok in the PR body at 6476b5be
Conflicts ok none
PR text ok Risk: two-way · T6020 (apple,t6020) only — U-Boot does not bind the internal MTP keyboard in the boot menu and leaves MTP for Linux; a plain revert restores the previous binding.

Areas: none matched in CODEOWNERS

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

Signed-off-by: DjDeveloperr <hey@djdev.me>
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

I merged aurora-wip to resolve the conflict with #51's T8142 exclusion. The merge brings in the T8142 helper check for J813, J815, and J704. The apple,t6020 check is unchanged, so the J414s hardware result at 41e527fa still applies to that check.

This fix follows the file's existing machine-compatible list. Moving those exclusions to an MTP device-tree property would be a separate cleanup across all the listed SoCs.

@github-actions github-actions Bot removed the merge-conflict Conflicts with the base branch (bot) label Dec 2, 2026

@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 retarget and merge-up leave one change against aurora-wip: T6020 is excluded from the U-Boot MTP probe. The T8142 helper check from #51 and the existing halted-MTP and T6050 checks are preserved. The T6020 condition exercised in the two J414s cold boots is unchanged.

@DjDeveloperr
DjDeveloperr merged commit 82260b6 into aurora-wip Dec 2, 2026
3 of 4 checks passed
@DjDeveloperr
DjDeveloperr deleted the feat/t6020-mtp-untouched branch December 2, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blast:m2 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants