From fe71f1a9effab9ae5e75cda2ff1040684f72983d Mon Sep 17 00:00:00 2001 From: Nick Date: Wed, 11 Nov 2026 23:39:05 +0700 Subject: [PATCH 1/2] dt-bindings: soc: apple: t8140-mcc: Add the T8142 compatible M5 (T8142) has the T8140 system level cache register layout (ways 0x2800, power 0x2804, allocation disable 0x82c, flush 0x2844) at T8140's offsets, so it falls back to apple,t8140-mcc. List it in the select and with T6041 as a compatible that takes the apple,t8140-mcc fallback. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick --- .../devicetree/bindings/soc/apple/apple,t8140-mcc.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/soc/apple/apple,t8140-mcc.yaml b/Documentation/devicetree/bindings/soc/apple/apple,t8140-mcc.yaml index 1c12662a07091..08f2f7431b6c4 100644 --- a/Documentation/devicetree/bindings/soc/apple/apple,t8140-mcc.yaml +++ b/Documentation/devicetree/bindings/soc/apple/apple,t8140-mcc.yaml @@ -34,6 +34,7 @@ select: - apple,t8122-mcc - apple,t8132-mcc - apple,t8140-mcc + - apple,t8142-mcc required: - compatible @@ -92,6 +93,7 @@ allOf: - items: - enum: - apple,t6041-mcc + - apple,t8142-mcc - const: apple,t8140-mcc reg: From 167e40374f96577d9a4053268e4070aa24bd88f8 Mon Sep 17 00:00:00 2001 From: Nick Date: Wed, 11 Nov 2026 23:39:05 +0700 Subject: [PATCH 2/2] arm64: dts: apple: t8142: Add the MCC (system level cache) node Four SLC planes 0x40000 apart from ADT mcc reg[1], T8140's register layout. Disabled in t8142.dtsi, enabled on J815. The boot loader (aura, mcc_init_m5 from m1n1) turns allocation on; the driver checks the ways and power state and flushes on shutdown. Tested on J815: "apple-mcc 220000000.memory-controller: system level cache allocation enabled on 4 planes". Assisted-by: Claude Opus 5.5 Signed-off-by: Nick --- arch/arm64/boot/dts/apple/t8142-j815.dts | 5 +++++ arch/arm64/boot/dts/apple/t8142.dtsi | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t8142-j815.dts b/arch/arm64/boot/dts/apple/t8142-j815.dts index d7ef154a20c6c..9ce5fe5cd7e99 100644 --- a/arch/arm64/boot/dts/apple/t8142-j815.dts +++ b/arch/arm64/boot/dts/apple/t8142-j815.dts @@ -130,3 +130,8 @@ }; /* Unexposed chassis port instances remain described and disabled. */ + +/* aura (mcc_init_m5) turns the system level cache on; the driver confirms it and flushes on shutdown. */ +&mcc { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/apple/t8142.dtsi b/arch/arm64/boot/dts/apple/t8142.dtsi index 13cae26f21d96..e66333affe83e 100644 --- a/arch/arm64/boot/dts/apple/t8142.dtsi +++ b/arch/arm64/boot/dts/apple/t8142.dtsi @@ -151,6 +151,23 @@ reg-names = "core", "event"; }; + /* + * System level cache planes: ADT mcc,t8142 reg[1] (amcc-reg-idx 1, + * one AMCC, amcc-plane-enable-mask 0xf), four planes 0x40000 apart, + * T8140's register layout (ways 0x2800, power 0x2804, allocation + * disable 0x82c, flush 0x2844; m1n1/aura mcc_init_m5). aura enables + * the ways and allocation before the kernel, so the driver only + * checks that and flushes the cache on shutdown. + */ + mcc: memory-controller@220000000 { + compatible = "apple,t8142-mcc", "apple,t8140-mcc"; + reg = <0x2 0x20000000 0x0 0x4000>, + <0x2 0x20040000 0x0 0x4000>, + <0x2 0x20080000 0x0 0x4000>, + <0x2 0x200c0000 0x0 0x4000>; + status = "disabled"; + }; + serial0: serial@3a5200000 { status = "disabled"; compatible = "apple,s5l-uart";