Skip to content

arm64: dts: apple: t8132-j715: hand the MTP over as a halted consumer - #2745

Merged
DjDeveloperr merged 3 commits into
aurora-silicon:mainfrom
kazuhidet:j715/dts-mtp-halted-handoff
Dec 1, 2026
Merged

DjDeveloperr merged 3 commits into
aurora-silicon:mainfrom
kazuhidet:j715/dts-mtp-halted-handoff

Conversation

@kazuhidet

@kazuhidet kazuhidet commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

What: without U-Boot, iBoot leaves the J715's MTP stopped, so its firmware faults and the keyboard and trackpad stay dead. Hand the MTP over as a halted consumer, as t8132-j604.dts does.
Tested: J715 M4 Air with this tree, aura main 58e712b9 + aura#429, booted direct and through a U-Boot with u-boot#69's fix (now merged): MTP cold-started by Linux, keyboard and trackpad work, 0 new kernel errors. Through unpatched U-Boot the MTP crashes on its second start, which u-boot#69 fixes.
Risk: two-way · J715 only
Not yet: nothing on the J715 side. Needs aura#429 in the shipped aura; without it the J715 stays as it is today.

On a J715 (15-inch M4 Air) booted stage 1 → aura → Linux, the MTP is stopped when Linux takes over, as on the J604. This mirrors t8132-j604.dts:

  • /chosen: linux-enablement-mac,dapf-halted-handoff = "/arm-io/mtp", so aura programs dart-mtp's filter as for a halted consumer;
  • &mtp_dart: apple,remap-streams = <1 0>, <2 0>, <3 0>;
  • &mtp and &mtp_hid: iommus = <&mtp_dart 0>.

Without it, the MTP firmware's first access faults ("CTE invalid") and the keyboard and trackpad stay dead.

Tested on a J715, OS firmware 26.6.2, aura main 58e712b9 with aurora-silicon/aura#429 (the T8132 board list dropped from dapf_init_fdt()):

  • MTP cold-started by Linux ("MTP Says Hello", AppleMTPFirmwareMac-5340.61.4), no DART faults;
  • "Apple MTP keyboard" and "Apple MTP multi-touch" work;
  • the AOP microphones, the display, the GPU and the speakers come up as before.

This replaces the board exception proposed in aurora-silicon/aura#430. J715 report: #2663.

Merge order: this needs aurora-silicon/aura#429 in the shipped aura, and the two should land together. With aura main alone, the board list skips the J715, and the MTP faults as it does today. That is not a regression.

