Skip to content

arm64: dts: apple: t6050-j716c: enable the Neural Engine - #1956

Open
erikwb wants to merge 2 commits into
integration/aurorafrom
j716c/ane-enable
Open

erikwb wants to merge 2 commits into
integration/aurorafrom
j716c/ane-enable

Conversation

@erikwb

@erikwb erikwb commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Enables the Neural Engine on the J716c (16" MacBook Pro, M5 Max).

The J716c ANE is the one #1595 describes for T6050. Its ADT ane0 has the same registers,
interrupts, clocks, PMGR words, DARTs and five DAPF ranges as t6050-peripherals.dtsi, and the
boot loader hands over the same 27.0 preload layout (TEXT 0xc0000, DATA 0x2ac000 bytes). The J716c's
preloaded TEXT needs its own pin: #1957.

Change

  • t6050-j716c.dts includes t6050-j714s-ane.dtsi: the two firmware reservations the boot loader
    fills, the three ANE DARTs and ps_ane_sys, as arm64: dts: apple: t6050-k114c: enable the Neural Engine #1607 does for the K114c. Both of ANE_SYS's
    parents are already on: FAB8_SOC as firmware-owned for the SEP (t6050-j716c-sep.dtsi), FAB9_SOC
    for the camera.
  • ane0_dart names its two register windows dart and dapf. The second window (0x509810000,
    16 KiB) is the DART's DAPF page in the ADT. The binding requires reg-names with two windows.
    apple-dart only uses a named DAPF window together with apple,dapf-ranges, which ane0_dart does
    not have, so nothing changes at runtime. This edits the shared dtsi, so the J714s DTB changes too.
  • The t6050-j714s-ane.dtsi header now says it serves both boards.

Testing

On a J716c (M5 Max, 128 GB), 27.0, with this branch, #1957 and #2162 on integration/aurora
59b02d5, booted through aura main plus #280–#282:

  • Hand-off verified, up at boot, accel node ready, /dev/accel/accel0.
  • H17 add-128 (ane-run.py, every run checked): 1000/1000 runs bit exact, 128/128 lanes, 0 ulp.
  • No DART fault, oops or warning.
  • make CHECK_DTBS=y apple/t6050-j716c.dtb apple/t6050-j714s.dtb with dtschema 2026.9: no new
    messages for the J716c, and the J714s iommu@509800000: 'reg-names' is a required property
    message is gone.
  • Not tested: system sleep with the ANE running; the J714s on hardware.

🤖 Generated with Claude Code

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

Validated from the M5 Pro (J714s) side. Nothing changes for J714s. I'm requesting changes because dt-checks fails.

What I checked

  • Code. Only t6050-j716c.dts changes.
    • It includes the shared t6050-j714s-ane.dtsi (the two preload reservations, the three ANE DARTs and ps_ane_sys), and enables ps_fab8_soc as firmware-owned, as J714s does.
    • No shared T6050 or J714s file is touched, so the J714s DTB is unchanged.
    • Without #1957's J716c pin, the driver refuses the J716c TEXT and leaves the engine off. Landing this before #1957 is therefore safe.
  • Compile. I built pull/1956/head on our Ryzen build server (arm64 defconfig + asahi.config, Image modules dtbs). make rc=0. t6050-j716c.dtb and t6050-j714s.dtb built, with no dtc warnings for either.
  • M5 hardware. Not needed here, since there is no J714s change. I ran the driver half on the M5 under #1957.

Finding

Blocking: dt-checks fails on this head with one new CHECK_DTBS warning:

t6050-j716c.dtb: iommu@509800000 (apple,t6050-dart): 'reg-names' is a required property
  • Where it comes from. As the description says, it comes from the shared ane0_dart (t6050-peripherals.dtsi:3301), which has two reg entries and no reg-names. J714s already has the same warning, so the check counts it as new only for J716c.
  • Why it needs a fix. We merge on green checks only, so this needs a fix rather than a waiver.
  • Suggested fix. The second window (0x509810000, 16 KiB) sits at +0x10000, the same layout as pmp0_dart, so it is probably the DART's DAPF page. If it is, reg-names = "dart", "dapf"; on ane0_dart would fix the warning for both boards without changing behaviour:
    • apple-dart parses a named DAPF window only when the DART node also has apple,dapf-ranges (drivers/iommu/apple-dart.c:5266);
    • ane0_dart has no such property, because the ANE driver programs its own DAPF records from ane0.
  • Effect on J714s. That fix edits the shared dtsi, so the J714s DTB would change. I can run the J714s ANE check again on that head.

Nit (non-blocking). t6050-j714s-ane.dtsi now serves two boards, but its header comment still says "The J714s Neural Engine".

The J716c (M5 Max) ANE is the J714s's: the ADT ane0 has the same
registers, interrupts, clocks, PMGR words, DARTs and five DAPF ranges as
t6050-peripherals.dtsi, and iBoot preloads the same 27.0 TEXT/DATA
layout. Include t6050-j714s-ane.dtsi for the two firmware reservations
the boot loader fills. ANE_SYS's parents are already on: FAB8_SOC as
firmware-owned for the SEP, FAB9_SOC for the camera.

Developed with Claude Code.

Signed-off-by: Erik Bourget <erik@ebourget.net>
ane0_dart has a second register window, 0x509810000, 16 KiB: the ADT
dart-ane0 lists it as the DART's DAPF instance. The binding requires
reg-names with two windows, so CHECK_DTBS warned for every board that
enables the ANE. Name the windows "dart" and "dapf".

apple-dart parses a named DAPF window only when the node also has
apple,dapf-ranges, which ane0_dart does not (the ANE driver programs its
own DAPF records), so behaviour does not change. Also say in
t6050-j714s-ane.dtsi that it serves the J716c too.

Developed with Claude Code.

Signed-off-by: Erik Bourget <erik@ebourget.net>
@erikwb

erikwb commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the check. Rebased onto current integration/aurora (59b02d5) and fixed:

  • dt-checks: ane0_dart now has reg-names = "dart", "dapf";. The J716c ADT confirms it: dart-ane0 lists its fourth register window, 0x509810000 (16 KiB), as the DAPF instance. No apple,dapf-ranges on that node, so apple-dart doesn't touch it and nothing changes at runtime. With dtschema 2026.9, the J716c gets no new messages and the J714s message is gone. It edits the shared dtsi, so the J714s DTB changes (that one property).
  • Nit: the t6050-j714s-ane.dtsi header now says it serves both boards.
  • The ps_fab8_soc block is dropped: arm64: dts: apple: j716c: deep sleep #2123 already enables it as firmware-owned in t6050-j716c-sep.dtsi.

Re-tested on the J716c with #1957 and #2162: hand-off verified, 1000/1000 add-128 bit exact, no faults.

🤖 Generated with Claude Code

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.

2 participants