From 20e96fbe6410866472f535c4b648bcb2b19b1030 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Thu, 19 Nov 2026 22:48:56 +1100 Subject: [PATCH 1/3] arm64: dts: apple: t6050: describe the Neural Engine in a SoC-level dtsi 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 648384409c69 ("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 --- arch/arm64/boot/dts/apple/t6050-ane.dtsi | 80 +++++++++++++++++++ .../arm64/boot/dts/apple/t6050-j714s-ane.dtsi | 46 +---------- arch/arm64/boot/dts/apple/t6050-j714s.dts | 2 +- 3 files changed, 84 insertions(+), 44 deletions(-) create mode 100644 arch/arm64/boot/dts/apple/t6050-ane.dtsi diff --git a/arch/arm64/boot/dts/apple/t6050-ane.dtsi b/arch/arm64/boot/dts/apple/t6050-ane.dtsi new file mode 100644 index 0000000000000..aaf2fb2d9a6d2 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6050-ane.dtsi @@ -0,0 +1,80 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * The T6050 Neural Engine (ane0 in t6050-peripherals.dtsi), for any board + * that includes this after t6050-peripherals.dtsi. iBoot preloads the + * personalized firmware (ADT ane0 segment-ranges, TEXT 0xc0000 and DATA + * 0x2ac000 bytes). The boot loader fills the two reservations from that + * boot's ADT, renames them to their physical addresses and enables them; a + * boot without that hand-off leaves ane0 disabled, and the ANE driver leaves + * the engine off unless the preloaded firmware is one it knows. + * + * This describes die 0's engine only. The second die of an M5 Ultra has its + * own engine, DARTs and power state, which are not described yet. + */ + +#ifndef __T6050_ANE_DTSI__ +#define __T6050_ANE_DTSI__ + +/ { + reserved-memory { + ane_fw_text: ane-firmware-text@0 { + compatible = "apple,asc-mem"; + reg = <0 0 0 0>; + no-map; + status = "disabled"; + }; + + ane_fw_data: ane-firmware-data@0 { + compatible = "apple,asc-mem"; + reg = <0 0 0 0>; + no-map; + status = "disabled"; + }; + }; +}; + +&ane0 { + memory-region = <&ane_fw_text>, <&ane_fw_data>; + memory-region-names = "firmware-text", "firmware-data"; + status = "okay"; +}; + +&ane0_dart { + status = "okay"; +}; + +&ane0_dart1 { + status = "okay"; +}; + +&ane0_dart2 { + status = "okay"; +}; + +&ps_ane_sys { + status = "okay"; +}; + +/* + * ANE_SYS's parents in the ADT power tree are FAB8_SOC and FAB9_SOC, and + * FAB8_SOC's is FAB0_PIOGW. The firmware keeps these fabrics up (the Secure + * Enclave and the camera sit behind them too), so Linux only holds a vote on + * them and never switches them. A board that already enables them for its + * Secure Enclave or camera ends up with the same nodes. + */ +&ps_fab0_piogw { + apple,firmware-owned; + status = "okay"; +}; + +&ps_fab8_soc { + apple,firmware-owned; + status = "okay"; +}; + +&ps_fab9_soc { + apple,firmware-owned; + status = "okay"; +}; + +#endif /* __T6050_ANE_DTSI__ */ diff --git a/arch/arm64/boot/dts/apple/t6050-j714s-ane.dtsi b/arch/arm64/boot/dts/apple/t6050-j714s-ane.dtsi index 788acc71ead54..afed4c2477fef 100644 --- a/arch/arm64/boot/dts/apple/t6050-j714s-ane.dtsi +++ b/arch/arm64/boot/dts/apple/t6050-j714s-ane.dtsi @@ -1,47 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ OR MIT /* - * The J714s Neural Engine. iBoot preloads the personalized firmware (ADT ane0 - * segment-ranges, TEXT 0xc0000 and DATA 0x2ac000 bytes). The boot loader fills - * the two reservations from that boot's ADT, renames them to their physical - * addresses and enables them; until then the ANE driver leaves the engine off. + * The Neural Engine is described for every T6050 board in t6050-ane.dtsi. + * This name is kept for board files that still include it. */ -/ { - reserved-memory { - ane_fw_text: ane-firmware-text@0 { - compatible = "apple,asc-mem"; - reg = <0 0 0 0>; - no-map; - status = "disabled"; - }; - - ane_fw_data: ane-firmware-data@0 { - compatible = "apple,asc-mem"; - reg = <0 0 0 0>; - no-map; - status = "disabled"; - }; - }; -}; - -&ane0 { - memory-region = <&ane_fw_text>, <&ane_fw_data>; - memory-region-names = "firmware-text", "firmware-data"; - status = "okay"; -}; - -&ane0_dart { - status = "okay"; -}; - -&ane0_dart1 { - status = "okay"; -}; - -&ane0_dart2 { - status = "okay"; -}; - -&ps_ane_sys { - status = "okay"; -}; +#include "t6050-ane.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6050-j714s.dts b/arch/arm64/boot/dts/apple/t6050-j714s.dts index 383ec08bedbe2..d705db465325f 100644 --- a/arch/arm64/boot/dts/apple/t6050-j714s.dts +++ b/arch/arm64/boot/dts/apple/t6050-j714s.dts @@ -712,7 +712,7 @@ #include "t6050-j714s-dpaudio.dtsi" /* The Neural Engine, started only after the boot loader's preload hand-off */ -#include "t6050-j714s-ane.dtsi" +#include "t6050-ane.dtsi" #include "t6050-j714s-sleep.dtsi" #include "t6050-j714s-sleep-soc.dtsi" #include "t6050-j714s-sleep-adt.dtsi" From f86cd561d39a87041cf15c6456705a05bdaea2bc Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Thu, 19 Nov 2026 23:26:47 +1100 Subject: [PATCH 2/3] arm64: dts: apple: t6050: enable the Neural Engine on J714c, J716s, J873s, 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 --- arch/arm64/boot/dts/apple/t6050-j714c.dts | 3 +++ arch/arm64/boot/dts/apple/t6050-j716s.dts | 3 +++ arch/arm64/boot/dts/apple/t6050-j873s.dts | 3 +++ arch/arm64/boot/dts/apple/t6050-k114s.dts | 3 +++ arch/arm64/boot/dts/apple/t6050-k116c.dts | 3 +++ arch/arm64/boot/dts/apple/t6050-k116s.dts | 3 +++ arch/arm64/boot/dts/apple/t6050-peripherals.dtsi | 8 ++++++++ 7 files changed, 26 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t6050-j714c.dts b/arch/arm64/boot/dts/apple/t6050-j714c.dts index cf1d62c690fcc..eadbc185ca483 100644 --- a/arch/arm64/boot/dts/apple/t6050-j714c.dts +++ b/arch/arm64/boot/dts/apple/t6050-j714c.dts @@ -12,6 +12,9 @@ * Copyright The Asahi Linux Contributors */ +/* The Neural Engine (t6050-ane.dtsi, through t6050-peripherals.dtsi) */ +#define T6050_ANE + /dts-v1/; #define T6050_J714C diff --git a/arch/arm64/boot/dts/apple/t6050-j716s.dts b/arch/arm64/boot/dts/apple/t6050-j716s.dts index 43747a4ce6be7..3957c3130cf36 100644 --- a/arch/arm64/boot/dts/apple/t6050-j716s.dts +++ b/arch/arm64/boot/dts/apple/t6050-j716s.dts @@ -13,6 +13,9 @@ * Copyright The Asahi Linux Contributors */ +/* The Neural Engine (t6050-ane.dtsi, through t6050-peripherals.dtsi) */ +#define T6050_ANE + /dts-v1/; #include diff --git a/arch/arm64/boot/dts/apple/t6050-j873s.dts b/arch/arm64/boot/dts/apple/t6050-j873s.dts index 0a7976e50230f..e211df02d6ee8 100644 --- a/arch/arm64/boot/dts/apple/t6050-j873s.dts +++ b/arch/arm64/boot/dts/apple/t6050-j873s.dts @@ -11,6 +11,9 @@ * Copyright The Asahi Linux Contributors */ +/* The Neural Engine (t6050-ane.dtsi, through t6050-peripherals.dtsi) */ +#define T6050_ANE + /dts-v1/; #include "t6050-max.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6050-k114s.dts b/arch/arm64/boot/dts/apple/t6050-k114s.dts index caa609babef0d..b40d9239b5e4b 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114s.dts +++ b/arch/arm64/boot/dts/apple/t6050-k114s.dts @@ -9,6 +9,9 @@ * Copyright The Asahi Linux Contributors */ +/* The Neural Engine (t6050-ane.dtsi, through t6050-peripherals.dtsi) */ +#define T6050_ANE + #include "t6050-k114-k116.dtsi" / { diff --git a/arch/arm64/boot/dts/apple/t6050-k116c.dts b/arch/arm64/boot/dts/apple/t6050-k116c.dts index ff9e875fb1951..8da0c8c9ebf0c 100644 --- a/arch/arm64/boot/dts/apple/t6050-k116c.dts +++ b/arch/arm64/boot/dts/apple/t6050-k116c.dts @@ -9,6 +9,9 @@ * Copyright The Asahi Linux Contributors */ +/* The Neural Engine (t6050-ane.dtsi, through t6050-peripherals.dtsi) */ +#define T6050_ANE + #include "t6050-k114-k116.dtsi" / { diff --git a/arch/arm64/boot/dts/apple/t6050-k116s.dts b/arch/arm64/boot/dts/apple/t6050-k116s.dts index fe6468edc72c1..d49b8d4f7292e 100644 --- a/arch/arm64/boot/dts/apple/t6050-k116s.dts +++ b/arch/arm64/boot/dts/apple/t6050-k116s.dts @@ -9,6 +9,9 @@ * Copyright The Asahi Linux Contributors */ +/* The Neural Engine (t6050-ane.dtsi, through t6050-peripherals.dtsi) */ +#define T6050_ANE + #include "t6050-k114-k116.dtsi" / { diff --git a/arch/arm64/boot/dts/apple/t6050-peripherals.dtsi b/arch/arm64/boot/dts/apple/t6050-peripherals.dtsi index 488f3c3ee6d6e..e7c79066e7644 100644 --- a/arch/arm64/boot/dts/apple/t6050-peripherals.dtsi +++ b/arch/arm64/boot/dts/apple/t6050-peripherals.dtsi @@ -3702,3 +3702,11 @@ status = "disabled"; }; }; + +/* + * The Neural Engine's firmware reservations and enables. A board whose engine + * is described defines T6050_ANE before including this file. + */ +#ifdef T6050_ANE +#include "t6050-ane.dtsi" +#endif From f76b13ab7ae62f7dc0e1cf4a00406285e7834155 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Fri, 20 Nov 2026 02:11:34 +1100 Subject: [PATCH 3/3] arm64: dts: apple: t6050: name the ANE DART's register ranges 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 --- arch/arm64/boot/dts/apple/t6050-peripherals.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/apple/t6050-peripherals.dtsi b/arch/arm64/boot/dts/apple/t6050-peripherals.dtsi index e7c79066e7644..7eb10bb03d4ce 100644 --- a/arch/arm64/boot/dts/apple/t6050-peripherals.dtsi +++ b/arch/arm64/boot/dts/apple/t6050-peripherals.dtsi @@ -3355,6 +3355,7 @@ compatible = "apple,t6050-dart", "apple,t8110-dart"; reg = <0x5 0x9800000 0x0 0xc000>, <0x5 0x9810000 0x0 0x4000>; + reg-names = "dart", "dapf"; interrupts = ; #iommu-cells = <1>; power-domains = <&ps_ane_sys>;