From 66dffb768c10e8d2da5771a0f2d329871b54355f Mon Sep 17 00:00:00 2001 From: DjDeveloperr Date: Thu, 3 Dec 2026 03:29:34 -0500 Subject: [PATCH 1/5] arm64: dts: apple: t8122: sleep controller on J504, J433 and J434 Enable the sleep controller with the registers these boards have: no SPMI port controllers (their ADT has the port controllers on I2C and no nub-spmi-a0), and the PCIe ports past port 0. With it, the memory cache controller and firmware 27.2's display sleep calls the J613 and J615 use: the ADT's mcc, dcp, pmgr and wake sources are the same on every T8122 board. Leave the pins the J504's ADT says not to restore alone, and hand its MTP firmware over running, as on the other M3 laptops. Not marked tested: deep sleep stays off by default and stops before the commit, and the default s2idle is unchanged. Signed-off-by: DjDeveloperr --- .../arm64/boot/dts/apple/t8122-j433-j434.dtsi | 19 ++++++++ arch/arm64/boot/dts/apple/t8122-j504.dts | 29 ++++++++++++ .../arm64/boot/dts/apple/t8122-usbpd-i2c.dtsi | 44 +++++++++++++++++++ 3 files changed, 92 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi b/arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi index 6236ed132dc19..14a70bdc7de76 100644 --- a/arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi +++ b/arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi @@ -90,3 +90,22 @@ }; #include "hwmon-fan-dual.dtsi" + +&mcc { + apple,boot-dma-devices = <&pmp>; + status = "okay"; +}; + +&dcp { + /* + * Firmware 27.2's display sleep calls, as on the J613 and J615 with the + * same internal DCP ABI (A534, A550, A534, A464, A537). + */ + apple,sleep-power-args = /bits/ 8 <0x01 0x00 0x00 0x01 0x01 0xaa 0xaa 0xaa>; + apple,sleep-a500-args = /bits/ 8 <0x00 0x01 0xaa 0xaa 0x00 0x00 0xaa 0xaa>; + apple,sleep-display-power-args = /bits/ 8 <0x00 0x00 0x00 0x00 0x00 0xaa 0xaa 0xaa>; + apple,sleep-display-stage-args = /bits/ 8 <0x00 0x00 0x00 0x00 0x00 0xaa 0xaa 0xaa + 0x01 0x00 0x00 0x00>; + apple,panel-video-open-delay-us = <10000>; + apple,panel-hdcp-open-arg = <3>; +}; diff --git a/arch/arm64/boot/dts/apple/t8122-j504.dts b/arch/arm64/boot/dts/apple/t8122-j504.dts index 9747e64d36d1b..87b3fa7290d3a 100644 --- a/arch/arm64/boot/dts/apple/t8122-j504.dts +++ b/arch/arm64/boot/dts/apple/t8122-j504.dts @@ -298,3 +298,32 @@ status = "disabled"; }; }; + +&mcc { + apple,boot-dma-devices = <&pmp>; + status = "okay"; +}; + +&dcp { + /* + * Firmware 27.2's display sleep calls, as on the J613 and J615 with the + * same internal DCP ABI (A534, A550, A534, A464, A537). + */ + apple,sleep-power-args = /bits/ 8 <0x01 0x00 0x00 0x01 0x01 0xaa 0xaa 0xaa>; + apple,sleep-a500-args = /bits/ 8 <0x00 0x01 0xaa 0xaa 0x00 0x00 0xaa 0xaa>; + apple,sleep-display-power-args = /bits/ 8 <0x00 0x00 0x00 0x00 0x00 0xaa 0xaa 0xaa>; + apple,sleep-display-stage-args = /bits/ 8 <0x00 0x00 0x00 0x00 0x00 0xaa 0xaa 0xaa + 0x01 0x00 0x00 0x00>; + apple,panel-video-open-delay-us = <10000>; + apple,panel-hdcp-open-arg = <3>; +}; + +&sleep { + /* ADT /arm-io/gpio0 no-restore-gpio-pins */ + apple,pinctrl-skip-pins = <5 6 37>; +}; + +/* As on the Airs: the MTP firmware is handed over running. */ +&mtp { + apple,rtkit-keep-running; +}; diff --git a/arch/arm64/boot/dts/apple/t8122-usbpd-i2c.dtsi b/arch/arm64/boot/dts/apple/t8122-usbpd-i2c.dtsi index 87fa10796099d..5c63a73e49b92 100644 --- a/arch/arm64/boot/dts/apple/t8122-usbpd-i2c.dtsi +++ b/arch/arm64/boot/dts/apple/t8122-usbpd-i2c.dtsi @@ -88,3 +88,47 @@ }; }; }; + +/* + * The sleep controller of the boards above: no SPMI port controllers, so no + * spmi-hpm, and PCIe ports past port 0. The PCIe registers and the PHY IP + * block's size are the ADT's (/arm-io/apcie reg, the same on J504, J433 and + * J434). Deep sleep has not run here: it is offered only on request, and + * stops before the commit unless that is requested too. + */ +&sleep { + reg = <0x2 0xd0700000 0x0 0x14000>, + <0x2 0xd0724000 0x0 0x4000>, + <0x2 0xd0734000 0x0 0x10>, + <0x2 0xd0768000 0x0 0x40>, + <0x2 0xd0780000 0x0 0x8>, + <0x2 0xe42d4000 0x0 0x4>, + <0x2 0xe42b0000 0x0 0x30>, + <0x2 0xe4714000 0x0 0x100>, + <0x2 0xe4004000 0x0 0x48>, + <0x2 0xe4280000 0x0 0x4000>, + <0x2 0x20024000 0x0 0x1000>, + <0x2 0x20064000 0x0 0x1000>, + <0x2 0x20158000 0x0 0x1000>, + <0x2 0x20400000 0x0 0x1000>, + <0x5 0x9c000000 0x0 0x2000>, + <0x5 0x91000000 0x0 0x1000>, + <0x5 0x9e088000 0x0 0x3000>, + <0x5 0x9e000000 0x0 0x10000>, + <0x5 0x9e040000 0x0 0x40000>, + <0x5 0x94008000 0x0 0x5000>, + <0x2 0xd0040000 0x0 0x1000>, + <0x5 0x95008000 0x0 0x5000>, + <0x5 0x9e010000 0x0 0x4000>, + <0x5 0x96008000 0x0 0x5000>, + <0x5 0x9e014000 0x0 0x4000>; + reg-names = "ps", "pwrgate", "cpu-start", "cllt", + "cluster", "commit", "wdt", "spmi", + "wake", "ps-aon", + "mcc-a", "mcc-b", "mcc-c", "mcc-d", + "apcie-axi", "apcie-rc", "apcie-clkgen", + "apcie-phy", "apcie-phy-ip", "apcie-port0", + "clk-mux", + "apcie-port1", "apcie-phy1", "apcie-port2", "apcie-phy2"; + status = "okay"; +}; From af79749b22c782311e40571f6864535d663d9b4c Mon Sep 17 00:00:00 2001 From: DjDeveloperr Date: Thu, 3 Dec 2026 03:29:36 -0500 Subject: [PATCH 2/5] arm64: dts: apple: t8122: boot NOR on QSPI on J504, J433 and J434 Every T8122 board's ADT has the boot NOR and its NVRAM at /arm-io/qspi, and no spi1. The J613 and J615 already use it; the J504 and the iMacs inherited the M1/M2 flash on SPI1, which is not wired, so they had no NVRAM. Read-only, as on the J615, until their NVRAM writes have been tried. Signed-off-by: DjDeveloperr --- arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi | 6 ++++++ arch/arm64/boot/dts/apple/t8122-j504.dts | 6 ++++++ arch/arm64/boot/dts/apple/t8122-j613-qspi.dtsi | 7 +++++-- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi b/arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi index 14a70bdc7de76..5cb7c8e5938fc 100644 --- a/arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi +++ b/arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi @@ -11,6 +11,7 @@ #include "t8122-usbpd-i2c.dtsi" #include "t8122-jxxx.dtsi" +#include "t8122-j613-qspi.dtsi" / { chassis-type = "all-in-one"; @@ -109,3 +110,8 @@ apple,panel-video-open-delay-us = <10000>; apple,panel-hdcp-open-arg = <3>; }; + +/* No NVRAM write entry exists for this board yet: keep it read-only. */ +&nvram_qspi { + read-only; +}; diff --git a/arch/arm64/boot/dts/apple/t8122-j504.dts b/arch/arm64/boot/dts/apple/t8122-j504.dts index 87b3fa7290d3a..7b4d3dae0b778 100644 --- a/arch/arm64/boot/dts/apple/t8122-j504.dts +++ b/arch/arm64/boot/dts/apple/t8122-j504.dts @@ -12,6 +12,7 @@ #include "t8122.dtsi" #include "t8122-usbpd-i2c.dtsi" #include "t8122-jxxx.dtsi" +#include "t8122-j613-qspi.dtsi" #include / { @@ -327,3 +328,8 @@ &mtp { apple,rtkit-keep-running; }; + +/* No NVRAM write entry exists for this board yet: keep it read-only. */ +&nvram_qspi { + read-only; +}; diff --git a/arch/arm64/boot/dts/apple/t8122-j613-qspi.dtsi b/arch/arm64/boot/dts/apple/t8122-j613-qspi.dtsi index 2825f5d7a4802..20308c74e24e2 100644 --- a/arch/arm64/boot/dts/apple/t8122-j613-qspi.dtsi +++ b/arch/arm64/boot/dts/apple/t8122-j613-qspi.dtsi @@ -1,5 +1,8 @@ // SPDX-License-Identifier: GPL-2.0+ OR MIT -/* J613/J615 QSPIMC boot NOR and NVRAM layout. */ +/* + * T8122 QSPIMC boot NOR and NVRAM layout: every T8122 board's ADT has them + * at /arm-io/qspi, and no spi1. + */ / { aliases { @@ -39,7 +42,7 @@ }; }; -/* This board variant uses QSPIMC instead of SPI1 for NVRAM. */ +/* QSPIMC instead of SPI1 for NVRAM. */ &spi1 { status = "disabled"; }; From 0cf7b7288258bc0d28ddb0328bb5f0b91063a01c Mon Sep 17 00:00:00 2001 From: DjDeveloperr Date: Thu, 3 Dec 2026 03:29:37 -0500 Subject: [PATCH 3/5] arm64: dts: apple: t8122: enable the Neural Engine on J504, J433 and J434 Their ADT describes the same Neural Engine as the J613's and J615's: the same type, registers, interrupts and power domains. Signed-off-by: DjDeveloperr --- arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi | 16 ++++++++++++++++ arch/arm64/boot/dts/apple/t8122-j504.dts | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi b/arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi index 5cb7c8e5938fc..48c0fe02608e9 100644 --- a/arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi +++ b/arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi @@ -115,3 +115,19 @@ &nvram_qspi { read-only; }; + +&ane_dart0 { + status = "okay"; +}; + +&ane_dart1 { + status = "okay"; +}; + +&ane_dart2 { + status = "okay"; +}; + +&ane { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/apple/t8122-j504.dts b/arch/arm64/boot/dts/apple/t8122-j504.dts index 7b4d3dae0b778..014fa539a7502 100644 --- a/arch/arm64/boot/dts/apple/t8122-j504.dts +++ b/arch/arm64/boot/dts/apple/t8122-j504.dts @@ -333,3 +333,19 @@ &nvram_qspi { read-only; }; + +&ane_dart0 { + status = "okay"; +}; + +&ane_dart1 { + status = "okay"; +}; + +&ane_dart2 { + status = "okay"; +}; + +&ane { + status = "okay"; +}; From 23da11dc2ab49f500df8d05b27f22251a072ec76 Mon Sep 17 00:00:00 2001 From: DjDeveloperr Date: Thu, 3 Dec 2026 03:29:37 -0500 Subject: [PATCH 4/5] arm64: dts: apple: t8122: CPU memory floor on J504, J433 and J434 The PMP's request classes and their levels belong to the SoC's PMP firmware, and the J613 and J615 need the floor for their memory bandwidth under CPU load (21 to 92 GB/s on the J613). Request it on the other T8122 boards too. Signed-off-by: DjDeveloperr --- arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi | 5 +++++ arch/arm64/boot/dts/apple/t8122-j504.dts | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi b/arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi index 48c0fe02608e9..5132a1bab902d 100644 --- a/arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi +++ b/arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi @@ -131,3 +131,8 @@ &ane { status = "okay"; }; + +/* CPU memory floor, class 0x25 at 4 and 0x21 at 2, as on J613 and J615. */ +&pmp_report { + apple,cpu-memory-floor = <0x21 2 0x25 4>; +}; diff --git a/arch/arm64/boot/dts/apple/t8122-j504.dts b/arch/arm64/boot/dts/apple/t8122-j504.dts index 014fa539a7502..7c784f350d431 100644 --- a/arch/arm64/boot/dts/apple/t8122-j504.dts +++ b/arch/arm64/boot/dts/apple/t8122-j504.dts @@ -349,3 +349,8 @@ &ane { status = "okay"; }; + +/* CPU memory floor, class 0x25 at 4 and 0x21 at 2, as on J613 and J615. */ +&pmp_report { + apple,cpu-memory-floor = <0x21 2 0x25 4>; +}; From a536cabbadaf0401b33a44303edb0ef3a6cb3bb8 Mon Sep 17 00:00:00 2001 From: DjDeveloperr Date: Thu, 3 Dec 2026 03:29:39 -0500 Subject: [PATCH 5/5] arm64: dts: apple: t8122-j433-j434: let the loader hand over the SEP The SEP is the same as on the other T8122 boards and runs from iBoot. With the alias the boot loader reserves its memory, so apple_sep can bind. A deep sleep is refused without the SEP's own sleep request. Signed-off-by: DjDeveloperr --- arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi b/arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi index 5132a1bab902d..b440c5b701e77 100644 --- a/arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi +++ b/arch/arm64/boot/dts/apple/t8122-j433-j434.dtsi @@ -18,6 +18,7 @@ aliases { ethernet0 = ðernet0; + sep = &sep; }; };