Skip to content

arm64: dts: apple: describe the T603x Neural Engine; accel/ane: T603x clean refusal - #4022

Merged
DjDeveloperr merged 8 commits into
mainfrom
m3-media/ane-2331-fixed
Dec 3, 2026
Merged

DjDeveloperr merged 8 commits into
mainfrom
m3-media/ane-2331-fixed

Conversation

@joshuaswarren

@joshuaswarren joshuaswarren commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Replacement for #2331: same change set rebased onto current main, with the
two commits that carried a placeholder author and no Signed-off-by recreated
with the correct author and trailer.

Describes the T603x (M3 Pro/Max) Neural Engine — power domains, DARTs,
mailboxes, preloaded firmware — and keeps the accel/ane driver refusing
T603x cleanly until a platform is qualified. Every ANE node stays
disabled, as on T8122, so no power domain can be pinned by a consumer
that never binds; they enable per board together with driver support.

Closes #2331

Tested: drivers/accel/ane builds W=1 with 0 warnings (clang, arm64); all
seven T603x and five T8122 DTBs build, with T8122 byte-identical to main;
dt_binding_check and CHECK_DTBS clean on apple,ane.yaml.
Risk: T6030, T6031, T6034 and T6032 — two-way, a plain revert undoes it; every ANE
node is disabled and the driver platform is unqualified.

@joshuaswarren
joshuaswarren requested review from a team as code owners December 3, 2026 00:41
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-03T00:51:23.708065Z a51b3e8 PR opened
🔒 Security Review ✅ Completed 2026-12-03T00:52:41.525252Z a51b3e8 PR opened
ℹ️ 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.

