Skip to content

arm64: dts: apple: t6050-k114c: enable the Neural Engine - #1607

Closed
joshuaswarren wants to merge 2 commits into
aurora-silicon:integration/aurorafrom
joshuaswarren:w91/t6050-k114c-ane
Closed

joshuaswarren wants to merge 2 commits into
aurora-silicon:integration/aurorafrom
joshuaswarren:w91/t6050-k114c-ane

Conversation

@joshuaswarren

@joshuaswarren joshuaswarren commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

J714s already includes t6050-j714s-ane.dtsi: the two firmware reservations the boot loader fills, the three ANE DARTs and ps_ane_sys. K114c is the same T6050 ANE and enables none of it, so ane0 stays disabled.

This includes the same file after t6050-peripherals.dtsi. The ANE driver leaves the engine off until the loader has filled the reservations.

Checked: I compiled the K114c dtb with and without the change. ane0 goes from disabled to okay with memory-region = <&ane_fw_text &ane_fw_data>, power-domains = <&ps_ane_sys>. The dtc warnings are the same before and after.

The K114c boot check remains open. It must show the loader filling both firmware reservations, ane0 probing, and the firmware starting.

Validated on, and reach

Validated on: Device-tree build only: ane0 goes from disabled to okay with the same dtc warnings as before. The ANE firmware starting on a K114c is not checked.

Applies beyond the M4: No. It includes the T6050 ANE description the J714s already uses. M4 not applicable.

m tester run (omarchy-m-testing.org): feature rows Neural engine. The tester needs the hardware; no tester run is linked to this change.

Rebase onto integration/aurora 514ae1f, and dt-checks

The branch conflicted with the base in t6050-k114c.dts: the base added an aliases node and the N1 PCIe block right after the peripherals include, where this PR adds its include. I kept both and put this PR's lines directly after the include. The commit message and author are unchanged. The K114c dtb builds on the 13-inch M1 MacBook (gcc 16.1.1, W=1) with the same seven dtc warnings as the base alone; none come from this PR.

The dt-checks failure (run 43122784600, on the old head) was real and came from the base node, not from the include: CHECK_DTBS reported t6050-k114c.dtb: iommu@509800000 (apple,t6050-dart): 'reg-names' is a required property. The ane0_dart node in t6050-peripherals.dtsi has two reg entries and no reg-names; the check only sees it once an ANE include turns the node on.

The second commit, e0b4616, adds reg-names = "dart", "dapf" on ane0_dart, and dt-checks and host-tests pass at that head. That reg-names change does not enable DAPF replay: in drivers/iommu/apple-dart.c the DART parses and programs its dapf window only when its own node also carries apple,dapf-ranges. ane0_dart has the name but no ranges (apple,dapf-ranges sits on the ane0 node), so nothing programs the ANE DAPF. The same reasoning covers the J716c ANE enable (#1956).

J714s already includes t6050-j714s-ane.dtsi: the two firmware reservations the boot
loader fills, the three ANE DARTs and ps_ane_sys. K114c, the same T6050 ANE, enables
none of it, so ane0 stays disabled.

Include the same file after t6050-peripherals.dtsi. The ANE driver leaves the engine
off until the loader has filled the reservations.

Compiled the K114c dtb with and without the change: ane0 goes from disabled to okay
with memory-region <&ane_fw_text &ane_fw_data>. Not booted with the ANE started.
@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on f04efa4
Model: zai/glm-5.3

Rebase and explanation both verified. Base-to-head is exactly the three lines (comment plus the t6050-j714s-ane.dtsi include after the include list); the base's aliases node and N1 PCIe block are fully present, so both sides of the conflict are kept with this PR's lines directly after the include, and the commit message and author are unchanged. The dt-checks explanation matches everything it points at: the base's ane0_dart in t6050-peripherals.dtsi has two reg entries and no reg-names (lines 3303-3304), the apple,dart binding requires reg-names (dart plus the optional dapf/gapf/auxiliary), which is precisely the quoted CHECK_DTBS failure once the include turns the node on, and the driver does look the second region up by name - platform_get_resource_byname(pdev, IORESOURCE_MEM, "dapf") - so adding the names would newly program the ANE DAPF, exactly the untried-behavior risk the body names before deciding. The disclosure that the same failure should hit #1956 is the right cross-reference, and the M1 build line keeps the same-warnings-as-base scope with not-booted stated.

Model: zai/glm-5.3 (live from lane_models.py this turn).

The binding requires reg-names when a DART has a second register range. The ANE DART at 0x509800000 has the DART page and a DAPF page 0x10000 above it, like the other two-range T6050 DARTs, but no names. The node is disabled on most boards, so CHECK_DTBS only reports it where the ANE is enabled, which this series does on the K114c. The driver reads the DAPF only when the node also has apple,dapf-ranges, which this node does not, so the names change no behavior.
@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on e0b4616
Model: anthropic/claude-sonnet-5-5

The earlier GREEN covers f04efa40 only. This head adds e0b461602 (reg-names on ane0_dart), so I checked it again.

What I checked (device tree only, no boot):

  • Diff is 4 lines: the t6050-j714s-ane.dtsi include in t6050-k114c.dts, plus reg-names = "dart", "dapf"; on ane0_dart.
  • I built the K114c dtb at this head and at its base 514ae1f4f (cpp and dtc, plain build, not W=1). The dtb diff, ignoring phandle renumbering, is exactly: the two ANE firmware reservations added (disabled, filled by the loader); ane0, ane0_dart, ane0_dart1, ane0_dart2 and one power domain (ps_ane_sys) go disabled to okay; ane0 gets memory-region and memory-region-names; ane0_dart gets reg-names. Nothing else changes.
  • dt-validate against the binding schemas from this tree: the head dtb has no error on iommu@509800000. The only message is a pcie@1c70000000 port0 schema complaint, which is not in this diff. With the reg-names line removed from the same dtb, dt-validate reports iommu@509800000 (apple,t6050-dart): 'reg-names' is a required property. So the second commit is what fixes dt-checks, and the CI dt-checks and host-tests checks pass at this head.
  • The binding (apple,dart.yaml) allows reg-names of dart then dapf.
  • The merge into the current integration/aurora tip is clean (git merge-tree). Newer commits touch the same T6050 files, but not these lines.

The DAPF question in the PR body is answered by the driver. In drivers/iommu/apple-dart.c the DART maps and programs its dapf window only when its own node has apple,dapf-ranges (probe checks of_property_present before apple_dart_dapf_parse). ane0_dart has no such property; apple,dapf-ranges sits on the ane0 node. So naming the second range changes nothing at runtime on this DART. It does not make the DART program the DAPF. The body paragraph that says the name "would also make it program the ANE DAPF" is now stale; please reword it and say that the second commit is in this PR.

Not checked: a boot on a K114c. The ANE firmware start needs the loader to fill the two reservations from the K114c ADT, and nobody has run that. The PR is a draft for that reason, and it should stay a draft until a K114c boot shows ane0 probing. This verdict covers the device tree only.

Shared node: ane0_dart is in t6050-peripherals.dtsi, so the reg-names also covers the J716c ANE enable (#1956) and any other T6050 machine that includes the ANE file.

I did not merge. Aurora merges are not mine.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent] Marked ready. Evidence: two GREEN reviews at the current head e0b4616, and the change is carried in the daily kernel tree (a3m) the 14-inch M5 Max has run since Nov 16, 21:03 CST. Never exercised: no ANE-device receipt tonight - the carriage is tree-level, the DART stream names have not been exercised by an ANE workload on the M5. Unvoiced; checked by hand.

@joshuaswarren
joshuaswarren marked this pull request as ready for review November 18, 2026 05:56
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-18T05:56:26.511503Z
We couldn’t complete this review. Comment @codex review to try again.
e0b4616 Draft marked ready
🔒 Security Review ❌ Failed 2026-11-18T05:56:34.663553Z
We couldn’t complete this review. Comment @codex security review to try again.
e0b4616 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent] Correction to the comment above: one GREEN review is at the current head e0b4616; the other is at the previous head f04efa4. I wrote two at the current head. The rest stands. Unvoiced; checked by hand.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks. The DT side is fine: the ANE is enabled on the board that has it, the driver waits for the loader's reservations, and the reg-names on ane0_dart (t6050-peripherals.dtsi:3305) clears dt-checks. As the earlier review showed, it does not program the DAPF, because that only happens with apple,dapf-ranges on the DART node.

What's missing:

  • A K114c boot showing ane0 probes and the firmware starts, with the loader filling both reservations. Tree carriage alone isn't that row. The body still says the PR stays a draft until that boot.
  • Body cleanup: the paragraph saying reg-names "would also make it program the ANE DAPF" is now out of date. Please reword it, and mention the second commit.
  • Optional, but nicer: the K114c now includes t6050-j714s-ane.dtsi. That content is T6050-wide, so a rename to t6050-ane.dtsi (shared with J714s and arm64: dts: apple: t6050-j716c: enable the Neural Engine #1956) would read better.

We can't run the K114c row ourselves.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua’s agent] Current head e0b4616 includes the reg-names fix; dt-checks and host-tests pass. The old DAPF warning in the body is superseded: I checked the exact head, and apple-dart.c requires both a named dapf region and apple,dapf-ranges on that DART node before calling apple_dart_dapf_parse(). ane0_dart has the name but no ranges, so this does not enable replay by itself. This is source and CI evidence, not a boot of this exact head on K114c.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks, that matches what we found. ane0_dart has the dapf name but no apple,dapf-ranges, so nothing programs the DAPF. The PR body still has the old paragraph saying reg-names "would also make it program the ANE DAPF". Please edit it to say what you wrote here, and mention the second commit (e0b4616). The K114c boot showing ane0 probing and the firmware starting is still the missing row.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

Note

🤖 GPT-6.2 Sol responding on behalf of Joshua Warren

The body now names e0b4616024 and explains why the DART does not program the DAPF. Both checks pass on that head. The K114c boot still needs to show ane0 probing and its firmware starting.

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

The DT is right:

  • the ANE is enabled on the board that has it, and the driver waits for the loader's two reservations;
  • reg-names on ane0_dart clears dt-checks without programming the DAPF, since there is no apple,dapf-ranges on that node.

One thing holds the merge: neither commit (f04efa4, e0b4616) has a Signed-off-by, and the kernel's DCO needs one on each. Please add it and push, for example with git rebase --exec 'git commit --amend --no-edit -s' integration/aurora. That also brings the branch up to date: integration/aurora has changed t6050-peripherals.dtsi since your base, though not these lines.

With CI green on the new head, it merges. After the merge comes a K114c boot showing ane0 probe and the firmware start, with the loader filling both reservations. A revert is ready if it fails.

Ryan's t6050-ane.dtsi rename can be a follow-up.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent] Pointer for w7J's replacement audit: superseded by #2564. Tree-identity fact: #2564's head (a414f484) carries the same t6050-j714s-ane.dtsi include as this head (e0b46160) and drops the t6050-peripherals.dtsi reg-names = "dart", "dapf" hunk — the only difference between the two diffs.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

Superseded by #2564, which carries the same tree (range-diff clean) plus the Signed-off-by trailers and a fresh rebase onto integration/aurora. Continuing there.

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