Skip to content

arm64: dts: apple: t6050: share the Neural Engine with every board - #2293

Draft
RyanTheTide wants to merge 3 commits into
integration/aurorafrom
spec-m5neo/t6050-dt-share
Draft

RyanTheTide wants to merge 3 commits into
integration/aurorafrom
spec-m5neo/t6050-dt-share

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Only J714s enables the Neural Engine, through t6050-j714s-ane.dtsi. Nothing in that file is specific to J714s. The engine, its DARTs and ANE_SYS are in t6050-peripherals.dtsi. The two firmware reservations are placeholders that the boot loader fills from the ADT of the machine it boots. aura finds the node by its apple,t6050-ane compatible on any board (src/kboot.c, ane_compatibles[]). The accel/ane driver also matches on the compatible only (ane_t6021_rtclient_main.c, ane_rtclient_of_match).

Change

  1. The content moves to t6050-ane.dtsi. J714s includes it directly, and its DTB is byte-identical. The new file also enables ANE_SYS's parents from the ADT power tree (FAB8_SOC, FAB9_SOC, and FAB8's parent FAB0_PIOGW) as apple,firmware-owned, so Linux holds a vote and never switches them. Without these, ANE_SYS cannot register on a board that does not describe its Secure Enclave or camera. J714s, J716c and K116s already enable all three with the same properties. t6050-j714s-ane.dtsi stays as a one-line include so arm64: dts: apple: t6050-j716c: enable the Neural Engine #1956 and arm64: dts: apple: t6050-k114c: enable the Neural Engine #1607 still build. The new file has an include guard.
  2. J714c, J716s, J873s, K114s, K116c and K116s opt in: each defines T6050_ANE at the top, and t6050-peripherals.dtsi then includes t6050-ane.dtsi at its end. The one-line opt-in keeps clear of the lines arm64: dts: apple: t6050: describe the GPU on J714c, J873s, K114s, K116c #2276 edits next to the peripherals include, so the two PRs merge in either order. The DTBs are byte-identical to the ones a direct include after t6050-peripherals.dtsi produces. On each of these boards the ADT ane0 matches J714s: ane,t8132exclave, ane-type 0x220, die 0, IRQs 954/967, clock ids 335/334/381, and DART IRQ 955.

Nothing starts by itself. aura disables ane0 when the ADT does not report a valid preload. The driver starts the engine only when the preloaded TEXT matches a firmware build it knows. Otherwise it logs the digest and leaves the engine alone. On integration today only the 27.0 TEXT is known; #1957 adds 27.2.

Not in this PR:

Testing

Still to run (board owners, please)

Nobody in the lab has a T6050. If you have one of these boards, a boot row would help: boot through aura with the macOS 27.0 stub and run

ls -l /dev/accel/ ; dmesg | grep -iE 'ane|509800000|ps_ane|fab[089]'

Expected: /dev/accel/accel0 is present and there is no SError or deferred-probe line for ANE_SYS. On a stub other than 27.0, expect H17 ANE: no loader hand-off (firmware TEXT pin) and no accel node.

Details

Per-board DT change (semantic diff of dtc -I dts -O dts -s, phandles ignored):

Board Change
J714s none (DTB byte-identical)
J714c, J716s, J873s, K114s, K116c ane0 okay with memory-region = the two placeholders; ane0_dart{,1,2} okay; ps_ane_sys okay; ps_fab0_piogw, ps_fab8_soc, ps_fab9_soc okay + apple,firmware-owned; two disabled /reserved-memory/ane-firmware-{text,data}@0
K116s the same, but without the fabric domains, which it already had
J716c, J775c, J775d, K114c none (DTB byte-identical)

On those five boards nothing else references the three fabric domains while enabled. Their other children (fab3/5/6/7, SIO, SEP, ISP) all stay disabled, so enabling them does not make any other device probe.

Firmware-owned domains are never read, reset or switched by the pmgr driver (pmgr-pwrstate.c: it only sets GENPD_FLAG_ALWAYS_ON). The new hardware access is the same as on J714s: the DART probe powering ANE_SYS, and the driver's checks of the hand-off. This assumes FAB9_SOC is up at hand-off on boards without the camera, as it is on J714s, J716c and K116s. The boot row above checks that.

The ANE description is DjDeveloperr's (6483844). This PR only moves it and widens where it is included.

Assisted-by: LLM (Claude:Opus 5.5)

t6050-j714s-ane.dtsi has nothing J714s-specific in it: the ane0 node, its
three DARTs and ANE_SYS are in t6050-peripherals.dtsi, and the two preload
reservations are placeholders that the boot loader fills from the ADT of the
machine it boots (aura matches the node by its "apple,t6050-ane"
compatible, on any board). The accel/ane driver also matches only the
compatible and refuses a hand-off whose preloaded firmware it does not
know.

Move the content to t6050-ane.dtsi. The new file also holds a vote on
ANE_SYS's parents in the ADT power tree, FAB8_SOC and FAB9_SOC, and on
FAB8_SOC's parent FAB0_PIOGW, as firmware-owned domains. Without them
ANE_SYS cannot register on a board that does not describe its Secure
Enclave or camera, which today are the only users that enable those
fabrics. J714s already enables all three with the same properties.

t6050-j714s-ane.dtsi stays as a one-line include for board files that
still name it; t6050-ane.dtsi has an include guard, so a board that gets
both is fine.

The ANE description is DjDeveloperr's, from commit 6483844
("arm64: dts: apple: t6050: Describe the ANE on the T8140 model, enable it
on J714s"); this only changes where it lives.

J714s now includes t6050-ane.dtsi directly. Its DTB is byte-identical
before and after, and no other board changes in this commit.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…873s, K114s, K116c and K116s

The ADT of every one of these boards has the same ane0 as J714s: device
type ane, compatible "ane,t8132exclave", ane-type 0x220, die 0,
interrupts 954 and 967, clock ids 335, 334 and 381, and the dart-ane0
DARTs on interrupt 955. That is the engine t6050-peripherals.dtsi
describes, so enable it on them.

A board opts in by defining T6050_ANE before it includes
t6050-peripherals.dtsi, which then includes t6050-ane.dtsi at its end. This
keeps the change to one line at the top of each board file, away from the
lines other changes edit next to the peripherals include. The DTBs are the
same as with a direct include after t6050-peripherals.dtsi.

Nothing starts on its own. The boot loader enables ane0 and its
reservations only when the ADT says the firmware is preloaded and its
segments check out; otherwise it disables ane0. The driver then starts
the engine only when the preloaded TEXT matches a firmware build it knows,
and logs the digest and leaves the engine alone when it does not.

Left out here:
 - J716c, K114c and J775c, which have their own open changes for this.
 - J775d (M5 Ultra): the second die has its own ane1, DARTs and power
   state, none of which are described, and the boot loader fills only
   /arm-io/ane0.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The apple,t6050-dart binding requires reg-names when a DART has its
DAPF range as a second reg entry. The ANE DART never had them, which
did not show while only the J714s enabled it. Now that the Neural
Engine is shared with six more boards, dt-checks reports the missing
property on each. Name the ranges dart and dapf, as the other two-range
T6050 DARTs do; linux#1956 and linux#1607 carry the same line.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
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.

1 participant