Repository navigation
arm64: dts: apple: t6050-j716c: enable the Neural Engine - #1956
Conversation
DjDeveloperr
left a comment
There was a problem hiding this comment.
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.dtschanges.- It includes the shared
t6050-j714s-ane.dtsi(the two preload reservations, the three ANE DARTs andps_ane_sys), and enablesps_fab8_socas 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.
- It includes the shared
- Compile. I built
pull/1956/headon our Ryzen build server (arm64 defconfig + asahi.config,Image modules dtbs). make rc=0.t6050-j716c.dtbandt6050-j714s.dtbbuilt, 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 tworegentries and noreg-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";onane0_dartwould 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_darthas no such property, because the ANE driver programs its own DAPF records fromane0.
- apple-dart parses a named DAPF window only when the DART node also has
- 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".
8615d73 to
ca84611
Compare
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>
ca84611 to
acb6bae
Compare
|
Thanks for the check. Rebased onto current
Re-tested on the J716c with #1957 and #2162: hand-off verified, 1000/1000 add-128 bit exact, no faults. 🤖 Generated with Claude Code |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Thanks, Erik. Both points from my 11-15 review are fixed:
ane0_darthasreg-names = "dart", "dapf". Your J716c ADT shows the second window (0x509810000, 16 KiB) is the DAPF instance. The node has noapple,dapf-ranges, so apple-dart leaves it alone and nothing changes at runtime.- The
t6050-j714s-ane.dtsiheader says it serves both boards.
Dropping the ps_fab8_soc block is right, since #2123 already keeps it on as firmware-owned. dt-checks and host-tests are green on acb6bae.
The J714s DTB changes by that one property. Without #1957's pin, the driver refuses the J716c TEXT and leaves the engine off, so this can land first.
integration/aurora has changed t6050-j716c.dts (the MTP block) and t6050-peripherals.dtsi since your base. A three-way merge is clean. #1607, which is waiting on its sign-off, would add the same reg-names line, so whichever of the two lands second drops that hunk. I'll update the branch and merge once CI is green on the merged head.
These rows come after the merge, with a revert ready: the J714s ANE check on the merged head (hand-off verified and add-128 exact), and one J716c system sleep with the ANE running.
|
Merged as 17efdb3 (dt-checks and host-tests green on the updated head a60df64). Post-merge verification as in my review: the J714s ANE check on the merged head and one J716c system sleep with the ANE running. A revert is ready if they don't hold. #1607 will need to drop its |
Enables the Neural Engine on the J716c (16" MacBook Pro, M5 Max).
The J716c ANE is the one #1595 describes for T6050. Its ADT
ane0has the same registers,interrupts, clocks, PMGR words, DARTs and five DAPF ranges as
t6050-peripherals.dtsi, and theboot 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.dtsincludest6050-j714s-ane.dtsi: the two firmware reservations the boot loaderfills, 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'sparents are already on: FAB8_SOC as firmware-owned for the SEP (
t6050-j716c-sep.dtsi), FAB9_SOCfor the camera.
ane0_dartnames its two register windowsdartanddapf. The second window (0x509810000,16 KiB) is the DART's DAPF page in the ADT. The binding requires
reg-nameswith two windows.apple-dart only uses a named DAPF window together with
apple,dapf-ranges, whichane0_dartdoesnot have, so nothing changes at runtime. This edits the shared dtsi, so the J714s DTB changes too.
t6050-j714s-ane.dtsiheader now says it serves both boards.Testing
On a J716c (M5 Max, 128 GB), 27.0, with this branch, #1957 and #2162 on
integration/aurora59b02d5, booted through aura
mainplus #280–#282:up at boot, accel node ready,/dev/accel/accel0.ane-run.py, every run checked): 1000/1000 runs bit exact, 128/128 lanes, 0 ulp.make CHECK_DTBS=y apple/t6050-j716c.dtb apple/t6050-j714s.dtbwith dtschema 2026.9: no newmessages for the J716c, and the J714s
iommu@509800000: 'reg-names' is a required propertymessage is gone.
🤖 Generated with Claude Code