Kernel and regression counts. The kernel is the J715's everyday build, 7.3.0-j715-aurora+. It is integration/aurora 0abc2f3 with local J715 bring-up changes in four files (EFI earlycon, the Apple DRM driver, the GPU hw.rs, the AIC driver), none of them in this PR. The DTB is this PR's tree. Counts from the three recorded boots (direct, through U-Boot with aurora-silicon/u-boot#69's fix, and through unpatched U-Boot):

  • SELinux denials: not applicable, since this Arch-based install has no SELinux.
  • Failed units: 2 in every boot, the same two in each: j713-owner-assets.service and m4-j715-backlight.service. Both are local services of this install (speaker filter assets and a backlight guard) and fail the same way without this change.
  • Kernel errors at err or above:
    • In every boot: avd ... probe with driver avd failed with error -2 (no AVD firmware).
    • In the direct and fixed U-Boot boots: hid-generic ... device has no listeners.
    • In the direct boot: apple-dcp ... external DCP not handed over.
    • New with this tree: none. The only MTP errors are in the unpatched U-Boot boot (the second-start crash).

@RyanTheTide

Copy link
Copy Markdown
Contributor

The DT side matches t8132-j604.dts and aurora-silicon/aura#429: the J715 gets dapf-handoff from t8132-laptop.dtsi, the new dapf-halted-handoff names only the MTP, and the loader still checks that the MTP CPU is actually stopped before it programs the halted filter. No board list is left on either side. Two small points:

  • t8132-j715.dts:23-28 and :84-97: the halted handoff is checked at runtime by the loader (asc_cpu_running()), but the stream 0 remap and iommus = <&mtp_dart 0> are fixed in the tree. If a J715 boots with the MTP left running (a different iBoot or OS firmware, or U-Boot in the chain, which the comment itself names as the condition), the loader skips the filter and Linux still expects the MTP on stream 0, where the J713 hands a running MTP over on stream 1. Could you say in the commit message what that boot does, or confirm that it cannot happen on 26.x/27.x firmware? The same question applies to the J604.
  • Merge order: this needs aura#429 in the shipped aura. With aura main the J715 is skipped by the board list and the MTP still faults. That is not a regression, but it is worth stating in the PR body so the two land together.

Assisted-by: LLM (Claude:Opus 5.5)

@kazuhidet

Copy link
Copy Markdown
Contributor Author

Thanks for the review.

A J715 booted with the MTP left running. What I can say today, from source and from this unit:

  • Without U-Boot (stage 1 → aura → Linux, OS firmware 26.6.2): the MTP is halted when the loader checks it. A trace of cpu_control read 0x0 at Linux's first start, and the loader programmed the halted filter.
  • With U-Boot in the chain: aura still runs before U-Boot, so it sees the MTP as iBoot left it, halted, and programs the halted filter. U-Boot's MTP keyboard then boots the MTP itself (drivers/input/apple_mtp_kbd.c, arch/arm/mach-apple/rtkit_helper.c on aurora-silicon/u-boot main). Before Linux, rtkit_helper_remove() shuts RTKit down and clears CPU_CTRL RUN. Only the T8140 (apple,rtkit-handoff) leaves the MTP running for the OS. So on T8132, Linux should again get a halted MTP on stream 0. That is from reading the source; I haven't booted the J715 through U-Boot yet.
  • I'm preparing that boot (aura with arm64: keep J713 GPU/DCP non-coherent when CLIDR_EL1.LoC == 0 (fixes J713 graphics on 7.3) #429, U-Boot, this tree) and will post the dapf log, U-Boot's MTP shutdown, the MTP cold start and any DART faults here.
  • Other firmware: I can't test 26.x/27.x firmware other than 26.6.2 on this unit, so I won't claim the other cases. If iBoot itself ever hands over a running MTP, the loader skips the halted filter and Linux would expect the MTP on stream 0 while the running firmware uses stream 1. That would be the J713 case, and the tree would need the J713 layout. I'll say that in the commit message once the U-Boot boot is done.

Merge order: added to the description. This needs aurora-silicon/aura#429 in the shipped aura; with aura main alone, the J715 keeps its current MTP fault.

@kazuhidet

Copy link
Copy Markdown
Contributor Author

The J715 boot through U-Boot is done. It corrects one point of my earlier reply.

Setup. J715, OS firmware 26.6.2, stage 1 → aura → U-Boot → Linux:

Two boots, differing only by one line in U-Boot. U-Boot was kept off NVMe, and the kernel came from the boot.bin (details in the U-Boot PR).

aurora-wip as is + apple,j715 in the MTP keyboard skip list
U-Boot starts the MTP for its keyboard (CPU_CTRL RUN set), stops it at OS entry leaves the MTP alone
What Linux gets the MTP halted, on stream 0 the MTP halted, on stream 0
Linux RTKit: co-processor has crashed 0.3 ms after init, the same data abort as the J604 in aurora-silicon/u-boot#44; no keyboard or trackpad "MTP Says Hello"; keyboard and trackpad work
DART faults none in the record none

Correction. I wrote that with U-Boot in the chain "Linux should again get a halted MTP on stream 0". That part holds: the loader's halted filter and this tree's stream 0 layout were fine in both boots, with no DART faults. But a halted MTP is not a fresh one. The MTP firmware does not survive a second start, exactly as on the J604 (aurora-silicon/u-boot#44), so a U-Boot that runs it first breaks the keyboard and trackpad.

The fix belongs in U-Boot, the same one-line change as u-boot#44: aurora-silicon/u-boot#69. With it, this tree works through U-Boot as it does without.

The running-MTP case you asked about is still untested. This tree assumes a halted MTP. A boot that hands it over running would need the J713's stream 1 layout. That can't come from stage 1 → aura → Linux on 26.6.2, nor from U-Boot with the fix above. It would come from iBoot on other firmware, or from a U-Boot live handoff such as aurora-silicon/u-boot#57.

I've added this to the commit message and force-pushed it (message only, no code change).

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for the U-Boot row and the correction. 8b51ad4 has the same tree as before (message only), so our earlier read stands. The keyboard loss is the U-Boot side's to fix (aurora-silicon/u-boot#69). I suggested there that it key on this tree's halted-handoff property rather than adding the J715 to a board list, so this PR and that one line up without another table entry.

Assisted-by: LLM (Claude:Opus 5.5)

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

Adversarial review at head 8b51ad43a3d7b9154e2ebd1676a828eb25f37ec0 against pre-pr-checklist.md: Request changes — the devicetree change itself is clean and matches t8132-j604.dts, but there is a §6 naming violation in both the DTS comment and the commit message, and CI has not yet run.

Blocker

  1. §6 Naming (hard rule — arch/arm64/boot/dts/apple/t8132-j715.dts:24 & commit message):
    • pre-pr-checklist.md §6 requires Aurora paths and names, not Asahi or m1n1.
    • Both the new comment in arch/arm64/boot/dts/apple/t8132-j715.dts:24 and the commit message of 8b51ad43 write m1n1 stage 1 -> aura -> Linux. (The PR description already uses stage 1 -> aura -> Linux, and t8132-j604.dts has no m1n1 reference.)
    • Please drop m1n1 from both the DTS comment and commit message (e.g., stage 1 -> aura -> Linux or aura stage 1 -> stage 2 -> Linux).

Technical, Policy & §5 Check

  • DT correctness & §1 / §2 / §3: Matches t8132-j604.dts (chosen/linux-enablement-mac,dapf-halted-handoff = "/arm-io/mtp", &mtp_dart apple,remap-streams = <1 0>, <2 0>, <3 0>, &mtp and &mtp_hid iommus = <&mtp_dart 0>). Default cmdline, board-scoped DT only, and pairs with aurora-silicon/aura#429 (which removes the board list in aura). The U-Boot second-start crash (aurora-silicon/u-boot#69), running-MTP caveat, and aura#429 merge order are clearly documented.
  • §4 Attribution: Clean — human author/committer (Kazuhide Takahashi) and Signed-off-by: only.
  • CI (needs run): Both fork workflow runs (Host tests, Device tree checks) on 8b51ad43 are currently action_required awaiting maintainer approval; please ensure Device tree checks / Host tests run green after the naming update.
  • §5 Evidence (minor completeness): The direct and U-Boot J715 hardware rows confirm MTP cold-start, keyboard/trackpad, audio/display/GPU, and 0 DART faults; please also include the kernel build/version and the standard §5 regression counts (0 SELinux denials, 0 failed units, 0 new kernel errors) in the PR description.

kazuhidet added a commit to kazuhidet/u-boot that referenced this pull request Nov 22, 2026
When the device tree names the MTP (/arm-io/mtp) in /chosen
linux-enablement-mac,dapf-halted-handoff, the earlier stage hands it to
the OS halted and Linux cold-starts it. U-Boot's MTP keyboard probe
starts it first and stops it again at OS entry, and the firmware does
not survive the second start: on the J715 (MacBook Air 15-inch, M4),
Linux's RTKit init is followed 0.3 ms later by "co-processor has
crashed", the same data abort as on the J604, and the internal keyboard
and trackpad are gone.

Refuse the keyboard whenever the tree says so, instead of listing
boards. The J604's tree has the property, so its entry goes; the J715's
gets it from aurora-silicon/linux#2745. The J813 and T6050 keep theirs,
since their trees don't name the MTP there. U-Boot then has no internal
keyboard on these boards, and Linux gets a firmware nobody ran.

Tested on a J715 (OS firmware 26.6.2) with the #2745 tree: with
aurora-wip as is, the MTP crashes in Linux; with this change, "MTP Says
Hello" and the keyboard and trackpad work.

Signed-off-by: Kazuhide Takahashi <[email protected]>
Without U-Boot (stage 1 -> aura -> Linux), nothing keeps the
J715's MTP running, so Linux cold-starts it. As on the J604, name
/arm-io/mtp in linux-enablement-mac,dapf-halted-handoff so the loader
programs its DART filter as for a halted consumer, and put the MTP and
its HID on DART stream 0 (streams 1 to 3 remapped to 0) instead of the
stream 1 the J713's running MTP is handed over on.

Before this, the MTP firmware's first access faulted with "CTE invalid"
and the keyboard and trackpad never came up.

With U-Boot in the chain, U-Boot has to leave the MTP alone, as on the
J604: if it starts the MTP for its keyboard, it stops it again before
Linux, and the firmware crashes on Linux's second start. Linux still
finds it halted on stream 0. A boot that hands the MTP over running, as
the J713 does, would need the J713's stream 1 layout instead. Neither
stage 1 -> aura -> Linux on 26.6.2 nor U-Boot with the J715 in its
keyboard skip list does that, and it has not been tested.

Tested on a J715 with OS firmware 26.6.2 and aura main plus
aurora-silicon/aura#429: the MTP says hello, and the keyboard and
trackpad work, with no DART faults. Through U-Boot aurora-wip with the
J715 in that skip list: the same. Through U-Boot aurora-wip as is: the
MTP firmware crashes as on the J604.

Signed-off-by: Kazuhide Takahashi <[email protected]>
@kazuhidet
kazuhidet force-pushed the j715/dts-mtp-halted-handoff branch from 8b51ad4 to 0388405 Compare November 22, 2026 11:09
@kazuhidet

Copy link
Copy Markdown
Contributor Author

Thanks for the review.

  • §6: m1n1 is gone from the DTS comment and the commit message (stage 1 -> aura -> Linux). The change is in a comment only, and the DTB is byte-identical.

  • §5: I've added the kernel version and the counts to the description. They aren't all zero:

    • This install has no SELinux.
    • Two local services fail in every boot, with or without this change.
    • The kernel errors are the same set as without this tree.

    I've listed them as they are rather than rounding them to zero.

  • CI: waiting for a maintainer to approve the fork runs on the new head.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Re-checked at 0388405. Against 8b51ad4 the only change is the one DTS comment line, and the commit message no longer mentions m1n1, so the DTB is the one I reviewed. Thanks for listing the counts as they are.

One question about the test kernel. The rows ran on integration/aurora 0abc2f3 plus local J715 changes in four files, one of them the AIC driver. The MTP cold start and the keyboard depend on its interrupts, so could you say what the local AIC change does, and whether the MTP comes up the same without it? If the J715 needs any of those four changes to boot from integration/aurora, a link to where they are going would help. That way the row can be repeated on a plain tree once they land.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

@kazuhidet status against integration/aurora daa9e2d: this merges cleanly; t8132-j715.dts has not changed on the tip since b8c5bb0 and the J604 still carries the same three pieces, so it is still needed. The naming point from the change request is fixed at 0388405 and needs a re-review, and the CI runs on this head still have to be approved. It only takes effect together with aurora-silicon/aura#429, which is still open; the U-Boot path additionally needs aurora-silicon/u-boot#69. One question is still open: what the local AIC change in the test kernel does, and whether the MTP comes up the same without it.

@kazuhidet

Copy link
Copy Markdown
Contributor Author

Thanks for checking against daa9e2de.

The local AIC change is #2666, one line in drivers/irqchip/irq-apple-aic.c. It sets .vm_timer_fiq_readonly = true for T8132, as T8142 already has: when the loader publishes no aurora,ctxr-exec-window, the kernel leaves VM_TMR_FIQ_ENA_EL2 alone. It touches neither the MTP nor any DART, and an aura-booted T8132 that publishes a window is unchanged.

Without it, this J715 doesn't boot at all. Its stage 1 arms no CTXR exec window. On that chain, the write to VM_TMR_FIQ_ENA_EL2 (msr s3_5_c15_c1_3) traps as an undefined instruction in aic_init_cpu(), before the console. The kernel never gets to probe the MTP, so on this Mac I can't compare the MTP with and without that line.

The MTP part of this PR doesn't depend on it:

  • The halted handoff is decided by aura (dapf-halted-handoff, the stopped-CPU check) and by this tree's stream 0 layout.
  • The AIC line only lets the kernel start on a chain without a CTXR window.

A J715 booted through an aura that publishes a CTXR window wouldn't need #2666. I can't produce that boot here, because this unit's stage 1 is the one that arms no window.

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

Formal adversarial §1–§6 pre-PR checklist re-review at 03884056556a2680b41f2e3b5bebcf878f56dc6c (against live integration/aurora 70a00e583b03; still needed — t8132-j715.dts on integration/aurora still lacks halted-handoff and stream 0 remap).

Prior Blocker Verification

  • §6 Naming (fixed): m1n1 has been removed from both arch/arm64/boot/dts/apple/t8132-j715.dts:24 and the commit message (stage 1 -> aura -> Linux).
  • §5 Evidence & AIC follow-up (resolved): Kernel version (7.3.0-j715-aurora+), regression counts (Arch/no SELinux, 2 pre-existing local units, 0 new kernel errors), and the local AIC change (aurora-silicon/linux#2666, required only for stage 1 without CTXR window and orthogonal to MTP) are documented alongside the J715 direct and U-Boot hardware rows.

Checklist Summary

  • §1 No model gating: Pass — board-scoped DT matching t8132-j604.dts; merge dependency with aurora-silicon/aura#429 (still open; no-op/no regression without it) and U-Boot skip-list dependency (aurora-silicon/u-boot#69, still open) are documented.
  • §2 Production-ready, no hacks: Pass — default command line, clean DT diff (chosen/linux-enablement-mac,dapf-halted-handoff = "/arm-io/mtp", &mtp_dart stream remap 1..3 -> 0, &mtp & &mtp_hid iommus = <&mtp_dart 0>).
  • §3 Safety: Pass.
  • §4 Clean-room & attribution: Pass — human author/committer (Kazuhide Takahashi <[email protected]>) and human Signed-off-by: only, zero AI trailers in commit.
  • §5 Evidence: Pass.
  • §6 Naming: Pass.

Remaining Blocker

  1. Live CI not green (action_required): Both fork workflow runs at 03884056556a (Host tests and Device tree checks) are in action_required awaiting maintainer approval and have not executed yet. Code, attribution, naming, and hardware evidence are all clean; once CI runs green at this head, this is ready to approve.

@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) changes-requested A reviewer requested changes (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) ci-failing A check failed at the PR head (bot) labels Nov 24, 2026

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

Verdict: FINISH, then merge at 03884056556a: the code is ready; it needs only a row at this head.

Blockers: none in the code. Missing row: none beyond CI: I've approved the two waiting runs, and once they pass this merges. Your J715 evidence covers the halted MTP handoff. Thanks.

Checked: no Apple material, DT only (t8132-j715.dts hands the MTP over as a halted consumer, which pairs with u-boot#69).

@DjDeveloperr
DjDeveloperr dismissed stale reviews from themself November 24, 2026 22:27

Superseded by the review at 0388405

@github-actions github-actions Bot removed changes-requested A reviewer requested changes (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) ci-failing A check failed at the PR head (bot) labels Nov 24, 2026
@kazuhidet

Copy link
Copy Markdown
Contributor Author

About the dt-checks failure at 03884056556a (2 new CHECK_DTBS warnings, 1 removed): both come from the schema, not from the change. The J604 has had the same warnings since it gained this property.

The new warnings are for t8132-j715.dtb chosen:

  • linux-enablement-mac,dapf-halted-handoff joins the list of properties that chosen.yaml doesn't know. The removed warning is the same list without it.
  • dapf-halted-handoff: b'/arm-io/mtp\x00' is not of type ...: the type warning that every string under linux-enablement-mac, already gets.

I checked this locally at the PR head with dtschema 2026.9 (make CHECK_DTBS=y apple/t8132-j715.dtb apple/t8132-j604.dtb):

  • t8132-j604.dtb gives the same two warnings word for word, from linux-enablement-mac,dapf-halted-handoff = "/arm-io/mtp" in t8132-j604.dts.
  • Both trees get the same type warnings for dapf-handoff and dapf-power-on-handoff too.

So the J715 now matches the J604, and the check counts that as new only because the J715 didn't have the property before. A schema for the linux-enablement-mac,* properties under /chosen would clear the warnings for both boards. That's a separate bindings change. I'd rather not add it to this DT-only PR, unless you'd like it here.

@github-actions github-actions Bot added the ci-failing A check failed at the PR head (bot) label Nov 25, 2026
@kazuhidet

Copy link
Copy Markdown
Contributor Author

aurora-silicon/aura#429 is merged (2d31c3d7), which meets the merge-order note in the description. aura main no longer has the board list that skipped the J715, so it hands the MTP over as a halted consumer wherever the tree names it. On the U-Boot path, aurora-silicon/u-boot#69 is merged too.

I haven't booted aura main itself on this J715. Its stage 1 still needs the local-only parts listed in aura#429 (the f0c15a12 revert and the AOP/ATC gates), so the J715 rows here are from main plus those parts.

The only open item here is the dt-checks failure, the /chosen schema gap explained above, which the J604 has as well. Should I add a schema for the linux-enablement-mac,* properties as a separate PR, or would you rather take this one as is?

@DjDeveloperr
DjDeveloperr requested review from a team as code owners November 25, 2026 01:40
@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) and removed ci-failing A check failed at the PR head (bot) labels Nov 25, 2026
@kazuhidet

Copy link
Copy Markdown
Contributor Author

Thanks for #3106 and for updating the branch. At e249596a, dt-checks still reports 1 new and 1 removed warning. Both are the same J715 line, from dtschema's own chosen.yaml:

t8132-j715.dtb: chosen: 'linux-enablement-mac,dapf-halted-handoff', 'linux-enablement-mac,dapf-handoff', 'linux-enablement-mac,dapf-power-on-handoff', 'linux-enablement-mac,disk-boot' do not match any of the regexes: '^framebuffer', '^pinctrl-[0-9]+$'
	from schema $id: http://devicetree.org/schemas/chosen.yaml

I reproduced it locally with dtschema 2026.9:

  • What dt-bindings: chosen: document Apple T8132 DAPF hand-off properties #3106 fixed: the type warnings (... is not of type 'object', 'integer', ...) and the vendor-prefix warning are gone. On J715 and J604 together, the chosen warnings drop from 10 lines to 2.
  • What remains: one line per board, from chosen.yaml itself.
    • That schema comes with dtschema, not with the kernel tree, and it allows no properties beyond its own list and patterns.
    • dt-bindings: chosen: document Apple T8132 DAPF hand-off properties #3106's schema (select: chosen, additionalProperties: true) adds a second schema for the node, but it can't relax the first.
    • linux-enablement-mac,disk-boot isn't described anywhere yet either.
  • Why it shows as new: the J604 has the same line at base. The J715's line at base lists three properties, and this PR adds dapf-halted-handoff to it. So the check sees one line removed and one added, with the same cause as the J604's.

I don't see a way to clear it from the kernel tree alone short of a dtschema change, so I'd leave it as the known chosen.yaml limitation unless you see one.

On the hardware row: the J715 DTB built at e249596a differs from the one I booted, through the changes main brought in, not this PR's lines. For example the actuator node, USB dr_mode = "otg", and several nodes now okay. I haven't booted a DTB from e249596a. If you want a J715 row at this head, I can boot one, but not right away.

@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) and removed needs-hw-row No hardware row at the PR head (bot) labels Nov 25, 2026
AxxzyWasTaken pushed a commit to AxxzyWasTaken/linux that referenced this pull request Nov 25, 2026
Upstream dtschema's chosen.yaml sets additionalProperties: false, so
dt-validate still reports every in-tree /chosen property (even those
documented under Documentation/devicetree/bindings/chosen/*.yaml as in
PR aurora-silicon#3106) as not matching any regex in chosen.yaml. Adding another
documented /chosen property (such as linux-enablement-mac,dapf-halted-handoff
in aurora-silicon#2745 for t8132-j715.dtb) changes the quoted property list in that
warning line, causing apple-dt-check.sh to fail with a false positive.

Fix this without shadowing upstream chosen.yaml:
- Document linux-enablement-mac,disk-boot (used in t8132-jxxx.dtsi) in
  Documentation/devicetree/bindings/chosen/linux-enablement-mac,disk-boot.yaml.
- In scripts/dtc/apple-dt-check.sh, parse properties documented under
  Documentation/devicetree/bindings/chosen/*.yaml for each checked
  revision and subtract only those documented property names from
  'chosen: ... do(es) not match any of the regexes:' lines.

Lines are dropped only when every listed property is documented in
bindings/chosen/*.yaml. Any undocumented /chosen property remains
reported (with singular/plural verb normalized), and all non-/chosen
warnings and schema type/value checks continue to fail as before.

Signed-off-by: Diljit Singh <[email protected]>
@DjDeveloperr DjDeveloperr reopened this Nov 25, 2026
@DjDeveloperr
DjDeveloperr requested a review from a team as a code owner November 25, 2026 07:49
@DjDeveloperr

Copy link
Copy Markdown
Contributor

#3122 (11e708c6c6b8) is now merged on main, documenting linux-enablement-mac,disk-boot and subtracting documented bindings/chosen/*.yaml properties from http://devicetree.org/schemas/chosen.yaml# warnings in apple-dt-check.sh.

Updating or rebasing this branch onto current main will trigger a fresh dt-checks run against the updated script.

@github-actions github-actions Bot added the needs-hw-row No hardware row at the PR head (bot) label Nov 25, 2026
@kazuhidet

Copy link
Copy Markdown
Contributor Author

@DjDeveloperr thanks for #3122. I updated the branch onto main (c4dd42b29450), but dt-checks still fails on the same J715 /chosen line. The reason looks like a mismatch in the filter's schema check, not anything in this PR.

What the CI run shows. In dt-check-warnings from run 45629227461, the documented properties are still there on every T8132 board, in both base and head:

So the filter removed nothing in that run.

Cause. dtschema writes the $id without the trailing #. The filter compares it with CHOSEN_SCHEMA_ID = "http://devicetree.org/schemas/chosen.yaml#", so every /chosen line counts as coming from another schema and is passed through.

I ran CHECK_DTBS locally on this branch, with the same pip install dtschema yamllint pylibfdt as the workflow (it resolved to dtschema 2026.9). The output is:

arch/arm64/boot/dts/apple/t8132-j715.dtb: chosen: 'linux-enablement-mac,dapf-halted-handoff', 'linux-enablement-mac,dapf-handoff', 'linux-enablement-mac,dapf-power-on-handoff', 'linux-enablement-mac,disk-boot' do not match any of the regexes: '^framebuffer', '^pinctrl-[0-9]+$'
	from schema $id: http://devicetree.org/schemas/chosen.yaml

The CI log doesn't print the dtschema version, so I can't confirm the runner got 2026.9. But a filter that removes nothing on any board fits this cause.

Check. On that log (J715 and J713 DTBs), I ran filter_documented_chosen from main's apple-dt-check.sh:

  • as merged: both /chosen lines stay;
  • with the trailing # ignored on both sides of the comparison: both lines are dropped, and the aliases warnings stay;
  • with disk-boot replaced by an undocumented linux-enablement-mac,bogus: the line is kept, rewritten to 'linux-enablement-mac,bogus' does not match …, so strict mode still works.

A minimal fix would be to compare without the fragment, for example:

if schema_id is None or schema_id.rstrip("#") != CHOSEN_SCHEMA_ID.rstrip("#"):

I haven't run the full apple-dt-check.sh across all Apple DTBs with that change. I can open a PR with it, if you'd rather not fold it into something of yours.

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

Verdict at c4dd42b2: two questions before merge.

1. Board or boot state? This hands the MTP over as halted on the J715 only, mirroring the J604. The J713 is the same SoC (T8132, 13-inch Air), and its MTP is handed over running, on stream 1. dt-checks flags the same split as sibling drift: apple,remap-streams on mtp_dart is on the j604 and j715 only, while j623, j624, j713 and j773g have the node without it.

Is "iBoot leaves the MTP stopped" really a property of these two boards, or of the boot path, with the J713 different only because of how it's booted today? Our rules want behaviour chosen by what the hardware or firmware describes, not by board. Ideally the loader would see that the MTP is stopped at handoff (from its DART/ASC state) and pick halted versus running from that, with no per-board dapf-halted-handoff. If it truly is per board (iBoot differs by model), please say so in the commit message, with the evidence: the J715 and J713 ADT or iBoot state of mtp at handoff.

2. dt-checks fails at this head. The new linux-enablement-mac,dapf-halted-handoff adds to the existing unknown-chosen-property warning for j715, and the drift warning above is new. If the property stays, it needs a binding entry, or the existing j604 schema gap fixed for both boards.

The fix itself (the MTP on stream 0 with remap-streams, cold-started by Linux) matches the J604, and your J715 row looks good.

@kazuhidet

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Some new data on question 1, which I couldn't collect before.

1. Board or boot state. This J715 now boots the way the docs describe for an OS at EL2:

  • a padded aura Stage 1 (main 26c1a85b, --execute-window, kcrz 0x920c000, the J713 value in docs/j713.md);
  • then aura Stage 2 → Linux, with no U-Boot.

So the loader path is now the aurora-installer one. On that path, with linux main aa3351bc and main's J715 tree (the J713 layout, MTP on stream 1), the MTP doesn't start on any of three boots:

rtkit-helper 394600000.mtp: RTKit: Initializing (protocol version 12)
apple-dart 394800000.iommu: translation fault: SID:0 write BPF reject at 0x100ffff0000 (status 0x0000310a)
rtkit-helper 394600000.mtp: RTKit: IOP power acknowledgment failed: -62

There is no keyboard or trackpad. With the stream 0 layout this PR uses (the MTP and mtp_hid on stream 0), the same kernel and loader bring both up in 2.7 s.

What this J715 has shown, on every chain I can boot:

  • the old m1n1 Stage 1: cpu_control read 0x0 at Linux's first start;
  • the padded aura Stage 1: the DART fault above;
  • through U-Boot, earlier in this thread.

In every case iBoot left the MTP stopped.

What I can't tell from here is why the J713 gets a running MTP. I have no J713. If the J713's rows go through U-Boot, U-Boot may be the one starting it. A J713 boot on Stage 1 → aura → Linux would separate board from path.

On detecting it in the loader: aura already checks the CPU state for a consumer named in dapf-halted-handoff (asc_cpu_running()), and skips the halted filter if it is running. What stays static is the stream (0 versus 1) in the tree. If you'd rather drop the per-board property, one way would be for aura to publish what it saw (halted or running) and for the kernel or the tree to choose the stream from that. I'm happy to try that as a follow-up, but it is a larger change than this PR. Until then, the board property is the only thing that boots the J715.

I'll add the evidence to the commit message: the J715 states above, the boot chains, and that the J713 was not observed.

2. dt-checks.

  • The /chosen line: that's the filter mismatch from my comment of 11-26 (the schema $id without the trailing #), so documented properties aren't subtracted on any board.
  • The sibling-drift warning: remap-streams is on mtp_dart for the j604 and j715 only. That is the halted layout itself: those two boards cold-start the MTP on stream 0. I can add a comment next to the property saying so. Would that be enough for the drift check, or does the check need an allow-list entry?

@johnturek

Copy link
Copy Markdown

I am preparing a focused follow-up for the chosen.yaml schema-ID mismatch reported here on November 26: normalize only an optional empty fragment, retain unknown-property and other-schema warnings, and add production-filter fixtures to dt-checks. The fixtures reproduce the reported failure and pass with the normalization, including the actual four-property J715 diagnostic. No device-tree or runtime changes are included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:bringup Area from CODEOWNERS (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants