Repository navigation
receipts: DT bindings for the ANE nodes of aurora-silicon/linux#65 #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,189 @@ | ||
| # DT bindings for the ANE nodes of aurora-silicon/linux#65 (2026-10-01) | ||
|
|
||
| ## Result | ||
|
|
||
| [aurora-silicon/linux#65](https://github.com/aurora-silicon/linux/pull/65) | ||
| adds Neural Engine nodes for T8103, T6000 and T6021 with no binding, and | ||
| its T602x ANE mailbox fails `apple,mailbox.yaml`. Two binding commits now | ||
| sit on the PR's head branch (`joshuaswarren/linux` `ane-dt-polltx-aurora`), | ||
| pushed as a fast-forward from `bc41726b524d`: | ||
|
|
||
| | Commit | Subject | | ||
| | --- | --- | | ||
| | [`13ed770050d9`](https://github.com/joshuaswarren/linux/commit/13ed770050d9a18320fbbd044c618c5787955b12) | `dt-bindings: npu: apple,ane: Add the Apple Neural Engine` | | ||
| | [`30071bf4d66f`](https://github.com/joshuaswarren/linux/commit/30071bf4d66f1f199d90992d917bb0a2849ee986) | `dt-bindings: mailbox: apple,mailbox: Allow the ANE mailbox variant` | | ||
|
|
||
| The PR head is now `30071bf4d66f1f199d90992d917bb0a2849ee986` (6 commits). | ||
| GitHub compare `bc41726b...30071bf4`: ahead 2, behind 0, three files. | ||
|
|
||
| With both commits, `dtbs_check` over the 111 Apple DTBs drops from 9002 | ||
| to 8927 lines. The 75 removed lines are all on ANE nodes, nothing is added, | ||
| and the dtc W=1 warnings are unchanged. | ||
|
|
||
| ## The schemas | ||
|
|
||
| **`Documentation/devicetree/bindings/npu/apple,ane.yaml`** (new). Neither | ||
| mainline nor the Asahi trees (`asahi`, `asahi-wip`, `asahi-wip-7.2`) have | ||
| an Apple ANE binding. Mainline keeps neural processing units in | ||
| `bindings/npu/` (`arm,ethos.yaml`, `rockchip,rk3588-rknn-core.yaml`), and | ||
| #65's tree has that directory, so the schema goes there. `bindings/misc/` | ||
| holds no Apple file. | ||
|
|
||
| - `compatible`: one of `apple,t8103-ane`, `apple,t6000-ane`, | ||
| `apple,t6021-ane`, as the #65 nodes use them (no fallback). | ||
| - Always required: `reg` + `reg-names` (`engine`), one interrupt named | ||
| `ane`, three `iommus`, `power-domains`. | ||
| - `apple,t6021-ane`: three `reg` entries (`engine`, `pmgr`, `set`), eight | ||
| power domains, and required `resets`, `mboxes` and `memory-region` (one | ||
| each). | ||
| - T8103 and T6000: exactly one `reg`, five power domains, and no | ||
| `resets`, `mboxes` or `memory-region`. | ||
| - `additionalProperties: false`. Two examples (T8103, T6021). | ||
| - MAINTAINERS: ARM/APPLE MACHINE SUPPORT lists each Apple binding file by | ||
| name (no glob), so the binding commit adds | ||
| `F: Documentation/devicetree/bindings/npu/apple,ane.yaml` there. | ||
|
|
||
| **`apple,mailbox.yaml`** (changed). The poll-TX commit of #65 (`4ffb24d36001`) | ||
| changes only `drivers/soc/apple/mailbox.c` and its header. The binding | ||
| still required the four ASC interrupts in the order `send-empty`, | ||
| `send-not-empty`, `recv-empty`, `recv-not-empty`. | ||
|
|
||
| - New `oneOf` entry: `apple,t6021-ane-mailbox` with the | ||
| `apple,asc-mailbox-v4` fallback. | ||
| - For that compatible, `interrupt-names` starts with `recv-not-empty`, and | ||
| `send-empty`, `send-not-empty` and `recv-empty` may follow in that order. | ||
| #65's node (`recv-not-empty` alone) and the follow-on branch | ||
| `t6021-ane-node` (`recv-not-empty`, `send-empty`) both fit. | ||
| - The top-level interrupt minimum goes from 2 to 1. The other variants | ||
| keep their limits. The four-interrupt rule moves into its own `if` that | ||
| excludes the ANE and AOP setup mailboxes. The AOP setup mailbox gets | ||
| `minItems: 2`, because before this change only the top-level minimum | ||
| gave it that limit. The boundary case `F_mb_aop_1irq_2names` caught this | ||
| on the first draft. | ||
|
|
||
| ## Validation | ||
|
|
||
| Build host: x86_64, Debian 12. Tree: sparse worktree, kernel 7.1.12 | ||
| (aurora-wip plus #65), arm64 defconfig, kbuild `dtc` 1.7.2-g53373d13, | ||
| dtschema 2026.9 (pylibfdt 1.7.2.post2, jsonschema 4.26.0, yamllint 1.38.0). | ||
|
|
||
| ```sh | ||
| make ARCH=arm64 O=<out> dt_binding_check DT_SCHEMA_FILES=apple,ane.yaml | ||
| make ARCH=arm64 O=<out> dt_binding_check DT_SCHEMA_FILES=apple,mailbox.yaml | ||
| make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=<out> W=1 CHECK_DTBS=y -j8 -O apple/<each of 111>.dtb | ||
| ./scripts/checkpatch.pl --strict patches/000{1,2}-*.patch | ||
| ``` | ||
|
|
||
| | Check | `bc41726b` (PR head before) | `30071bf4` (PR head now) | | ||
| | --- | --- | --- | | ||
| | `dt_binding_check`, both schemas | not applicable | exit 0, no findings ([log](dt_binding_check.txt)) | | ||
| | dtc W=1 warning lines | 533 | 533, identical list | | ||
| | dt-validate lines (`.dtb:`) | 9002 | 8927 | | ||
| | ANE lines | 75 ([list](base.ane-lines.txt)) | 0 | | ||
| | Lines added | | 0 ([diff](findings.diff): 75 removed, 0 added) | | ||
| | checkpatch --strict | | 0 errors, 0 warnings, 0 checks per commit ([output](checkpatch-strict.txt)) | | ||
|
|
||
| The 75 ANE lines at `bc41726b`: | ||
|
|
||
| ```text | ||
| 5 ane@26bc04000 failed to match any schema ['apple,t8103-ane'] | ||
| 6 ane@285c04000 failed to match any schema ['apple,t6000-ane'] | ||
| 8 ane@284000000 failed to match any schema ['apple,t6021-ane'] | ||
| 8 mailbox@285408000 failed to match any schema ['apple,t6021-ane-mailbox', 'apple,asc-mailbox-v4'] | ||
| 8 mailbox@285408000 compatible: 'oneOf' conditional failed | ||
| 8 mailbox@285408000 interrupt-names:0: 'send-empty' was expected | ||
| 16 mailbox@285408000 interrupt-names: ['recv-not-empty'] is too short | ||
| 16 mailbox@285408000 interrupts: [[0, 0, 884, 4]] is too short | ||
| ``` | ||
|
|
||
| One side effect in the indented explanation text, not in the findings: 28 | ||
| explanation lines `'apple,t6021-ane-mailbox' was expected` now appear | ||
| inside `compatible: 'oneOf'` errors that fail the same way before and | ||
| after, on the `apple,t6030-asc-mailbox` and `apple,t6031-asc-mailbox` | ||
| nodes. Those compatibles have no binding in this tree. dt-validate lists | ||
| every `oneOf` alternative, so the new entry shows up there | ||
| ([explanation-lines.diff.txt](explanation-lines.diff.txt)). | ||
|
|
||
| **Boundary cases** ([boundary-cases/](boundary-cases/)): 22 small DTBs | ||
| validated with `dt-validate -m` against each tree's processed schema. At | ||
| `30071bf4` all 22 give the expected verdict | ||
| ([result](boundary-cases/result-30071bf4.txt)). Valid nodes: T8103 ANE, | ||
| T6021 ANE, ANE mailbox with one or two IRQs, ASC with four, AOP with two. | ||
| Invalid nodes: T8103 with three `reg` entries, `mboxes` or two `iommus`; | ||
| T6021 with one `reg`, five domains, no `mboxes` or an unknown compatible; | ||
| ANE mailbox with `send-empty` first, without the fallback or with | ||
| `iommus`; ASC with one or two IRQs; M3 with one; AOP with one. At | ||
| `bc41726b` only the four valid ANE cases change verdict (they fail); every | ||
| case for the existing variants gives the same verdict as at `30071bf4` | ||
| ([result](boundary-cases/result-bc41726b.txt)). | ||
|
|
||
| ## Deviations from the brief | ||
|
|
||
| - Path `npu/apple,ane.yaml` and subject prefix `dt-bindings: npu:` | ||
| instead of `misc/`. The brief allowed the directory upstream uses. No | ||
| Apple ANE binding exists anywhere, but mainline's NPU directory is `npu/`. | ||
| - Subjects use the kernel's capitalised verb (`Add`, `Allow`), as the | ||
| existing `apple,mailbox.yaml` history does. | ||
| - The ANE mailbox schema accepts the four ASC names only as an ordered | ||
| prefix starting with `recv-not-empty`, not in any order. | ||
|
|
||
| ## What the maintainers will question | ||
|
|
||
| 1. **Patch order.** The bindings come after the DTS commits that use them. | ||
| An upstream series puts bindings first. Fixing that needs a rebase, | ||
| which the no-force rule for this branch rules out. | ||
| 2. **Node name.** `ane@` is not a generic node name. DT reviewers ask for | ||
| `npu@`. The DTS commits use `ane@`, and the binding examples match them. | ||
| 3. **T6021 compatibles in shared die 0 code.** `t602x-die0.dtsi` serves | ||
| T6020, T6021 and T6022. In that file the DART and NCO use `apple,t6020-*`, | ||
| but the ANE and its mailbox use `apple,t6021-*`, so an M2 Pro would carry | ||
| an M2 Max compatible. The omarchy-ane driver already matches | ||
| `apple,t6020-ane`. Reviewers will also ask why the mailbox needs a block | ||
| specific compatible (`apple,t6021-ane-mailbox`) next to | ||
| `apple,t6020-asc-mailbox`. The answer is that the new compatible keeps | ||
| the relaxed interrupt rule away from the other ASC mailboxes. | ||
| 4. **Power domains without names.** There are five or eight domains, and | ||
| their meaning and order differ per SoC (T8103: set1-5; T6000: sys_cpu, | ||
| set1-4; T6021: sys_mpm, td, base, set1-4, cpu). The schema gives only | ||
| counts. Expect a request for `power-domain-names` or per-item | ||
| descriptions. | ||
| 5. **Overlapping `reg`.** The T6021 `engine` range (32 MiB at | ||
| 0x284000000) contains the mailbox (0x285408000) and the three DARTs | ||
| (0x285800000-0x285820000). `pmgr` (0x28e080000, 0x4034 bytes) overlaps | ||
| the PMGR syscon node (0x28e080000, 0xc000 bytes), and `set` is the next | ||
| window up, at PMGR + 0xc000. dtc W=1 does not flag overlap between | ||
| nodes. Reviewers will ask why the driver maps PMGR registers itself when | ||
| it also has the power domains. | ||
| 6. **Shared interrupt.** AIC 884 is the `ane` interrupt of the engine node | ||
| and `recv-not-empty` of the mailbox node. | ||
| 7. **Maintainer address.** The schema's maintainer is a GitHub noreply | ||
| address. An upstream binding needs an address that receives mail. | ||
| 8. **No in-tree user.** No in-tree driver matches any of the three | ||
| compatibles. The users are the out-of-tree omarchy-ane (T8103, T6000) | ||
| and ane_t6021 modules. | ||
| 9. **Hardware evidence.** As the #65 commits record it: the T8103 nodes | ||
| equal the live tree of an M1 MacBook Pro (j293), and the T6000 nodes | ||
| the overlay that booted on an M1 Max (j316c), both with the driver | ||
| bound. The T6021 node is the tree an out-of-tree driver ran on the M2 | ||
| Max. M1 Pro, M1 Ultra, M2 Pro and M2 Ultra have not run them. This | ||
| change was checked statically only; nothing was booted. | ||
|
|
||
| ## Stale text in the #65 description (not edited) | ||
|
|
||
| The PR body still says "Four commits". It also says that checkpatch on | ||
| the DT commits reports the four ANE compatibles as undocumented (true per | ||
| commit, but not at the series head now), and ends with "I can add both | ||
| bindings if you want them before merge". These need updating when the PR | ||
| is next edited. | ||
|
|
||
| ## Receipts | ||
|
|
||
| - Private notebook entry | ||
| `entries/AuroraBinding/20261001T135457Z-ct-pr65-ane-binding.md` and | ||
| `artifacts/AuroraBinding/verify/` (`SHA256SUMS`): check script, both make | ||
| logs and normalised findings (xz), counts, dtc warning lists, ANE line | ||
| lists, the findings diff, the boundary cases, checkpatch and | ||
| dt_binding_check output, patches, identity record. | ||
| - This directory: the two patches, the findings diff, the 75 base ANE | ||
| lines, the explanation-line diff, checkpatch and dt_binding_check output, | ||
| the boundary cases with both results. Hashes in `SHA256SUMS`. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| 61ca107d68256942bbc9207d2efb73ff4c673128a146294b3ddfb00b0ee48242 ./README.md | ||
| 2f5892e497414a64e4435240b4bfe472439721038b864326396e92a795a4a9e7 ./base.ane-lines.txt | ||
| 7e0841cb6abbfc77798dd4fa13fded4b903fdf6fbfb7c83baebaf17e91e95fcb ./boundary-cases/F_ane_badcompat.dts | ||
| b9e5046a20436ba2352b494fea4821d5a6cca4eb5be5d68f3f56673757cb2717 ./boundary-cases/F_ane_t6021_1reg.dts | ||
| d6d5a50c58a4fb38157bf48ce6731f48cb15a4161acb5db385892a688f98a189 ./boundary-cases/F_ane_t6021_5pd.dts | ||
| c5d60e49a327d6d43a5394eb07c5b253d10b02cefb47aa61653181d2cce6e970 ./boundary-cases/F_ane_t6021_nombox.dts | ||
| 9f7ec23f2f76292a3643f5a92555e0829e3926b76d4da755371060bad27430e4 ./boundary-cases/F_ane_t8103_2iommu.dts | ||
| 505aa22c9947c51c5ca9c54f95da259df5021bccd36af1a02712d2807ff8ff1d ./boundary-cases/F_ane_t8103_3reg.dts | ||
| 6ec2186c896931a0ea519ba6d4cee250dc07fadb8e4baf7aaaf17fbf3d332479 ./boundary-cases/F_ane_t8103_mbox.dts | ||
| 3c343a7486d88a93ba57a6b985b54e627af38829bb8b3ca1654347050496b212 ./boundary-cases/F_mb_ane_iommus.dts | ||
| ffbf4466534ed1944f46a11d2b51022c78bbae4c5d54eb1d4594fba05505bf44 ./boundary-cases/F_mb_ane_nofallback.dts | ||
| 79488e53b2f4a80683ff255fcc13a818589435c8f958d9c9bbea6156c384f3c9 ./boundary-cases/F_mb_ane_wrongfirst.dts | ||
| 971b0bfb21c539a6bde419dd45df99519fad9939b1536812251361a94ace3a60 ./boundary-cases/F_mb_aop_1irq.dts | ||
| 3d51458e54055105d64a7b410aacefa973b88b16ddaaf3e089083c2ba3551d0b ./boundary-cases/F_mb_aop_1irq_2names.dts | ||
| 190b74dbce93bd05c7ea186aed96dc2613f266241fb9f6bb8c1dc829b1a91ce0 ./boundary-cases/F_mb_asc_1irq.dts | ||
| 7587b2cc41c219ddfdeba2a9bc461cbd07999ecd3f86309ac19ae96083ec21af ./boundary-cases/F_mb_asc_1irq_4names.dts | ||
| ff45bc30b13a3de70b66584a768338859614b383715c014621c65787562ac0d0 ./boundary-cases/F_mb_asc_2irq.dts | ||
| 98c3f1e78bbc3ae25d3ef7f57c9b08f1256cd8c5575ed9156c68459f8e380599 ./boundary-cases/F_mb_m3_1irq.dts | ||
| 69718510087a9cc5d8388ec9e2c9a3b2d904367629595baacda43f02691f33b2 ./boundary-cases/P_ane_t6021.dts | ||
| edaafc3c130ea38242097084650529e7bbea6fffa04cfd9d5df83dc5fb5b3afa ./boundary-cases/P_ane_t8103.dts | ||
| fff7049df9062a44ed92645d33ba6910e6df32e6fbb7565f4a49ce6955c6e151 ./boundary-cases/P_mb_ane_1.dts | ||
| 3f23234056fb18daeab49e5ba063919f38dbafbc9233e8c33cbf6a5fbe91c1b5 ./boundary-cases/P_mb_ane_2.dts | ||
| dbda3e851a7fdd0e4209bb836719db6c3770f4896db384bb46b6a70514e730fc ./boundary-cases/P_mb_aop_2irq.dts | ||
| 3766d464ad9d50f6d27c313143a0394f414ac7c309f405a47db4051977f9ae79 ./boundary-cases/P_mb_asc_4irq.dts | ||
| a2d886d94502e85a2e136ecb19c832824a77fd3797ef6a551b9fc8ee9996cf7b ./boundary-cases/common.dtsi | ||
| 3237dc33464527e1fa573070aa5aeca328799de9b02123bd5a3d965683a5615f ./boundary-cases/result-30071bf4.txt | ||
| b512e2b3f86d98f83ef5a4ba60d2f697c545e2884b7922a7b416da0ae5002c61 ./boundary-cases/result-bc41726b.txt | ||
| 1f179bb0c019c4be173f8558b1ec183982e2704b4f110bb58040a2c544f3fbd5 ./boundary-cases/run.sh | ||
| ee60f995406fe351a3aaaef877d3aa359de755447ac8f90793d4fc68f57917ff ./checkpatch-strict.txt | ||
| cd58c1846b237519cec5e95b48ec5815e411957bbc6e28ee6e09fa0d67dd24e4 ./dt_binding_check.txt | ||
| 1a4febf85675396557f017c3171e1fadb931229e87a0c6055c5b61f83e0266ff ./explanation-lines.diff.txt | ||
| 8ca66f882ca6462deed82f65e33841be7feab74b0f7b0e0011a216c5922e63bb ./findings.diff | ||
| 445ef53e59c177faa314f7f0f43930d694b7e20a9453579211d246bf8711dd4c ./patches/0001-dt-bindings-npu-apple-ane-Add-the-Apple-Neural-Engin.patch | ||
| c4336a1d262c6b5208077bb628521231bff4df02946491b26c9afc6a68262c30 ./patches/0002-dt-bindings-mailbox-apple-mailbox-Allow-the-ANE-mail.patch |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git show --format=fuller 4de389ce62e7931818e2fd4d59b14a4cdbdc20adrecords both the author and committer asCodex <codex@openai.com>. This violates the repository’s standing identity requirement, so the commit must be recreated with Joshua Warren’s required name and email before it can be accepted.AGENTS.md reference: AGENTS.md:L252-L257
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked against the commits API: the only commit on this PR, aa633d1, has author and committer Joshua Warren 816217+joshuaswarren@users.noreply.github.com. Commit 4de389ce62e7 does not exist in this repository (GET /commits/4de389ce… returns 422 "No commit found"), so the finding refers to a commit outside this PR. No change needed.