From 4d9bbf3c4bf1a446d33656fdb112c778204c1424 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Thu, 19 Nov 2026 23:34:33 +1100 Subject: [PATCH 1/4] arm64: dts: apple: t8142-j813: Drop the duplicated N1 and encoder blocks The N1 PCIe functions (with their aliases) and the video encoder's status overrides were each written twice in t8142-j813.dts, the second copies coming in with merges. Drop the second copy of each. The built t8142-j813.dtb is byte-identical before and after. Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t8142-j813.dts | 84 ------------------------ 1 file changed, 84 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t8142-j813.dts b/arch/arm64/boot/dts/apple/t8142-j813.dts index aaa635fa853fb..91547e6ce6a75 100644 --- a/arch/arm64/boot/dts/apple/t8142-j813.dts +++ b/arch/arm64/boot/dts/apple/t8142-j813.dts @@ -190,49 +190,6 @@ }; }; -/* - * N1 functions behind apcie port 0 (0000:00:00.0 -> 01:00.{0,1,2}), so the - * loader has somewhere to put the factory addresses: it copies ADT /chosen - * mac-address-wifi0 and mac-address-bluetooth0 into the wifi0/bluetooth0 - * alias targets. Same nodes as t8142-j815.dts (same N1, same PCI IDs). - */ -/ { - aliases { - wifi0 = &n1_alpha; - bluetooth0 = &n1_beta; - }; -}; - -&pcie0 { - n1_port: pci@0,0 { - device_type = "pci"; - reg = <0x0 0x0 0x0 0x0 0x0>; - bus-range = <1 1>; - #address-cells = <3>; - #size-cells = <2>; - ranges; - - n1_control: control@0,0 { - compatible = "apple,t8142-centauri-control", "pci106b,1900"; - reg = <0x10000 0x0 0x0 0x0 0x0>; - }; - - n1_alpha: wifi@0,1 { - compatible = "pci106b,1902"; - reg = <0x10100 0x0 0x0 0x0 0x0>; - /* Filled by the loader */ - local-mac-address = [00 00 00 00 00 00]; - }; - - n1_beta: bluetooth@0,2 { - compatible = "pci106b,1903"; - reg = <0x10200 0x0 0x0 0x0 0x0>; - /* Filled by the loader */ - local-bd-address = [00 00 00 00 00 00]; - }; - }; -}; - &mtp_hid { multi-touch { firmware-name = "apple/tpmtfw-j813.bin"; @@ -304,47 +261,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" From 5ef8284e21f619ce7840dee38b2ba0c3d4d41410 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Thu, 19 Nov 2026 23:34:43 +1100 Subject: [PATCH 2/4] arm64: dts: apple: t8142-j815: Share J813's sleep and power nodes t8142-j813-j815-sleep.dtsi describes suspend-to-RAM for both M5 Airs, but only t8142-j813.dts included it, and the nodes around it were in the J813 board file alone: the CPU cluster power gate, the internal display's power words (dcp_power, and the DCP's apple,display-power), the DCP DART's PS write-disable word and the PMU's SPMI wake source. J815 therefore had no sleep controller, no DCP firmware stop, and its boot P core never powered down in WFI. All of them are words of the T8142 PMGR, DCP and nub-spmi0, the same on both boards (the sleep dtsi already lists NUB.SPMI0.SW3 among the wake sources taken from the J815 ADT). Move the cluster gate, dcp_power and the DCP/DART properties into t8142-j813-j815.dtsi, the PMU source into the sleep node, and include the sleep dtsi from t8142-j815.dts. t8142-j813.dtb keeps every node and value (only the order of /soc children changes). t8142-j815.dtb gains exactly J813's nodes, except that the sleep node lists only the DCP as display coprocessor until J815 describes its external displays. Fixes: 4de8bf0cefe5 ("arm64: dts: apple: t8142-j813: Describe suspend-to-RAM") Signed-off-by: Ryan Murray --- .../boot/dts/apple/t8142-j813-j815-sleep.dtsi | 7 ++- .../arm64/boot/dts/apple/t8142-j813-j815.dtsi | 42 +++++++++++++++++ arch/arm64/boot/dts/apple/t8142-j813.dts | 47 ------------------- arch/arm64/boot/dts/apple/t8142-j815.dts | 2 + 4 files changed, 49 insertions(+), 49 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t8142-j813-j815-sleep.dtsi b/arch/arm64/boot/dts/apple/t8142-j813-j815-sleep.dtsi index 3399b0b05cd5f..f884291276568 100644 --- a/arch/arm64/boot/dts/apple/t8142-j813-j815-sleep.dtsi +++ b/arch/arm64/boot/dts/apple/t8142-j813-j815-sleep.dtsi @@ -4,8 +4,9 @@ * the shared PCIe block the wake brings back, and the port controllers' sleep power state. * Included at the end of each board's device tree, after the nodes it refers to. * - * The boot core's power gate (cluster_pwrgate) and the DCP DART's PS write-disable bit come - * with the board's own nodes (aurora-silicon/linux#1942, #1941). + * The boot core's power gate (cluster_pwrgate), the internal display's power words (dcp_power) + * and the DCP DART's PS write-disable bit are in t8142-j813-j815.dtsi (aurora-silicon/linux#1942, + * #1941). */ #include @@ -105,6 +106,8 @@ * SMC.OutboxNotEmpty, MTP.DOCK.CHANNELS.AP0.IRQ and MTP.OutboxNotEmpty. */ apple,wake-enable = <152 72 168 190 89 108>; + /* PMU RTC: peripheral source 2, routed through NUB.SPMI0.SW3 (wake source 152). */ + apple,spmi-pmu-sources = <0x600 0x4>; /* * The DCP, then the external DCPs once the tree describes them (dcpext0, dcpext1): * the sleep lowers them with the display, and refuses while an undescribed one is up. diff --git a/arch/arm64/boot/dts/apple/t8142-j813-j815.dtsi b/arch/arm64/boot/dts/apple/t8142-j813-j815.dtsi index f07cf01fded72..20d98a24f1e65 100644 --- a/arch/arm64/boot/dts/apple/t8142-j813-j815.dtsi +++ b/arch/arm64/boot/dts/apple/t8142-j813-j815.dtsi @@ -389,3 +389,45 @@ &cpu7 { capacity-dmips-mhz = <1024>; }; &cpu8 { capacity-dmips-mhz = <1024>; }; &cpu9 { capacity-dmips-mhz = <1024>; }; + +&{/soc} { + /* + * The CPU clusters' power-gate enables, in /arm-io/pmgr reg[34]: E at + * +0x0 and P at +0x60, the offsets T8132 has and the two words + * AppleT8142PMGR's restoreHW sets. iBoot leaves P's clear, and the + * boot core (P core 0) then never powers down in WFI. The PMGR is the + * SoC's, so J815 has the same words. + */ + cluster_pwrgate: power-gate@380724000 { + compatible = "apple,t8142-cluster-pwrgate", "apple,cluster-pwrgate"; + reg = <0x3 0x80724000 0x0 0x4>, + <0x3 0x80724060 0x0 0x4>; + }; + + /* + * The internal display's power words for a DCP firmware stop (DPMS off): + * /arm-io/pmgr reg[34] (pwrgate: DISP_CPU's retention words 0x11cc and + * 0x11f0, the pmgr's retention_config_ff/_mem) and reg[32] (ps: DISP_CPU + * 0x10000, DISP_FE 0x318, DISP_SYS 0x290). T8142's PMC keeps no count of + * powered DCPs, so there is no pmc-dcp word. + */ + dcp_power: display-power@380724000 { + compatible = "apple,t8142-display-power"; + reg = <3 0x80724000 0 0x2000>, + <3 0x80700000 0 0x14000>; + reg-names = "pwrgate", "ps"; + }; +}; + +&dcp { + apple,display-power = <&dcp_power>; +}; + +&dcp_dart { + /* PMGR PS write-disable for DISP_CPU: offset 0x3fdc, bit 6. */ + reg = <2 0x86340000 0 0x20000>, + <3 0x80717fdc 0 0x4>; + reg-names = "dart", "ps-wr-dis"; + apple,ps-wr-dis-bit = <6>; +}; + diff --git a/arch/arm64/boot/dts/apple/t8142-j813.dts b/arch/arm64/boot/dts/apple/t8142-j813.dts index 91547e6ce6a75..f1654ec15159a 100644 --- a/arch/arm64/boot/dts/apple/t8142-j813.dts +++ b/arch/arm64/boot/dts/apple/t8142-j813.dts @@ -196,20 +196,6 @@ }; }; -&{/soc} { - /* - * The CPU clusters' power-gate enables, in /arm-io/pmgr reg[34]: E at - * +0x0 and P at +0x60, the offsets T8132 has and the two words - * AppleT8142PMGR's restoreHW sets. iBoot leaves P's clear, and the - * boot core (P core 0) then never powers down in WFI. - */ - cluster_pwrgate: power-gate@380724000 { - compatible = "apple,t8142-cluster-pwrgate", "apple,cluster-pwrgate"; - reg = <0x3 0x80724000 0x0 0x4>, - <0x3 0x80724060 0x0 0x4>; - }; -}; - /* * 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 @@ -266,39 +252,6 @@ #include "t8142-j813-dcpext.dtsi" -&sleep { - /* PMU RTC: peripheral source 2, routed through NUB.SPMI0.SW3. */ - apple,spmi-pmu-sources = <0x600 0x4>; -}; - -&{/soc} { - /* - * The internal display's power words for a DCP firmware stop (DPMS off): - * /arm-io/pmgr reg[34] (pwrgate: DISP_CPU's retention words 0x11cc and - * 0x11f0, the pmgr's retention_config_ff/_mem) and reg[32] (ps: DISP_CPU - * 0x10000, DISP_FE 0x318, DISP_SYS 0x290). T8142's PMC keeps no count of - * powered DCPs, so there is no pmc-dcp word. - */ - dcp_power: display-power@380724000 { - compatible = "apple,t8142-display-power"; - reg = <3 0x80724000 0 0x2000>, - <3 0x80700000 0 0x14000>; - reg-names = "pwrgate", "ps"; - }; -}; - -&dcp { - apple,display-power = <&dcp_power>; -}; - -&dcp_dart { - /* PMGR PS write-disable for DISP_CPU: offset 0x3fdc, bit 6. */ - reg = <2 0x86340000 0 0x20000>, - <3 0x80717fdc 0 0x4>; - reg-names = "dart", "ps-wr-dis"; - apple,ps-wr-dis-bit = <6>; -}; - &{/reserved-memory} { /* * Both roles' __TEXT, contiguous (ADT gfx-asc and gfx1-asc segment-ranges), diff --git a/arch/arm64/boot/dts/apple/t8142-j815.dts b/arch/arm64/boot/dts/apple/t8142-j815.dts index 05d2e666cdb7b..3ad289b688056 100644 --- a/arch/arm64/boot/dts/apple/t8142-j815.dts +++ b/arch/arm64/boot/dts/apple/t8142-j815.dts @@ -528,3 +528,5 @@ &hpm1 { apple,sleep-ssps-rules; }; + +#include "t8142-j813-j815-sleep.dtsi" From ae49d47629fd2bcf7e1a1664ec804d5f956776c2 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Thu, 19 Nov 2026 23:35:15 +1100 Subject: [PATCH 3/4] arm64: dts: apple: t8142-j813: Enable the ANE and the JPEG engines J815 enables the Neural Engine and both JPEG engines; J813 left them disabled although they are the same T8142 nodes, with the same ADT entries (J813 27.0.1 ADT: ane ane-type 528, IRQs 751 and 764; jpeg0, jpeg1 and dart-jpeg IRQs 1156, 1159 and 1157). The boot loader hands the ANE preload over by the apple,t8142-ane compatible and disables the node when there is none; the JPEG engines need no firmware. Move the video encoder, ANE and JPEG enables into t8142-j813-j815.dtsi so both boards share them. t8142-j815.dtb is unchanged; t8142-j813.dtb changes only in those nine status properties. Signed-off-by: Ryan Murray --- .../arm64/boot/dts/apple/t8142-j813-j815.dtsi | 85 +++++++++++++++++++ arch/arm64/boot/dts/apple/t8142-j813.dts | 41 --------- arch/arm64/boot/dts/apple/t8142-j815.dts | 82 ------------------ 3 files changed, 85 insertions(+), 123 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t8142-j813-j815.dtsi b/arch/arm64/boot/dts/apple/t8142-j813-j815.dtsi index 20d98a24f1e65..e62457de8596f 100644 --- a/arch/arm64/boot/dts/apple/t8142-j813-j815.dtsi +++ b/arch/arm64/boot/dts/apple/t8142-j813-j815.dtsi @@ -431,3 +431,88 @@ apple,ps-wr-dis-bit = <6>; }; +/* + * The video encoder, its two DARTs and the VENC power tree: ADT ave behind + * dart-ave (DART + CPUDART), the same addresses, interrupts and power states + * on both boards. The boot loader hands over iBoot's preloaded firmware + * (memory regions, CRCs in /chosen) or disables the encoder 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 (ADT ane and dart-ane, the same on both boards). It stays + * off until the first request: the firmware is started then, from the preload, + * and system sleep cycles it cold. The boot loader hands the preload over by + * the engine's compatible, or disables the node when there is none. + */ +&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 (ADT jpeg0, jpeg1, dart-jpeg). */ +&ps_jpg { + status = "okay"; +}; + +&jpeg_dart { + status = "okay"; +}; + +&jpeg0 { + status = "okay"; +}; + +&jpeg1 { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/apple/t8142-j813.dts b/arch/arm64/boot/dts/apple/t8142-j813.dts index f1654ec15159a..8d87bfd47d957 100644 --- a/arch/arm64/boot/dts/apple/t8142-j813.dts +++ b/arch/arm64/boot/dts/apple/t8142-j813.dts @@ -196,47 +196,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. */ /* diff --git a/arch/arm64/boot/dts/apple/t8142-j815.dts b/arch/arm64/boot/dts/apple/t8142-j815.dts index 3ad289b688056..01642eccd0d4f 100644 --- a/arch/arm64/boot/dts/apple/t8142-j815.dts +++ b/arch/arm64/boot/dts/apple/t8142-j815.dts @@ -438,88 +438,6 @@ 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"; -}; - /* The port controllers follow the sleep's command rules (tipd: woken first, read at intervals) */ &hpm0 { apple,sleep-ssps-rules; From 185dc8fcc6b50cddddad41a25ad422ac0edda5e6 Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 20 Nov 2026 19:25:10 +0700 Subject: [PATCH 4/4] arm64: dts: apple: t8142-j815: External displays on the USB-C ports The J815 has the J813's two USB-C ports with the same blocks behind them: dispext0/1 with their DARTs, the ATC PHYs' DisplayPort side, the display crossbars and the routes to the Type-C connectors. Include t8142-j813-dcpext.dtsi as the J813 does. Everything in it stays disabled until the loader hands the processors over and enables them. On a J815 (macOS 27.2 stub) with the hand-off, nothing plugged in: both hand-offs are okay, both external processors bind to the display subsystem, and DP-1 and DP-2 appear as disconnected connectors next to the panel. Signed-off-by: Nick --- arch/arm64/boot/dts/apple/t8142-j815.dts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t8142-j815.dts b/arch/arm64/boot/dts/apple/t8142-j815.dts index 01642eccd0d4f..61c60165118db 100644 --- a/arch/arm64/boot/dts/apple/t8142-j815.dts +++ b/arch/arm64/boot/dts/apple/t8142-j815.dts @@ -448,3 +448,11 @@ }; #include "t8142-j813-j815-sleep.dtsi" + +/* + * The external display processors (dispext0/1), their DARTs, the display + * crossbars and the USB-C ports' DisplayPort routes: the same two ports and + * blocks as the J813. The loader hands both processors over and enables + * them; without its hand-off they stay disabled. + */ +#include "t8142-j813-dcpext.dtsi"