From 1f4da1ec68eef4aeb9d766570f308756b5e8b26f Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Thu, 19 Nov 2026 23:34:07 +1100 Subject: [PATCH] arm64: dts: apple: t8142: Neural Engine, video encoder and JPEG on every M5 The Neural Engine (with its three DARTs and ANE_SYS power state), the video encoder (two DARTs, VENC power tree) and both JPEG engines (DART, JPG power state) are SoC blocks: the J704, J813 and J815 ADTs give the same addresses, interrupts and power gates for ane, dart-ane, ave, dart-ave, jpeg0, jpeg1 and dart-jpeg. Only the J815 enabled all three and the J813 only the encoder (twice); the J704 had none of them. Turn them on in t8142-peripherals.dtsi and drop the per-board enables. The ANE and the encoder run firmware that iBoot preloads: the boot loader hands the preload over by compatible and disables the node when the ADT has none, so a board without a preload keeps them off. Every DART keeps its engine's power domain. The JPEG engines need no firmware. J815: no change in the built tree beyond status "okay" becoming implicit. J813: gains the Neural Engine and both JPEG engines. J704: gains all three. The ANE and JPEG enables on J815 come from m0d16l14n1's 33d8f13414be9 and c3c1417eadb1c. Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t8142-j813.dts | 82 ------------------- arch/arm64/boot/dts/apple/t8142-j815.dts | 82 ------------------- .../boot/dts/apple/t8142-peripherals.dtsi | 30 +++---- 3 files changed, 10 insertions(+), 184 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t8142-j813.dts b/arch/arm64/boot/dts/apple/t8142-j813.dts index fe9e3b8ce77db..5dc6ebcb4d2d3 100644 --- a/arch/arm64/boot/dts/apple/t8142-j813.dts +++ b/arch/arm64/boot/dts/apple/t8142-j813.dts @@ -253,47 +253,6 @@ }; }; -/* - * The video encoder, its two DARTs and the VENC power tree. The J813 ADT has - * the same ave and dart-ave as the J815. The boot loader hands over iBoot's - * preloaded firmware, or disables the encoder when there is none. - */ -&ps_venc_sys { - status = "okay"; -}; - -&ps_venc_dma { - status = "okay"; -}; - -&ps_venc_pipe4 { - status = "okay"; -}; - -&ps_venc_pipe5 { - status = "okay"; -}; - -&ps_venc_me0 { - status = "okay"; -}; - -&ps_venc_me1 { - status = "okay"; -}; - -&ave_dart0 { - status = "okay"; -}; - -&ave_dart1 { - status = "okay"; -}; - -&ave { - status = "okay"; -}; - /* Unexposed chassis port instances remain described and disabled. */ /* @@ -304,47 +263,6 @@ status = "okay"; }; -/* - * Video encoder: ADT ave ("ave2", pre-loaded) behind dart-ave, the same - * addresses, interrupts and power states as on the J815. aura hands over the - * preloaded firmware or disables the node. - */ -&ps_venc_sys { - status = "okay"; -}; - -&ps_venc_dma { - status = "okay"; -}; - -&ps_venc_pipe4 { - status = "okay"; -}; - -&ps_venc_pipe5 { - status = "okay"; -}; - -&ps_venc_me0 { - status = "okay"; -}; - -&ps_venc_me1 { - status = "okay"; -}; - -&ave_dart0 { - status = "okay"; -}; - -&ave_dart1 { - status = "okay"; -}; - -&ave { - status = "okay"; -}; - #include "t8142-j813-sep.dtsi" #include "t8142-j813-j815-sleep.dtsi" diff --git a/arch/arm64/boot/dts/apple/t8142-j815.dts b/arch/arm64/boot/dts/apple/t8142-j815.dts index c45d185c87c4c..6906adcc56eb8 100644 --- a/arch/arm64/boot/dts/apple/t8142-j815.dts +++ b/arch/arm64/boot/dts/apple/t8142-j815.dts @@ -389,85 +389,3 @@ &mcc { status = "okay"; }; - -/* - * Video encoder: ADT ave behind dart-ave (DART + CPUDART). aura hands over the - * preloaded 26A428 firmware (memory regions, CRCs in /chosen) or disables the - * node when the ADT has no preload. - */ -&ps_venc_sys { - status = "okay"; -}; - -&ps_venc_dma { - status = "okay"; -}; - -&ps_venc_pipe4 { - status = "okay"; -}; - -&ps_venc_pipe5 { - status = "okay"; -}; - -&ps_venc_me0 { - status = "okay"; -}; - -&ps_venc_me1 { - status = "okay"; -}; - -&ave_dart0 { - status = "okay"; -}; - -&ave_dart1 { - status = "okay"; -}; - -&ave { - status = "okay"; -}; - -/* - * The Neural Engine. It stays off until the first request: the firmware is - * started then, from the preload, and system sleep cycles it cold. - */ -&ps_ane_sys { - status = "okay"; -}; - -&ane_dart0 { - status = "okay"; -}; - -&ane_dart1 { - status = "okay"; -}; - -&ane_dart2 { - status = "okay"; -}; - -&ane { - status = "okay"; -}; - -/* Both JPEG engines and their DART. */ -&ps_jpg { - status = "okay"; -}; - -&jpeg_dart { - status = "okay"; -}; - -&jpeg0 { - status = "okay"; -}; - -&jpeg1 { - status = "okay"; -}; diff --git a/arch/arm64/boot/dts/apple/t8142-peripherals.dtsi b/arch/arm64/boot/dts/apple/t8142-peripherals.dtsi index 949f6da167a89..bb0d0599a4fb2 100644 --- a/arch/arm64/boot/dts/apple/t8142-peripherals.dtsi +++ b/arch/arm64/boot/dts/apple/t8142-peripherals.dtsi @@ -164,7 +164,6 @@ power-domains = <&ps_ane_sys>; /* The firmware DVAs reach 0x100_xxxx_xxxx. */ apple,dma-range = <0x0 0x0 0x400 0x0>; - status = "disabled"; }; ane_dart1: iommu@421820000 { @@ -175,7 +174,6 @@ interrupts = ; power-domains = <&ps_ane_sys>; apple,dma-range = <0x0 0x0 0x400 0x0>; - status = "disabled"; }; ane_dart2: iommu@421840000 { @@ -186,7 +184,6 @@ interrupts = ; power-domains = <&ps_ane_sys>; apple,dma-range = <0x0 0x0 0x400 0x0>; - status = "disabled"; }; /* @@ -195,6 +192,9 @@ * boot loader hands the preload over as firmware-text and firmware-data. * PWGATE is the ADT's reg[2] (PMGR +0x24000) + 0x3640, measured under * macOS 27.2.1. + * Every T8142 board has it (same ane/dart-ane in the J704, J813 and J815 + * ADTs), so it is on by default; the boot loader hands the preload over + * by this compatible and disables the node when the ADT has none. */ ane: ane@420000000 { compatible = "apple,t8142-ane"; @@ -213,7 +213,6 @@ 0x3807002e8 0x3807002eb 0x38070c008 0x38070c00b 0x582668000 0x582668003>; - status = "disabled"; }; scaler0_dart: iommu@305260000 { @@ -226,7 +225,10 @@ status = "disabled"; }; - /* ADT dart-jpeg: one DART for both engines, jpeg0 on SID 0, jpeg1 on SID 1. */ + /* + * ADT dart-jpeg: one DART for both engines, jpeg0 on SID 0, jpeg1 on SID 1. + * The JPEG engines need no firmware and are on every T8142 board. + */ jpeg_dart: iommu@301020000 { compatible = "apple,t8142-dart", "apple,t8110-dart"; reg = <0x3 0x1020000 0x0 0xc000>; @@ -235,7 +237,6 @@ /* ADT vm-base 0x100_0000_0000, vm-size 0x300_0000_0000 */ apple,dma-range = <0x100 0x0 0x300 0x0>; power-domains = <&ps_jpg>; - status = "disabled"; }; /* @@ -248,7 +249,6 @@ interrupts = ; iommus = <&jpeg_dart 0>; power-domains = <&ps_jpg>; - status = "disabled"; }; jpeg1: jpeg@301060000 { @@ -257,7 +257,6 @@ interrupts = ; iommus = <&jpeg_dart 1>; power-domains = <&ps_jpg>; - status = "disabled"; }; apr_dart: iommu@3a1020000 { @@ -562,7 +561,6 @@ #power-domain-cells = <0>; #reset-cells = <0>; label = "jpg"; - status = "disabled"; }; /* ADT pmgr device ANE_SYS (id 73), parent AFISOCNI3 (no power state). */ @@ -572,7 +570,6 @@ #power-domain-cells = <0>; #reset-cells = <0>; label = "ane_sys"; - status = "disabled"; }; ps_msr: power-controller@2a8 { @@ -604,7 +601,6 @@ #power-domain-cells = <0>; #reset-cells = <0>; label = "venc_sys"; - status = "disabled"; }; ps_venc_dma: power-controller@8000 { @@ -614,7 +610,6 @@ #reset-cells = <0>; label = "venc_dma"; power-domains = <&ps_venc_sys>; - status = "disabled"; }; ps_venc_pipe4: power-controller@8008 { @@ -624,7 +619,6 @@ #reset-cells = <0>; label = "venc_pipe4"; power-domains = <&ps_venc_dma>; - status = "disabled"; }; ps_venc_pipe5: power-controller@8010 { @@ -634,7 +628,6 @@ #reset-cells = <0>; label = "venc_pipe5"; power-domains = <&ps_venc_dma>; - status = "disabled"; }; ps_venc_me0: power-controller@8018 { @@ -644,7 +637,6 @@ #reset-cells = <0>; label = "venc_me0"; power-domains = <&ps_venc_dma>; - status = "disabled"; }; ps_venc_me1: power-controller@8020 { @@ -654,7 +646,6 @@ #reset-cells = <0>; label = "venc_me1"; power-domains = <&ps_venc_me0>; - status = "disabled"; }; }; @@ -726,7 +717,9 @@ * preloaded by iBoot and handed over by the boot loader, which adds the * memory regions. dart-ave is two DARTs (DART and CPUDART) on one IRQ; * stream 12 carries the temporal filter engines and must translate - * through the encoder's domain, not bypass. + * through the encoder's domain, not bypass. On by default (same ave and + * dart-ave in the J704, J813 and J815 ADTs); the boot loader disables + * the encoder when the ADT has no preload. */ ave_dart0: iommu@281080000 { compatible = "apple,t8142-dart", "apple,t8110-dart"; @@ -735,7 +728,6 @@ power-domains = <&ps_venc_sys>; #iommu-cells = <1>; apple,dma-range = <0x100 0x00004000 0x0 0xffffc000>; - status = "disabled"; }; ave_dart1: iommu@2810a0000 { @@ -745,7 +737,6 @@ power-domains = <&ps_venc_sys>; #iommu-cells = <1>; apple,dma-range = <0x100 0x00004000 0x0 0xffffc000>; - status = "disabled"; }; ave: video-codec@281100000 { @@ -764,7 +755,6 @@ power-domain-names = "dma", "pipe4", "pipe5", "me0", "me1"; iommus = <&ave_dart0 0>, <&ave_dart0 12>, <&ave_dart1 0>, <&ave_dart1 12>; - status = "disabled"; }; scaler0: scaler@305000000 {