@github-actions github-actions Bot added area:media Area from CODEOWNERS (bot) area:platform Area from CODEOWNERS (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Merge readiness at dcb002b6: not ready yet

Check Detail
CI at head running running: KUnit ane-boot ane-pm
Review ok approved by DjDeveloperr, satchlj
Requested changes ok none
Hardware row at head ok comment at dcb002b6
Conflicts ok none
PR text ok Risk: two-way · T6030, T6031, T6034 and T6032 — , a plain revert undoes it; every ANE node is disabled and the driver platform is unqualified.

Areas: area:media, area:platform

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

@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 replacement still carries the binding failure from #2331. For both T6030 and T6031, the firmware-property exclusion in apple,ane.yaml applies because neither compatible is in its allowlist. It forbids apple,ane-type and apple,firmware-preloaded, which the new branch requires for the same nodes. A T6030 or T6031 node cannot satisfy both branches. Include both compatibles in that allowlist and validate the T6030 and T6031 nodes.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a51b3e8dcb

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 577 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&ps_ane_sys>;
status = "okay";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep the unqualified ANE's DARTs disabled

On M3 Pro with CONFIG_APPLE_DART enabled, these nodes probe independently of the ANE driver, so the new ANE preflight refusal does not prevent hardware access. The generic path in apple_dart_probe() calls apple_dart_hw_reset() for unlocked DARTs, disabling DMA and clearing their translation tables before any ANE backend has acquired ownership. This also reintroduces the boot-hang condition explicitly documented in t8122-peripherals.dtsi:515–518: enabled ANE DART nodes were reported to hang an M3 Pro. Keep these suppliers disabled until a qualified acquisition path can safely initialize them; refusing only the ANE driver is insufficient.

Useful? React with 👍 / 👎.

@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 a51b3e8dcbc2b8801ae69ed23b8053445759f902
Blockers: numbered below. 1-3 come from the rebase; the T603x device-tree files are the same as at #2331's 2bda8f1b.
Checked: every T603x register window, interrupt, power state and ane-type against the restore-image ADTs of all seven boards; driver paths; binding; builds of this head merged with main. No AI attribution, no Apple material, no runtime switch, no board gate (selection is by compatible).

  1. drivers/accel/ane/ane_fw_platform.c:193-194 does not compile. The conflict resolution lost };, the blank line and /* between ane_t8112_platform and the T603x comment (error: use of undeclared identifier 'M3', 3 errors), so no kernel with CONFIG_DRM_ACCEL_ANE=m builds. It starts in 75824cf3. Fix: put those three lines back (as in #2331's 2bda8f1b).
  2. t8122-peripherals.dtsi:464-534 and t8122-pmgr.dtsi describe the T8122 ANE a second time. main already has it. dtc merges the two copies silently: the T8122 ane node gains mboxes, and a second status = "disabled" comes after the first block. It starts in 00c42a75. Fix: drop both T8122 hunks; with that, all five T8122 DTBs are byte-identical to main.
  3. apple,ane.yaml rejects every T603x node. CHECK_DTBS gives 18 new errors over the seven T603x DTBs (hosted dt-checks reports the same 18).
    • Add apple,t6030-ane and apple,t6031-ane to the not: contains: list (after apple,t8132-ane).
    • Remove the second apple,t8122-ane from the list with the interrupt-names: false clause. A repeated enum entry is a meta-schema error in dt_binding_check.
    • Add apple,t8122-ane to the new mboxes: false list, which it was in before this PR.
    • Drop the added T8122 example. It has no apple,firmware-preloaded and no apple,dapf-ranges, both required.
  4. The rows on #2331 don't carry over. Four of the eleven files differ from 2bda8f1b (apple,ane.yaml, both T8122 files, ane_fw_platform.c), and none of the rows covers sleep or idle power. The nodes are enabled, so the DARTs and the mailbox probe on every T603x Mac whatever the ANE driver does. 00c42a75 itself cites a report of an M3 Pro hanging at boot with its ANE DARTs enabled. Needed at the fixed head, default command line:
    • T6030, 27.2 stub (J516s), again, now with idle and sleep.
    • T6030, 14.7 stub (J514s). The earlier run was a 7.2.11 kernel with the out-of-tree module.
    • M3 Max (any of J514c, J516c, J514m, J516m) and M3 Ultra (J575d). No boot with these nodes enabled has been posted for any of them. If one can't be had soon, set the T6031 and T6032 engine, mailbox and DART nodes to disabled here and enable them in a follow-up with the row; T6030 can then land on its two rows.

Please fold 1-3 into the commits that introduced them rather than adding a commit on top: from 00c42a75 on every commit carries the T8122 copy, and from 75824cf3 on accel/ane doesn't build, which breaks bisecting on main. While there, 00c42a75's message still says everything stays disabled. The body needs Tested: and Risk: lines, and "review and boot rows apply unchanged" should go. #2331 can be closed once this head is good.

Not blocking, worth taking in the same push
  • apple,firmware-iovas on T6030 is the 14.x layout only. The T603x ANE firmware has a 0xb0000-byte TEXT segment in 14.6.1 but 0xc8000 in 27.2, so on a 27.2 stub DATA is at 0x100000c8000, as on T8122. A static value can't be right for both. aura writes this property from the ADT segment ranges for the compatibles it knows, so leave it out of the node and let aura supply it. Nothing reads it while the driver refuses T603x.
  • memory-region: false and memory-region-names: false contradict that hand-over: aura adds both. Drop them. The compatible list in aura's dt_set_ane_firmware() needs the two T603x entries before any start works.
  • apple,firmware-preloaded on T6031/T6032. The ADTs show the RTKit ANE (ASC windows, nub, mailbox interrupts) only on 27.2. In 14.6.1 the T603x ANE is ane,t8020 with the engine interrupt alone. The J514s observation is the only basis for "preloaded", so say so in the comments, or set the property only where it was seen.
  • .soc: use 0x6030 / 0x6031, with .ane_type = 0xc0 / 0xe0, as the other platforms do. The refusal line now prints SoC 0xc0.
  • T6031 DAPF is in the restore ADTs of J514c, J516c, J514m and J516m, identical in 14.6.1 and 27.2: 0x292280520-523, 0x2922805a0-5c3, 0x292829a9c-a9f, 0x38d468000-003, 0x40a468000-003. J575d die 0 adds 0x23c945c000-003.
  • T6031 ANE-SYS-V has AFR as a second parent in the ADT, and the node doesn't reference ps_afr. Wanted before the engine is started there.
  • The PWGATE comment says aux-0 + 0x2b6c; the DAPF record is aux-0 + 0x2c6c. Please check which one is meant.
  • Question, for the rows: with the ANE never bound, sync_state() stays pending on its five power domains, and a domain that is on at boot then stays on (genpd->stay_on), now without auto power management for ane_sys and ane_cpu. Are all five off at idle, as ane_sys is on main (J516s: off-0)?
Evidence

Merge of this head with main (5d506042; main is now 1ab453e8, which differs only in a workflow file; main has not touched the PR's files since its base).

Check Head Head with blockers 1-3 fixed
W=1 drivers/accel/ane/ (clang 23, arm64) 3 errors 0 errors, 0 warnings
7 T603x + 5 T8122 DTBs, W=1 build, 0 new dtc warnings build, 0 new; T8122 byte-identical to main
CHECK_DTBS (apple schemas) 18 new errors 0 new
dt_binding_check apple,ane.yaml meta-schema error (repeated enum entry) clean
DART power-domain and sibling-drift checks 0 new -
host tests ane / t6030 / pmgr (hosted-CI toolchain) - 13/13, 12/12, 3/3

ADT comparison (27.2 26B123: all seven boards; 14.6.1: the six M3 Pro/Max boards):

  • Engine, PMGR and aux windows, DART and DAPF windows, ANE and DART interrupts, ane-type: identical to the nodes on every board and both builds. J575d die 1 does list 0x2903c0000, as the comment says.
  • Mailbox interrupts: the ANE lists them in the SIO's order (559, 558, 561, 560 against SIO 908, 907, 910, 909), so the mapping taken from the SIO mailbox holds. The mailbox at ASC + 0x8000 rests on the same SIO comparison.
  • T6030 DAPF: the five records match on J514s and J516s in both builds.
  • T6030 power states 0xc000-0xc018 and their parents match 27.2. In 14.6.1 the same four entries are marked virtual with an empty register mask, one more reason for a 14.7 row. T6031 matches in both.

Driver: the change is two match entries plus two empty platforms. ane_rtclient_init() calls ane_fw_platform_preflight() before it registers the driver, and that returns at boot_qualified, so no resource, power or MMIO access happens. Locking, remove, runtime PM and the H14-H17 paths are unchanged once the file compiles.

Other open ANE PRs: no file in common with #3817, #4026, #4027 or #4017. #3964 (ane_fw_platform.c/.h) and #3887, #4014, #3640 (T8122, T6031, T6030 peripherals) merge cleanly with this one in either order. None has to land first.

Row commands and pass criteria

Kernel and DTB of the fixed head merged with main, default command line (no pd_ignore_unused), CONFIG_DRM_ACCEL_ANE=m; the same on main for comparison.

cat /proc/cmdline; uname -r
journalctl -k -b | grep -iE 'apple-dart .*(30980|30981|30982|3c980|3c981|3c982)|ane|mailbox|SError|DART.*fault'
ls -l /sys/bus/platform/drivers/apple-dart /sys/bus/platform/drivers/apple-mailbox | grep -E '3098[012]|3c98[012]|309408|3c9408'
modprobe ane_t6021; dmesg | tail -2            # -EOPNOTSUPP and one refusal line per attempt
sleep 180; grep -iE -A3 '^(die[01]_)?ane_|ane_sys' /sys/kernel/debug/pm_genpd/pm_genpd_summary
for i in 1 2 3; do rtcwake -m freeze -s 30; done; cat /sys/power/suspend_stats/{success,fail}
journalctl -k -b -p err | wc -l; systemctl --failed

Pass: boots; 3 DARTs and the mailbox per die bind, 0 DART faults, 0 SErrors; only the refusal line is new at error level; at idle all ANE domains are off and DARTs and mailbox are suspended; 3/3 s2idle (plus one deep cycle where main supports it) with Wi-Fi, USB, display and audio back, and the ANE domains off again; battery power at idle (laptops) not higher than main; 0 failed units.

@github-actions github-actions Bot added changes-requested A reviewer requested changes (bot) door:two-way Revertible or not, from Merge risk (bot) merge-conflict Conflicts with the base branch (bot) and removed needs-template PR body lacks Tested or Risk (bot) ci-failing A check failed at the PR head (bot) labels Dec 3, 2026
@github-actions github-actions Bot added the ci-failing A check failed at the PR head (bot) label Dec 3, 2026
@joshuaswarren
joshuaswarren force-pushed the m3-media/ane-2331-fixed branch from b992753 to 7f22811 Compare December 3, 2026 08:01
@github-actions github-actions Bot removed ci-failing A check failed at the PR head (bot) merge-conflict Conflicts with the base branch (bot) labels Dec 3, 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: changes needed at 7f228116582b. One of the four points from the review at a51b3e8dc is partly fixed. Of the 11 files, only apple,ane.yaml changed since then. The T603x nodes are the same blobs that were checked against the ADTs, so that comparison still holds, T6032's two engines included.

  1. ane_fw_platform.c:194 still does not compile (clang arm64, 3 errors: use of undeclared identifier 'M3'). Put };, the blank line and /* back after .safe_reset = false,. With those three lines drivers/accel/ane/ builds W=1 with 0 warnings. Hosted apple-build was skipped or is still queued here, so green CI won't show this.

  2. T8122 is still described twice. main already has it, and J613 and J615 now run it (#4052 is merged). With this head the enabled ane node on both gains mboxes = <&ane_mbox>, pointing at a disabled mailbox that no row has covered. Drop the hunks in t8122-peripherals.dtsi and t8122-pmgr.dtsi. All five T8122 DTBs are then byte-identical to main.

  3. Binding: the allowlist is fixed, three things are left. dt_binding_check still reports the repeated apple,t8122-ane (non-unique elements). apple,t8122-ane is missing from the new mboxes: false list. The added T8122 example lacks apple,firmware-preloaded and apple,dapf-ranges. Patch below; with it dt_binding_check is clean and CHECK_DTBS has no new lines on the seven T603x and five T8122 DTBs. A wrong ane-type is still caught.

  4. Enabled nodes with a driver that never binds can pin power domains through sleep. This answers the question from the last review from the code:

    • apple_pmgr_ps_probe() sets GENPD_FLAG_DEFER_OFF on a domain that is on at boot. genpd_must_defer() then refuses to power it off while any consumer is unbound, both at runtime (genpd_power_off()) and in system suspend (genpd_sync_power_off()). stay_on blocks the runtime path too, because sync_state() never comes.
    • ane_rtclient_init() refuses before it registers the driver, so ane never binds. Any of the five ANE domains that iBoot leaves on then stays on, and apple,no-auto-pm also takes away the hardware gating that main sets on ane_sys. On T6031 that keeps afnc5_lw0 and afnc6_lw0 on as well.
    • A domain that is off at boot is fine: the DARTs and the mailbox only hold it while active.
    • No row says which case applies. The J516s row at 7c34ba8e shows all five with sync_state() pending, but not whether they were on. main has no such consumer and turns ane_sys off.

    Fix, preferred: set the engine, mailbox and DART nodes to status = "disabled" in the T6030, T6031 and T6032 files, as T8122 has them, and enable them per board together with the driver support. Then nothing probes and nothing is pinned. That also settles the Codex P1 about the DART reset.

    Or keep them okay with the rows from the last review at the fixed head: pm_genpd_summary at boot, at idle and after sleep, 3x s2idle, and one deep cycle where main has it. J516s (T6030, 27.2), J514s (T6030, 14.7), one of J514c/J516c/J514m/J516m, and J575d. Boards booted with these nodes enabled so far: J514s (7.2.11, out-of-tree module) and J516s. No T6031, T6034 or T6032 board.

  5. Please fold 1-3 into the commits they belong to. As pushed, every commit from 70fa7891 on fails to build accel/ane, and 25eb2124 on carries the T8122 copy. 25eb2124's message still says everything stays disabled.

  6. Body: "Review and boot rows on #2331 apply unchanged" is not correct; neither row is on this tree. Risk: should list T6030, T6031, T6034 and T6032, not only J516M.

Order: #4052 is already in main. #3887 goes next and needs nothing from here. With the T8122 hunks dropped, #4022 shares no file with it. The two apply cleanly together today as well. #4022 holds nothing else up.

Patch for 1 and 3 (on top of this head)
--- a/drivers/accel/ane/ane_fw_platform.c
+++ b/drivers/accel/ane/ane_fw_platform.c
@@ -191,6 +191,9 @@
 	.boot_qualified = true,
 	.firmware_preloaded = true,
 	.safe_reset = false,
+};
+
+/*
  * M3 Pro (T6030) and M3 Max (T6031, also the T6034 package and both dies of
--- a/Documentation/devicetree/bindings/npu/apple,ane.yaml
+++ b/Documentation/devicetree/bindings/npu/apple,ane.yaml
@@ -497,7 +497,6 @@
               - apple,t8122-ane
               - apple,t8142-ane
               - apple,t8132-ane
-              - apple,t8122-ane
               - apple,t6030-ane
               - apple,t6031-ane
@@ -556,6 +555,7 @@
               - apple,t8140-ane
               - apple,t6041-ane
               - apple,t6050-ane
+              - apple,t8122-ane
               - apple,t8142-ane
               - apple,t8132-ane

and delete the last example (ane@310000000).

What was run

Head is 8 commits on main 8ec8740a1e6f, 0 behind. clang, arm64.

Check Head With 1-3 fixed
drivers/accel/ane 3 errors 0 errors, 0 warnings (W=1)
7 T603x + 5 T8122 DTBs build; T8122 differs from main build; T8122 byte-identical to main
CHECK_DTBS (npu/apple,ane.yaml) 0 lines (T603x, J613, J615) 0 lines (all 12)
dt_binding_check apple,ane.yaml meta-schema error (repeated enum entry) clean

Source read for point 4: drivers/pmdomain/apple/pmgr-pwrstate.c, drivers/pmdomain/core.c (lines 942-1030, 1437-1450), fw_devlink_count_absent_consumers(). No hardware was used.

No M3 device tree describes the Neural Engine. Add it to the SoC
peripherals files, next to the other media engines: the engine, its
ASC mailbox and its three DARTs on T8122, T6030 and T6031 (and so
T6034), and both engines of T6032. Add the four ANE power states under
ANE_SYS that the T8122 and T6030 PMGR files lack (T6031 already has
them); on T8122 ANE_BASE depends on both ANE_TD and ANE_CPU, on T6030
on ANE_TD only.

Every value comes from the hardware description of each board (all
T8122, T6030, T6031, T6034 and T6032 boards agree per SoC) and our own
capture of a J615 under macOS 27.2. The mailbox sits at the ASC + 0x8000
and its interrupts are ordered as on the SIO, which has the same ASC
wrapper and whose mailbox is already described. On T6032 the second
die's hardware description points one auxiliary window at the first
die's copy, which that die's bus cannot address, so that window is left
out there.

Everything stays disabled: the accel/ane driver has no H15 support yet,
and enabled ANE DART nodes were reported to hang an M3 Pro at boot in
the omarchy-ane H15 bring-up work by Joshua Warren and testers, whose
experimental overlays this follows.

Co-developed-by: Ryan Murray <ryan@aurorasilicon.org>
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Signed-off-by: Joshua Warren <joshua@warrenappliedlabs.com>
The T6030, T6031 and T6032 ANE nodes, their DARTs and their mailboxes
stay disabled, matching T8122: an enabled node whose driver refuses to
bind pins any power domain iBoot left on for the life of the kernel
(genpd must-defer and stay_on both block the off path). They enable
per board together with driver support.

The iBoot preload happens on T603x the same as on T8122 (observed in the
ADT on J514s), so the nodes carry apple,firmware-preloaded. PMGR gets
apple,no-auto-pm on ps_ane_sys and ps_ane_cpu, the same fix 3082 shipped
for the J615 CPU-stop failure: AUTO_ENABLE must not gate the ANE CPU
behind the cold-started firmware.

drivers/accel/ane: fail cleanly on T603x

Add t6030/t6031 of-match entries pointing at unqualified platforms.
ane_fw_platform_preflight checks boot_qualified first and returns
-EOPNOTSUPP before any resource, power or MMIO access, so the engine
probes, logs the refusal and stays idle.

Signed-off-by: Joshua Warren <joshua@warrenappliedlabs.com>
The merged shared clause still carried t8122 and forbade
apple,firmware-preloaded. T8122 has its own clause from main now, so the
group shrinks to t6030/t6031, firmware-preloaded becomes required like
the other preloaded H15 parts, and the stale t8122 duplicate clause
goes away.

Signed-off-by: Joshua Warren <joshua@warrenappliedlabs.com>
…ovas

Add the five live J514s ADT dapf-instance-0 records and default
preloaded firmware IOVAs (TEXT 0x10000000000, DATA 0x100000b0000) to
the T6030 ANE node, matching the T8122 layout. Update the T6030 comment
in ane_fw_platform.c while keeping the platform unqualified in this
series.

Signed-off-by: Joshua Warren <joshua@warrenappliedlabs.com>
…or T6030

The T6030 (M3 Pro, 14.7) preloaded ANE firmware maps __TEXT at 0x10000000000 (size 0xb0000) and __DATA at 0x100000b0000. Allow 0x100000b0000 in the apple,firmware-iovas second-element enum so CHECK_DTBS passes on t6030-j514s and t6030-j516s.

Signed-off-by: Joshua Warren <joshua@warrenappliedlabs.com>
…lock

The generic 'not H15' conditional listed every H15 compatible except the
new T603x pair, so t6030/t6031 nodes hit apple,firmware-preloaded: false
and apple,ane-type: false even though the T603x block requires both -
dt-checks failed on t6034-j516m ane@3c8000000 with 'False schema does
not allow True'. Add apple,t6030-ane and apple,t6031-ane to the
exclusion enum.

Signed-off-by: Joshua Warren <joshua@warrenappliedlabs.com>
@joshuaswarren
joshuaswarren force-pushed the m3-media/ane-2331-fixed branch from cd146fe to f9cb07e Compare December 3, 2026 13:12
@joshuaswarren joshuaswarren changed the title arm64: dts: apple: describe the T603x Neural Engine, enabled; accel/ane: T603x clean refusal arm64: dts: apple: describe the T603x Neural Engine; accel/ane: T603x clean refusal Dec 3, 2026
@github-actions github-actions Bot added blast:m3 Macs affected, from Merge risk (bot) needs-template PR body lacks Tested or Risk (bot) and removed door:two-way Revertible or not, from Merge risk (bot) labels Dec 3, 2026
@joshuaswarren

Copy link
Copy Markdown
Contributor Author

All five points folded at f9cb07e62aad:

  1. cd146fe0 is gone — its three lines are back in the 70fa7891 fold point, and every commit builds and carries the sign-off.
  2. Both T8122 files are origin/main's; all five T8122 DTBs are byte-identical to main.
  3. apple,ane.yaml: the second apple,t8122-ane is out of the interrupt-names: false enum, it is back in the mboxes: false list, and the added T8122 example is deleted.
  4. The sed changed exactly the 20 ANE nodes — engine, mailbox and all DARTs on T6030, T6031 and T6032 are status = "disabled" again, matching T8122.
  5. Title and the 25eb2124-era message no longer claim enablement; the body drops the stale row line and lists T6030, T6031, T6034 and T6032 in Risk.

Verified here: drivers/accel/ane builds W=1 with 0 warnings (clang, arm64); all 12 DTBs build; dt_binding_check and CHECK_DTBS clean on apple,ane.yaml. Ready for your J516s boot row.

@github-actions github-actions Bot added the ci-failing A check failed at the PR head (bot) label Dec 3, 2026
@satchlj

satchlj commented Dec 3, 2026

Copy link
Copy Markdown
Member

Hardware check on J613 (T8122, macOS 27.2 26B123) on main (c5bdd6820568): without dma-coherent; on ane@310000000, ane_t6021 accepts the H15 preload identity (H15 T8122 27.2 26B123) and maps preload TEXT/DATA, then fails ane_h16_alloc_prot() with:

ane_t6021 310000000.ane: H16 private surfaces require a coherent client
ane_t6021 310000000.ane: H16 stage program refused before RUN, error -95

So the dma-coherent; hunk in arch/arm64/boot/dts/apple/t8122-peripherals.dtsi here directly fixes T8122 ANE bring-up on main. Happy to verify /dev/accel/accel0 on J613 once this lands.

Dropping the T8122 example also dropped the T8132 one before it and left
an empty soc node. Put the T8132 example back unchanged.

Signed-off-by: DjDeveloperr <hey@djdev.me>
@github-actions github-actions Bot added door:two-way Revertible or not, from Merge risk (bot) and removed needs-template PR body lacks Tested or Risk (bot) ci-failing A check failed at the PR head (bot) labels Dec 3, 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: good at dcb002b6d136; all five points of the review at cd146fe0 are done.

  • The sign-offs are there, ane_fw_platform.c is the file that already built (hosted apple-build at cd146fe0), both T8122 files are the same blobs as main's, and exactly the 20 ANE nodes went from okay to disabled.
  • One slip, fixed in dcb002b6: with the T8122 example the T8132 one was dropped too, which left an empty soc node. It is back unchanged. The Risk: line now says two-way, which the pr-text check asks for.

Checked at dcb002b6: dt_binding_check on apple,ane.yaml is clean; the 7 T603x and the T8122 DTBs build with no apple,ane.yaml message; checkpatch --strict is clean; it merges cleanly with main f46dffad91fd.

On the J613 note above: dma-coherent for T8122 is already on main through #3887, so this PR no longer changes T8122.

Owed before merge: one J516s boot (M3 Pro, 27.2) at this head, ours: it boots, no DART fault or SError, ane_sys and the four new ANE domains are off at idle and after one s2idle. T6030 gains four power states, which is why. T6031/T6032 only gain apple,no-auto-pm on two states nothing uses.
An approval from someone other than the last pusher (DjDeveloperr) is needed as well, RyanTheTide or erikwb.

Not blocking, for the commit that enables the engine: the PWGATE comment says aux-0 + 0x2b6c, the DAPF record is 0x2c6c.

@github-actions github-actions Bot removed the changes-requested A reviewer requested changes (bot) label Dec 3, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor

J516s (MacBook Pro 16-inch, M3 Pro, T6030, OS firmware 27.2 / 26B123) boot and s2idle row at exact head dcb002b6d136f87864a6a0a199435af08c5e0629: PASS (34/34) + clean T603x refusal verified.

  • What: linux#4022 (dcb002b6d136f87864a6a0a199435af08c5e0629) merged onto f46dffad91fd (0cb510725d0c, kernel 7.3.0-pr4022) booted with the matching built t6030-j516s.dtb.
  • Tested:
    1. Normal boot + s2idle row: verified /soc/ane@308000000 (apple,t6030-ane, status = "disabled"), its 3 DARTs, mailbox, and 5 PMGR power domains (ane_sys, ane_cpu, ane_mpm, ane_td, ane_base); loaded ane_t6021 module; checked all 5 ANE power domains at idle before sleep, ran 1 s2idle cycle (rtcwake -m freeze -s 10), and re-checked all 5 ANE power domains, DART faults, and kernel warnings after wake.
    2. Post-PASS runtime-enabled refusal check: applied a temporary DT overlay setting only /soc/ane@308000000 to okay, reloaded ane_t6021, checked refusal error and kernel log, verified all 5 ANE power domains remained off, and removed the overlay cleanly.
  • Result:
    • Normal boot + s2idle (34/34 PASS): /soc/ane@308000000 present (status = "disabled"); ane_t6021 loaded cleanly (modprobe rc 0, bound nothing); all 5 ANE power domains (ane_base, ane_td, ane_cpu, ane_mpm, ane_sys) off-0 0 before s2idle and off-0 0 after 12 s s2idle (rtcwake rc 0, suspend_stats success 0 -> 1, fail 0 -> 0); 0 DART faults, 0 WARN/BUG/Oops, taint unchanged (4).
    • Runtime-enabled refusal check: modprobe ane_t6021 cleanly returned -EOPNOTSUPP (Operation not supported) without binding, emitting the exact refusal message in the kernel log:
      platform 308000000.ane: error -EOPNOTSUPP: ANE boot unqualified for SoC 0xc0; requires owner qualification and bootloader firmware preload support
      All 5 ANE power domains stayed off-0 0 throughout and after overlay removal; 0 DART faults, 0 new WARN/BUG/Oops.

@github-actions github-actions Bot removed the needs-hw-row No hardware row at the PR head (bot) label Dec 3, 2026

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

Reviewed head dcb002b6d136 (non-pusher review):

  • Binding (apple,ane.yaml): apple,t6030-ane/apple,t6031-ane compatibles, ane-type 0xc0/0xe0, 0x100000b0000 DATA IOVA, mboxes: false split with apple,t8122-ane, non-H15 exclusion list, and restored T8132 example all check out cleanly (dt-checks green).
  • DTs (t6030/t6031/t6032/t8122): All 20 T603x ANE/DART/mailbox nodes are status = "disabled" so nothing pins boot power domains; T6030 PMGR adds the four ANE domains verified off at idle and post-s2idle on the J516s row; T8122 dma-coherent; matches main (53b9adf4e955).
  • Driver (drivers/accel/ane/): ane_t6030_platform/ane_t6031_platform stay unqualified (boot_qualified = false), returning -EOPNOTSUPP in preflight before any resource, power, or MMIO access.
  • CI: apple-build, dt-checks, host-tests, pr-text, readiness, and KUnit plan all pass (KUnit ane-boot ane-pm pending).

@github-actions github-actions Bot removed the needs-review No approving review from Core or Omarchy Mac yet (bot) label Dec 3, 2026
@aurora-silicon-review

Copy link
Copy Markdown

The device tree should describe the available hardware, with qualification enforced in the driver. The J516s engine-only overlay already exercised that split: ane_t6021 returned -EOPNOTSUPP before binding and all five ANE power domains stayed off. As a follow-up, enable the ANE engine node and keep that early refusal. Leave the independently probed DART and mailbox nodes disabled until their safe startup path is qualified.

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Local run of the KUnit ane-boot ane-pm job on the merge of dcb002b into main f0b6f4b (merge tree ab9257a50f8e, clean). I ran it on UML x86_64 instead of arm64 QEMU.

tools/testing/kunit/kunit.py run --make_options LLVM=1 --kconfig_add CONFIG_WERROR=n --kunitconfig=<cfg>:

  • ane-pm (tools/testing/selftests/drivers/ane/pm.kunitconfig): 20/20 pass (ane-pm-recovery, ane-h14-sleep, ane-fw-ids).
  • ane-boot (drivers/accel/ane/boot.kunitconfig): 190/192 pass. I ran each suite separately with kunit.filter_glob, and the two hwx/accel suites one test at a time. 13 suites pass in full, including ane-fw-platform 4/4 and both ane-t6021 suites. ane-h16-hwx.hwx_import_bounds_test and ane-h16-accel.ane_h16_load_admission_test panic with "Segfault with no mm" in raw_copy_from_user. That is copy_from_user from a kthread, which UML can't do. Both panic the same way on main f0b6f4b, and this PR doesn't touch that code. The other 34 tests in those two suites pass.

Main has since moved to 35bfbf3. The new commits change only drm/apple DCP files and tools/asahi, which share no files with this PR and are not built into these kernels. The hosted job had not finished when I merged; it started at 15:16Z.

@DjDeveloperr
DjDeveloperr merged commit 9e6409d into main Dec 3, 2026
14 checks passed
@DjDeveloperr
DjDeveloperr deleted the m3-media/ane-2331-fixed branch December 3, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:media Area from CODEOWNERS (bot) area:platform Area from CODEOWNERS (bot) blast:m3 Macs affected, from Merge risk (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