From 7a4451c9ab58fa0bce485ddb3fc1ca43fd9dca6b Mon Sep 17 00:00:00 2001 From: LiamRay11 <228416644+LiamRay11@users.noreply.github.com> Date: Mon, 16 Nov 2026 09:04:04 -0800 Subject: [PATCH 01/12] dt-bindings: arm: apple: apple,pmgr: add apple,t8152-pmgr The T8152 (M6) PMGR blocks are compatible with the T8103 ones. The J873 device tree already uses this compatible; document it. Signed-off-by: LiamRay11 <228416644+LiamRay11@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 --- Documentation/devicetree/bindings/arm/apple/apple,pmgr.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/apple/apple,pmgr.yaml b/Documentation/devicetree/bindings/arm/apple/apple,pmgr.yaml index 91ae5a3ce1bca..e2e75a8c29f13 100644 --- a/Documentation/devicetree/bindings/arm/apple/apple,pmgr.yaml +++ b/Documentation/devicetree/bindings/arm/apple/apple,pmgr.yaml @@ -46,6 +46,7 @@ properties: - apple,t8132-pmgr - apple,t8140-pmgr - apple,t8142-pmgr + - apple,t8152-pmgr - const: apple,t8103-pmgr - const: syscon - const: simple-mfd From 0271b017312a8f2fa878091347aa7c8495c69cfb Mon Sep 17 00:00:00 2001 From: LiamRay11 <228416644+LiamRay11@users.noreply.github.com> Date: Mon, 16 Nov 2026 09:04:05 -0800 Subject: [PATCH 02/12] dt-bindings: power: apple,pmgr-pwrstate: add apple,t8152-pmgr-pwrstate The T8152 (M6) PMGR power state controls are compatible with the T8103 ones. The J873 device tree already uses this compatible; document it. Signed-off-by: LiamRay11 <228416644+LiamRay11@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 --- Documentation/devicetree/bindings/power/apple,pmgr-pwrstate.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/power/apple,pmgr-pwrstate.yaml b/Documentation/devicetree/bindings/power/apple,pmgr-pwrstate.yaml index 6612c626e8a54..227c7b87416dd 100644 --- a/Documentation/devicetree/bindings/power/apple,pmgr-pwrstate.yaml +++ b/Documentation/devicetree/bindings/power/apple,pmgr-pwrstate.yaml @@ -90,6 +90,7 @@ properties: - apple,t8132-pmgr-pwrstate - apple,t8140-pmgr-pwrstate - apple,t8142-pmgr-pwrstate + - apple,t8152-pmgr-pwrstate - const: apple,t8103-pmgr-pwrstate reg: From b39ba54e9e530be0573215b2e8e3379dfb40d6bf Mon Sep 17 00:00:00 2001 From: LiamRay11 <228416644+LiamRay11@users.noreply.github.com> Date: Mon, 16 Nov 2026 09:04:06 -0800 Subject: [PATCH 03/12] dt-bindings: i2c: apple,i2c: add apple,t8152-i2c The I2C controllers of T8152 (M6) are compatible with the T8103 ones. Signed-off-by: LiamRay11 <228416644+LiamRay11@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 --- Documentation/devicetree/bindings/i2c/apple,i2c.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/i2c/apple,i2c.yaml b/Documentation/devicetree/bindings/i2c/apple,i2c.yaml index f2e16482d9218..c3a306b0c8ea4 100644 --- a/Documentation/devicetree/bindings/i2c/apple,i2c.yaml +++ b/Documentation/devicetree/bindings/i2c/apple,i2c.yaml @@ -31,6 +31,7 @@ properties: - apple,t8122-i2c - apple,t8132-i2c - apple,t8140-i2c + - apple,t8152-i2c - const: apple,t8103-i2c - items: - enum: From 4b3528fb2aaed03c6f2683d613db7057d4584e02 Mon Sep 17 00:00:00 2001 From: LiamRay11 <228416644+LiamRay11@users.noreply.github.com> Date: Mon, 16 Nov 2026 09:04:07 -0800 Subject: [PATCH 04/12] dt-bindings: watchdog: apple,wdt: add apple,t8152-wdt The T8152 (M6) watchdog is compatible with the T8103 one. Signed-off-by: LiamRay11 <228416644+LiamRay11@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 --- Documentation/devicetree/bindings/watchdog/apple,wdt.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/watchdog/apple,wdt.yaml b/Documentation/devicetree/bindings/watchdog/apple,wdt.yaml index e321ee28733d1..9a6634e146d75 100644 --- a/Documentation/devicetree/bindings/watchdog/apple,wdt.yaml +++ b/Documentation/devicetree/bindings/watchdog/apple,wdt.yaml @@ -26,6 +26,7 @@ properties: - apple,t8132-wdt - apple,t8140-wdt - apple,t8142-wdt + - apple,t8152-wdt - const: apple,t8103-wdt - items: - enum: From 8fe9dff82ae389f395bf722ba4865c239814a4c1 Mon Sep 17 00:00:00 2001 From: LiamRay11 <228416644+LiamRay11@users.noreply.github.com> Date: Mon, 16 Nov 2026 09:04:08 -0800 Subject: [PATCH 05/12] dt-bindings: pwm: apple,s5l-fpwm: add apple,t8152-fpwm The T8152 (M6) FPWM, which drives the keyboard backlight of the J804 MacBook Pro, is compatible with the S5L one. Signed-off-by: LiamRay11 <228416644+LiamRay11@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 --- Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml b/Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml index f7dcfa5bb4d29..ed36aca8f7c29 100644 --- a/Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml +++ b/Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml @@ -22,6 +22,7 @@ properties: - apple,t8142-fpwm - apple,t8132-fpwm - apple,t8140-fpwm + - apple,t8152-fpwm - apple,t6000-fpwm - apple,t6020-fpwm - apple,t6030-fpwm From 8f740276316dbf30188da3f0ef3d20a343ac3e98 Mon Sep 17 00:00:00 2001 From: LiamRay11 <228416644+LiamRay11@users.noreply.github.com> Date: Mon, 16 Nov 2026 09:04:09 -0800 Subject: [PATCH 06/12] dt-bindings: pinctrl: apple,pinctrl: allow T8152 with the T8140 fallback Reading every pin of the T8152 GPIO block to fill a register cache at probe takes an SError on the J804 MacBook Pro: pins 78 and 208 fault on an AP read. The T8140 profile accesses the block uncached and honours gpio-reserved-ranges, so a board that has to keep the CPU off such pins can use "apple,t8152-pinctrl", "apple,t8140-pinctrl", as T6050 does with its T8132 fallback. The existing T8103 fallback stays valid for boards that do not need it. Signed-off-by: LiamRay11 <228416644+LiamRay11@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 --- .../devicetree/bindings/pinctrl/apple,pinctrl.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml index e2bec4d954de9..a2902c728bb32 100644 --- a/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml +++ b/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml @@ -32,6 +32,12 @@ properties: - items: - const: apple,t6050-pinctrl - const: apple,t8132-pinctrl + - description: + T8152 with the uncached T8140 register access, for boards whose + gpio-reserved-ranges hold pins that fault on an AP read. + items: + - const: apple,t8152-pinctrl + - const: apple,t8140-pinctrl - items: # Do not add additional SoC to this list. - enum: From dd16da0b28a85809b72007f4b47957906d5bdb84 Mon Sep 17 00:00:00 2001 From: LiamRay11 <228416644+LiamRay11@users.noreply.github.com> Date: Mon, 16 Nov 2026 09:04:10 -0800 Subject: [PATCH 07/12] dt-bindings: cpu: apple,t8140-cpuidle: add apple,t8152-cpuidle As on T8140, the OS cannot request core power-down on T8152 (M6) and WFI is the only idle state. Allow "apple,t8152-cpuidle" with the T8140 compatible as its fallback, which the driver already matches. Signed-off-by: LiamRay11 <228416644+LiamRay11@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 --- .../bindings/cpu/apple,t8140-cpuidle.yaml | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Documentation/devicetree/bindings/cpu/apple,t8140-cpuidle.yaml b/Documentation/devicetree/bindings/cpu/apple,t8140-cpuidle.yaml index 9ffa89ece40cd..430e20dd605b4 100644 --- a/Documentation/devicetree/bindings/cpu/apple,t8140-cpuidle.yaml +++ b/Documentation/devicetree/bindings/cpu/apple,t8140-cpuidle.yaml @@ -4,26 +4,30 @@ $id: http://devicetree.org/schemas/cpu/apple,t8140-cpuidle.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Apple T6040, T8132 and T8140 CPU idle controller +title: Apple T6040, T8132, T8140 and T8152 CPU idle controller maintainers: - Ryan Murray description: - Selects the Apple CPU idle driver on T6040, T8132 and T8140 systems. On these - SoCs the hardware decides when an idle core is power-gated after WFI; - software cannot request core or cluster power-down, so WFI is the only - idle state. + Selects the Apple CPU idle driver on T6040, T8132, T8140 and T8152 systems. + On these SoCs the hardware decides when an idle core is power-gated after + WFI; software cannot request core or cluster power-down, so WFI is the only + idle state. T8152 uses the T8140 driver profile. properties: $nodename: const: cpuidle compatible: - enum: - - apple,t6041-cpuidle - - apple,t8132-cpuidle - - apple,t8140-cpuidle + oneOf: + - enum: + - apple,t6041-cpuidle + - apple,t8132-cpuidle + - apple,t8140-cpuidle + - items: + - const: apple,t8152-cpuidle + - const: apple,t8140-cpuidle required: - compatible From a96fb0778c158b79a93a2efea123b182143a626b Mon Sep 17 00:00:00 2001 From: LiamRay11 <228416644+LiamRay11@users.noreply.github.com> Date: Mon, 16 Nov 2026 09:05:21 -0800 Subject: [PATCH 08/12] arm64: dts: apple: t8152-j804: describe the MacBook Pro (M6) core board Turn the disabled J804 inventory into a board description for a RAM boot from the loader, on top of the shared T8152 description: - the twelve CPUs (the loader removes those it has not started), with the first two performance states of each cluster, which the cpufreq driver may use without a thermal policy, as on J873 - the AIC and the timer, the boot framebuffer and CPU idle - the SMC with its mailbox, the pcIO output that resets the trackpad's touch controller, and the hardware monitor: fan, power, voltage and current keys, with temperatures discovered. The fan is monitored only; its speed stays under firmware control - the watchdog, the GPIO controller with the pins that fault on an AP read reserved, the I2C controllers of the jack codec and the speaker amplifiers, and the keyboard backlight PWM - the boot NOR and the PMGR block from t8152-j873-qspi.dtsi, shared with J873, plus the SIO and I2C power states Everything else stays described and disabled; the storage, display, input, wireless and GPU nodes follow with their drivers. The values come from the J804 ADT. Tested on a MacBook Pro (M6, J804) with an equivalent standalone device tree on an earlier base (integration/aurora f5fa539): all twelve CPUs come up, the watchdog restarts the machine, the SMC hardware monitor reports about 170 inputs including the fan, the keyboard backlight lights, and the NVRAM partition of the boot NOR reads. This tree, rewritten onto the shared T8152 labels, has not been booted. Signed-off-by: LiamRay11 <228416644+LiamRay11@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 --- arch/arm64/boot/dts/apple/t8152-j804.dts | 369 ++++++++++++++++++++++- 1 file changed, 368 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/apple/t8152-j804.dts b/arch/arm64/boot/dts/apple/t8152-j804.dts index 82529cf4d9a33..773b06f95dae6 100644 --- a/arch/arm64/boot/dts/apple/t8152-j804.dts +++ b/arch/arm64/boot/dts/apple/t8152-j804.dts @@ -1,12 +1,379 @@ // SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Apple MacBook Pro (14-inch, M6), J804. + * + * Booted from RAM by the loader, which fills usable memory, the release + * addresses of the CPUs it started (and removes the others) and the boot + * framebuffer. The console is the framebuffer: the DockChannel UART has no + * reader on this board, so it stays disabled. Resources follow the J804 ADT. + */ /dts-v1/; #include "t8152.dtsi" +#include +#include / { - model = "Apple MacBook Pro (J804)"; compatible = "apple,j804", "apple,t8152", "apple,arm-platform"; + model = "Apple MacBook Pro (14-inch, M6)"; chassis-type = "laptop"; + + /* Retain the RAM handoff and secondary CPU park contract. */ + aurora,minimal-boot; + + chosen { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + framebuffer0: framebuffer@0 { + compatible = "apple,simple-framebuffer", "simple-framebuffer"; + reg = <0 0 0 0>; /* Filled by the loader. */ + status = "disabled"; + }; + }; + + /* + * As on M4 and later, the OS cannot request core power-down: both idle + * states are WFI. The driver must be bound for s2idle to freeze the + * tick and suspend timekeeping. + */ + cpuidle { + compatible = "apple,t8152-cpuidle", "apple,t8140-cpuidle"; + }; + + /* + * The first two CPU performance states of each cluster, which the + * driver may use without a thermal policy, as on J873. + */ + m6_e_opp: opp-table-e { + compatible = "operating-points-v2"; + opp-shared; + + opp-972000000 { + opp-hz = /bits/ 64 <972000000>; + opp-level = <2>; + }; + opp-1152000000 { + opp-hz = /bits/ 64 <1152000000>; + opp-level = <3>; + }; + }; + + m6_pm_opp: opp-table-pm { + compatible = "operating-points-v2"; + opp-shared; + + opp-1440000000 { + opp-hz = /bits/ 64 <1440000000>; + opp-level = <2>; + }; + opp-1728000000 { + opp-hz = /bits/ 64 <1728000000>; + opp-level = <3>; + }; + }; + + /* Keyboard backlight: ADT fpwm0 kbd-backlight, 25 kHz. */ + led-controller { + compatible = "pwm-leds"; + + led-0 { + pwms = <&fpwm0 0 40000>; + label = "kbd_backlight"; + function = LED_FUNCTION_KBD_BACKLIGHT; + color = ; + max-brightness = <255>; + default-state = "keep"; + }; + }; +}; + +&{/reserved-memory} { + smc-firmware@30de00000 { + reg = <3 0x0de00000 0 0x120000>; + no-map; + }; +}; + +&cpu0 { + operating-points-v2 = <&m6_e_opp>; + performance-domains = <&m6_e_cpufreq>; + status = "okay"; +}; + +&cpu1 { + operating-points-v2 = <&m6_e_opp>; + performance-domains = <&m6_e_cpufreq>; + status = "okay"; +}; + +&cpu2 { + operating-points-v2 = <&m6_e_opp>; + performance-domains = <&m6_e_cpufreq>; + status = "okay"; +}; + +&cpu3 { + operating-points-v2 = <&m6_e_opp>; + performance-domains = <&m6_e_cpufreq>; + status = "okay"; +}; + +&cpu4 { + operating-points-v2 = <&m6_e_opp>; + performance-domains = <&m6_e_cpufreq>; + status = "okay"; +}; + +&cpu5 { + operating-points-v2 = <&m6_e_opp>; + performance-domains = <&m6_e_cpufreq>; + status = "okay"; +}; + +&cpu6 { + operating-points-v2 = <&m6_pm_opp>; + performance-domains = <&m6_pm_cpufreq>; + status = "okay"; +}; + +&cpu7 { + operating-points-v2 = <&m6_pm_opp>; + performance-domains = <&m6_pm_cpufreq>; + status = "okay"; +}; + +&cpu8 { + operating-points-v2 = <&m6_pm_opp>; + performance-domains = <&m6_pm_cpufreq>; + status = "okay"; +}; + +&cpu9 { + operating-points-v2 = <&m6_pm_opp>; + performance-domains = <&m6_pm_cpufreq>; + status = "okay"; +}; + +&cpu10 { + operating-points-v2 = <&m6_pm_opp>; + performance-domains = <&m6_pm_cpufreq>; + status = "okay"; +}; + +&cpu11 { + operating-points-v2 = <&m6_pm_opp>; + performance-domains = <&m6_pm_cpufreq>; + status = "okay"; +}; + +&aic { + status = "okay"; +}; + +&{/timer} { + status = "okay"; +}; + +&{/soc} { + m6_e_cpufreq: performance-controller@210e20000 { + compatible = "apple,t8152-cluster-cpufreq"; + reg = <2 0x10e20000 0 0x1000>; + #performance-domain-cells = <0>; + }; + + m6_pm_cpufreq: performance-controller@211e20000 { + compatible = "apple,t8152-cluster-cpufreq"; + reg = <2 0x11e20000 0 0x1000>; + #performance-domain-cells = <0>; + }; + + smc_mbox: mailbox@30c710080 { + compatible = "apple,t8152-smc-mailbox"; + reg = <3 0x0c710080 0 0x80>; + interrupts = , + ; + interrupt-names = "send-empty", "recv-not-empty"; + #mbox-cells = <0>; + }; + + smc: smc@30c600000 { + compatible = "apple,t8152-smc"; + reg = <3 0x0c600000 0 0x74000>, + <3 0x0de00000 0 0x120000>; + reg-names = "smc", "sram"; + mboxes = <&smc_mbox>; + + /* + * pcIO outputs. The trackpad's AFE reset is the ADT multi-touch + * function-afe-reset pKW8('pcIO', 0x10000, 0x1c0000): line 0. + */ + smc_pcio: gpio { + compatible = "apple,smc-pcio-gpio"; + gpio-controller; + #gpio-cells = <2>; + apple,output-commands = /bits/ 64 <0x001c000000010000>; + }; + + smc_hwmon: hwmon { + compatible = "apple,smc-hwmon"; + apple,discover-temperatures; + + /* One fan; mode key in lower case on T8152. */ + fan-F0Ac { + apple,key-id = "F0Ac"; + apple,fan-minimum = "F0Mn"; + apple,fan-maximum = "F0Mx"; + apple,fan-target = "F0Tg"; + apple,fan-mode = "F0md"; + label = "Fan"; + }; + + power-PSTR { + apple,key-id = "PSTR"; + label = "Total System Power"; + }; + + power-PDTR { + apple,key-id = "PDTR"; + label = "AC Input Power"; + }; + + power-PMVR { + apple,key-id = "PMVR"; + label = "3.8 V Rail Power"; + }; + + power-PHPC { + apple,key-id = "PHPC"; + label = "Heatpipe Power"; + }; + + voltage-VD0R { + apple,key-id = "VD0R"; + label = "AC Input Voltage"; + }; + + voltage-SBAV { + apple,key-id = "SBAV"; + label = "Battery Voltage"; + }; + + current-ID0R { + apple,key-id = "ID0R"; + label = "AC Input Current"; + }; + }; + }; + + wdt: watchdog@3082b0000 { + compatible = "apple,t8152-wdt", "apple,t8103-wdt"; + reg = <3 0x082b0000 0 0x4000>; + clocks = <&clkref>; + interrupts = ; + }; + + pinctrl_ap: pinctrl@31a000000 { + /* + * Uncached (T8140 profile): a cache filled at probe would read + * pins 78 and 208, which fault on an AP read. + */ + compatible = "apple,t8152-pinctrl", "apple,t8140-pinctrl"; + reg = <0x3 0x1a000000 0x0 0x100000>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pinctrl_ap 0 0 224>; + apple,npins = <224>; + /* ADT no-restore-gpio-pins */ + gpio-reserved-ranges = <78 1>, <140 2>, <198 1>, <208 1>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = , + , + , + , + , + , + ; + }; + + /* The headphone jack codec. */ + i2c1: i2c@331014000 { + compatible = "apple,t8152-i2c", "apple,t8103-i2c"; + reg = <3 0x31014000 0 0x4000>; + clocks = <&clkref>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + power-domains = <&ps_i2c1>; + resets = <&ps_i2c1>; + + /* Disabled until the sound card that uses it is described. */ + jack_codec: codec@4b { + compatible = "cirrus,cs42l84"; + reg = <0x4b>; + reset-gpios = <&pinctrl_ap 204 GPIO_ACTIVE_HIGH>; + interrupts-extended = <&pinctrl_ap 203 IRQ_TYPE_LEVEL_LOW>; + #sound-dai-cells = <0>; + status = "disabled"; + }; + }; + + /* The speaker amplifiers, described with the audio support. */ + i2c3: i2c@33101c000 { + compatible = "apple,t8152-i2c", "apple,t8103-i2c"; + reg = <3 0x3101c000 0 0x4000>; + clocks = <&clkref>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + power-domains = <&ps_i2c3>; + resets = <&ps_i2c3>; + }; + + fpwm0: pwm@331040000 { + compatible = "apple,t8152-fpwm", "apple,s5l-fpwm"; + reg = <3 0x31040000 0 0x4000>; + clocks = <&clkref>; + #pwm-cells = <2>; + }; +}; + +/* The boot NOR (NVRAM) and the PMGR block, as on J873. */ +#include "t8152-j873-qspi.dtsi" + +&pmgr { + /* On at handoff; the I2C controllers below hang off it. */ + ps_sio: power-controller@840 { + compatible = "apple,t8152-pmgr-pwrstate", + "apple,t8103-pmgr-pwrstate"; + reg = <0x840 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "sio"; + apple,always-on; + }; + + ps_i2c1: power-controller@cc0 { + compatible = "apple,t8152-pmgr-pwrstate", + "apple,t8103-pmgr-pwrstate"; + reg = <0xcc0 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "i2c1"; + power-domains = <&ps_sio>; + }; + + ps_i2c3: power-controller@d00 { + compatible = "apple,t8152-pmgr-pwrstate", + "apple,t8103-pmgr-pwrstate"; + reg = <0xd00 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "i2c3"; + power-domains = <&ps_sio>; + }; }; /* Unexposed chassis port instances remain described and disabled. */ From bf57d4dcfb9dd949918492b791dbd8939e26d8fa Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Thu, 19 Nov 2026 23:39:36 +1100 Subject: [PATCH 09/12] arm64: dts: apple: t8152-j804: describe the N1 on PCIe port 0 The J804 has no apcie host, port 0 or port-0 DART, so the N1 Wi-Fi and Bluetooth functions that the centauri drivers handle never appear. The J804 ADT's /arm-io/apcie, apcie/pci-bridge0 (PERST# GPIO 3, CLKREQ# GPIO 0, maximum link speed 3), its centauri-control/alpha/beta functions and /arm-io/dart-apcie0 have the same registers, interrupts and pins as the J873g's. Move the host and port 0 from t8152-j873-n1.dtsi (sithglan) into a board-neutral t8152-n1.dtsi and include it from both boards. The J873g keeps its own pinctrl_ap and pcie0_dart in t8152-j873-n1.dtsi; its DTB is unchanged. The J804 uses pcie0_dart and pinctrl_ap from t8152.dtsi and its own board file. On the J804, add the PMGR power states the port and its DART sit in, ADT pmgr devices APCIE_GP (+0x8c0) and APCIE_SYS_GP (+0xec0, child of APCIE_GP), kept on because the loader hands over a trained link, and give them to the host and to pcie0_dart. Describe the Wi-Fi and Bluetooth functions (0,1 and 0,2) with the wifi0 and bluetooth0 aliases, which the loader fills from the ADT's /chosen mac-address-wifi0 and mac-address-bluetooth0. Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t8152-j804.dts | 64 ++++++++++++++++++++ arch/arm64/boot/dts/apple/t8152-j873-n1.dtsi | 51 ++-------------- arch/arm64/boot/dts/apple/t8152-n1.dtsi | 58 ++++++++++++++++++ 3 files changed, 127 insertions(+), 46 deletions(-) create mode 100644 arch/arm64/boot/dts/apple/t8152-n1.dtsi diff --git a/arch/arm64/boot/dts/apple/t8152-j804.dts b/arch/arm64/boot/dts/apple/t8152-j804.dts index 773b06f95dae6..b2cf3885643ae 100644 --- a/arch/arm64/boot/dts/apple/t8152-j804.dts +++ b/arch/arm64/boot/dts/apple/t8152-j804.dts @@ -355,6 +355,21 @@ apple,always-on; }; + /* + * The internal PCIe (apcie): ADT pmgr devices APCIE_GP +0x8c0 and its + * child APCIE_SYS_GP +0xec0. The loader trains the N1 link with them + * on; they stay on so the link is not dropped under the endpoint. + */ + ps_apcie_gp: power-controller@8c0 { + compatible = "apple,t8152-pmgr-pwrstate", + "apple,t8103-pmgr-pwrstate"; + reg = <0x8c0 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "apcie_gp"; + apple,always-on; + }; + ps_i2c1: power-controller@cc0 { compatible = "apple,t8152-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; @@ -374,6 +389,55 @@ label = "i2c3"; power-domains = <&ps_sio>; }; + + ps_apcie_sys_gp: power-controller@ec0 { + compatible = "apple,t8152-pmgr-pwrstate", + "apple,t8103-pmgr-pwrstate"; + reg = <0xec0 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "apcie_sys_gp"; + power-domains = <&ps_apcie_gp>; + apple,always-on; + }; +}; + +/* + * The N1 (Wi-Fi and Bluetooth) on apcie port 0. The J804 ADT's apcie, + * pci-bridge0 (PERST# GPIO 3, CLKREQ# GPIO 0, gen 3), its three centauri + * functions and dart-apcie0 match the J873g's, so the host and port come + * from the shared t8152-n1.dtsi; pcie0_dart is t8152.dtsi's. + */ +#include "t8152-n1.dtsi" + +/ { + aliases { + /* The loader fills the N1's factory addresses through these. */ + wifi0 = &n1_alpha; + bluetooth0 = &n1_beta; + }; +}; + +&pcie0_dart { + power-domains = <&ps_apcie_sys_gp>; + status = "okay"; +}; + +&pcie { + power-domains = <&ps_apcie_sys_gp>; +}; + +&port00 { + n1_alpha: wifi@0,1 { + reg = <0x10100 0x0 0x0 0x0 0x0>; + local-mac-address = [00 00 00 00 00 00]; + }; + + n1_beta: bluetooth@0,2 { + compatible = "pci106b,1903"; + reg = <0x10200 0x0 0x0 0x0 0x0>; + local-bd-address = [00 00 00 00 00 00]; + }; }; /* Unexposed chassis port instances remain described and disabled. */ diff --git a/arch/arm64/boot/dts/apple/t8152-j873-n1.dtsi b/arch/arm64/boot/dts/apple/t8152-j873-n1.dtsi index ffa33863f782b..8a5e7e2f89e84 100644 --- a/arch/arm64/boot/dts/apple/t8152-j873-n1.dtsi +++ b/arch/arm64/boot/dts/apple/t8152-j873-n1.dtsi @@ -1,11 +1,9 @@ // SPDX-License-Identifier: GPL-2.0+ OR MIT /* - * J873g N1 on APCIE port 0. Aura releases the SMC-controlled N1 reset, - * initializes the common PHY and applies the inactive DART's tunables. - * Linux owns port training and the three function-specific DMA streams. - * Resources follow the J873g ADT and the public J873 PCIe bring-up tree. + * J873g N1 on APCIE port 0: the J873g's own GPIO controller and port-0 DART + * (the J873g tree does not include t8152.dtsi), then the shared apcie host + * and port 0 from t8152-n1.dtsi. */ -#include / { soc { @@ -33,46 +31,7 @@ #iommu-cells = <1>; interrupts = ; }; - - pcie: pcie@1cb0000000 { - compatible = "apple,t8152-pcie"; - device_type = "pci"; - reg = <0x1c 0xb0000000 0x0 0x1000000>, - <0x3 0x8c000000 0x0 0x4000>, - <0x3 0x88028000 0x0 0x4000>, - <0x3 0x8f010000 0x0 0x4000>; - reg-names = "config", "rc", "port0", "phy0"; - interrupts = ; - msi-controller; - msi-parent = <&pcie>; - msi-ranges = <&aic AIC_IRQ 1879 IRQ_TYPE_EDGE_RISING 32>; - iommu-map = <0x100 &pcie0_dart 1 1>, - <0x101 &pcie0_dart 2 1>, - <0x102 &pcie0_dart 3 1>; - iommu-map-mask = <0xffff>; - bus-range = <0 1>; - #address-cells = <3>; - #size-cells = <2>; - ranges = <0x43000000 0xb 0xc0000000 0xb 0xc0000000 0x0 0x20000000>, - <0x02000000 0x0 0x80000000 0xb 0x80000000 0x0 0x40000000>; - dma-coherent; - - port00: pci@0,0 { - device_type = "pci"; - reg = <0x0 0x0 0x0 0x0 0x0>; - reset-gpios = <&pinctrl_ap 3 GPIO_ACTIVE_LOW>; - bus-range = <1 1>; - #address-cells = <3>; - #size-cells = <2>; - ranges; - interrupt-controller; - #interrupt-cells = <1>; - interrupt-map-mask = <0 0 0 7>; - interrupt-map = <0 0 0 1 &port00 0 0 0 0>, - <0 0 0 2 &port00 0 0 0 1>, - <0 0 0 3 &port00 0 0 0 2>, - <0 0 0 4 &port00 0 0 0 3>; - }; - }; }; }; + +#include "t8152-n1.dtsi" diff --git a/arch/arm64/boot/dts/apple/t8152-n1.dtsi b/arch/arm64/boot/dts/apple/t8152-n1.dtsi new file mode 100644 index 0000000000000..f4432d41c5932 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8152-n1.dtsi @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * T8152 internal PCIe (apcie) with the N1 Wi-Fi/Bluetooth on port 0, shared + * by the boards that carry it (J873g, J804). Aura releases the SMC-controlled + * N1 reset, initializes the common PHY and applies the inactive DART's + * tunables. Linux owns port training and the three function-specific DMA + * streams. Resources follow the J873g ADT and the public J873 PCIe bring-up + * tree; the J804 ADT's apcie, pci-bridge0 and dart-apcie0 are the same. + * + * The including board provides pinctrl_ap and pcie0_dart. + */ +#include +#include +#include + +&{/soc} { + pcie: pcie@1cb0000000 { + compatible = "apple,t8152-pcie"; + device_type = "pci"; + reg = <0x1c 0xb0000000 0x0 0x1000000>, + <0x3 0x8c000000 0x0 0x4000>, + <0x3 0x88028000 0x0 0x4000>, + <0x3 0x8f010000 0x0 0x4000>; + reg-names = "config", "rc", "port0", "phy0"; + interrupts = ; + msi-controller; + msi-parent = <&pcie>; + msi-ranges = <&aic AIC_IRQ 1879 IRQ_TYPE_EDGE_RISING 32>; + iommu-map = <0x100 &pcie0_dart 1 1>, + <0x101 &pcie0_dart 2 1>, + <0x102 &pcie0_dart 3 1>; + iommu-map-mask = <0xffff>; + bus-range = <0 1>; + #address-cells = <3>; + #size-cells = <2>; + ranges = <0x43000000 0xb 0xc0000000 0xb 0xc0000000 0x0 0x20000000>, + <0x02000000 0x0 0x80000000 0xb 0x80000000 0x0 0x40000000>; + dma-coherent; + + /* PERST#: ADT pci-bridge0 function-perst, GPIO 3 */ + port00: pci@0,0 { + device_type = "pci"; + reg = <0x0 0x0 0x0 0x0 0x0>; + reset-gpios = <&pinctrl_ap 3 GPIO_ACTIVE_LOW>; + bus-range = <1 1>; + #address-cells = <3>; + #size-cells = <2>; + ranges; + interrupt-controller; + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0 0 0 1 &port00 0 0 0 0>, + <0 0 0 2 &port00 0 0 0 1>, + <0 0 0 3 &port00 0 0 0 2>, + <0 0 0 4 &port00 0 0 0 3>; + }; + }; +}; From 686afb5984df54a6b35dfc593530cb10c0386c96 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Thu, 19 Nov 2026 23:40:03 +1100 Subject: [PATCH 10/12] arm64: dts: apple: t8152-j804: describe the SD card reader The J804 has a GL9755 SD host controller on apcie port 2 (ADT /arm-io/apcie/pci-bridge2/pcie-sdreader); the Mac mini has a different device there, so this stays in the board file. The loader switches on the reader's power (the ADT's SMC function-sd_pwr_en) and trains the link. Add port 2 to the host: its port registers (+0x18a028000) and PHY lane (+0x18f018000), from the apcie node's reg; the host interrupts of ports 0 to 2 (ADT apcie interrupts 1571, 1579, 1587), because the driver takes a port's interrupt by its port number; and bus 2 on dart-apcie2, stream 1. The port's PERST# is pci-bridge2's function-perst, GPIO 5, and its link runs at gen 1 (maximum-link-speed 1). The port's MSIs come from the host's shared range. Card detect and write protect are active high (card-detect-polarity and write-protect-polarity 1), as in t6050-j714s.dts and t8142-j704-pcie.dtsi. Enable pcie2_dart with the apcie power state, APCIE_SYS_GP. Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t8152-j804.dts | 59 ++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t8152-j804.dts b/arch/arm64/boot/dts/apple/t8152-j804.dts index b2cf3885643ae..20b034b81cc82 100644 --- a/arch/arm64/boot/dts/apple/t8152-j804.dts +++ b/arch/arm64/boot/dts/apple/t8152-j804.dts @@ -441,3 +441,62 @@ }; /* Unexposed chassis port instances remain described and disabled. */ + +/* + * The SD card reader (ADT pci-bridge2/pcie-sdreader, a GL9755) on apcie + * port 2, which the Mac mini does not have. The loader switches on its + * power (the ADT's SMC function-sd_pwr_en) and trains the link (pci-bridge2 + * maximum-link-speed 1). From the J804 ADT: port 2's registers and PHY + * lane, host interrupt 1587 (the third of apcie's per-port interrupts, the + * driver indexes them by port number), PERST# GPIO 5 and dart-apcie2. Its + * MSIs come from the host's shared range. + */ +&pcie { + reg = <0x1c 0xb0000000 0x0 0x1000000>, + <0x3 0x8c000000 0x0 0x4000>, + <0x3 0x88028000 0x0 0x4000>, + <0x3 0x8f010000 0x0 0x4000>, + <0x3 0x8a028000 0x0 0x4000>, + <0x3 0x8f018000 0x0 0x4000>; + reg-names = "config", "rc", "port0", "phy0", "port2", "phy2"; + interrupts = , + , + ; + iommu-map = <0x100 &pcie0_dart 1 1>, + <0x101 &pcie0_dart 2 1>, + <0x102 &pcie0_dart 3 1>, + <0x200 &pcie2_dart 1 1>; + bus-range = <0 2>; + + /* PERST#: ADT pci-bridge2 function-perst, GPIO 5 */ + port02: pci@2,0 { + device_type = "pci"; + reg = <0x1000 0x0 0x0 0x0 0x0>; + reset-gpios = <&pinctrl_ap 5 GPIO_ACTIVE_LOW>; + max-link-speed = <1>; + bus-range = <2 2>; + #address-cells = <3>; + #size-cells = <2>; + ranges; + interrupt-controller; + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0 0 0 1 &port02 0 0 0 0>, + <0 0 0 2 &port02 0 0 0 1>, + <0 0 0 3 &port02 0 0 0 2>, + <0 0 0 4 &port02 0 0 0 3>; + + /* Card detect and write protect active high (ADT *-polarity = 1) */ + sdhci0: mmc@0,0 { + compatible = "pci17a0,9755"; + reg = <0x20000 0x0 0x0 0x0 0x0>; + cd-inverted; + wp-inverted; + }; + }; +}; + +&pcie2_dart { + power-domains = <&ps_apcie_sys_gp>; + status = "okay"; +}; From ed03b9fe0a446541655397b452bc2a157ed1cdf8 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Fri, 20 Nov 2026 00:08:44 +1100 Subject: [PATCH 11/12] arm64: dts: apple: t8152-j804: add the Secure Enclave Describe the T8152 SEP for the 14-inch MacBook Pro (M6). In t8152-peripherals.dtsi, next to the existing sep_dart: - sep@28a600000 (J804 ADT /arm-io/sep, iop-sep,ascwrap-v8, first reg 0x8a600000 + 0x74000), disabled: iBoot hands over a running SEP and apple_sep enables it and its DART when it loads. - sep_mbox@28a710080, disabled: on T8152 the SEP talks through its window of the post-office block, like the SMC (third sep reg + 0x10080), with the ADT interrupts 542 (send-empty) and 541 (recv-not-empty). - sep_dart gets the DMA window iBoot programmed (ADT dart-sep vm-base-0 0x10000004000, vm-size-0 0xffff0000), as on T8142 and T6050. The J804, J873g and J833ct ADTs describe sep and dart-sep identically. In t8152-j804.dts: the "sep" alias, which makes the loader reserve the SEP firmware and publish the boot manifests on the node; the PMGR SEP (+0xc00, critical) and GPIO (+0xb60) states, both kept on as in t8142-j813-sep.dtsi; those domains on the SEP and on its DART; and the mailbox enabled. The SEP node follows t8140.dtsi and t8142-j813-sep.dtsi; the mailbox follows the J804 SMC mailbox (LiamRay11). Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t8152-j804.dts | 50 +++++++++++++++++++ .../boot/dts/apple/t8152-peripherals.dtsi | 37 ++++++++++++++ 2 files changed, 87 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t8152-j804.dts b/arch/arm64/boot/dts/apple/t8152-j804.dts index 20b034b81cc82..896c199b66b37 100644 --- a/arch/arm64/boot/dts/apple/t8152-j804.dts +++ b/arch/arm64/boot/dts/apple/t8152-j804.dts @@ -400,6 +400,32 @@ power-domains = <&ps_apcie_gp>; apple,always-on; }; + + /* + * The GPIO block the SEP depends on, as on T8140 and T8142: kept on, + * since the enclave stops servicing its mailbox for good once it is + * switched off under it. + */ + ps_gpio: power-controller@b60 { + compatible = "apple,t8152-pmgr-pwrstate", + "apple,t8103-pmgr-pwrstate"; + reg = <0xb60 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "gpio"; + apple,always-on; + }; + + /* The SEP's own state: critical in the ADT, the enclave gates it itself. */ + ps_sep: power-controller@c00 { + compatible = "apple,t8152-pmgr-pwrstate", + "apple,t8103-pmgr-pwrstate"; + reg = <0xc00 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "sep"; + apple,always-on; + }; }; /* @@ -440,6 +466,30 @@ }; }; +/* + * Secure Enclave (J804 ADT sep, dart-sep; PMGR SEP +0xc00, GPIO +0xb60). + * The alias makes the loader reserve the SEP firmware and publish the boot + * manifests on the node. The SEP and its DART stay disabled: apple_sep + * enables them when it loads. + */ +/ { + aliases { + sep = &sep; + }; +}; + +&sep { + power-domains = <&ps_sep>, <&ps_gpio>; +}; + +&sep_dart { + power-domains = <&ps_sep>; +}; + +&sep_mbox { + status = "okay"; +}; + /* Unexposed chassis port instances remain described and disabled. */ /* diff --git a/arch/arm64/boot/dts/apple/t8152-peripherals.dtsi b/arch/arm64/boot/dts/apple/t8152-peripherals.dtsi index 1cbd604c41a47..4a5d7a7b01e7f 100644 --- a/arch/arm64/boot/dts/apple/t8152-peripherals.dtsi +++ b/arch/arm64/boot/dts/apple/t8152-peripherals.dtsi @@ -63,6 +63,43 @@ reg = <0x2 0x88c80000 0x0 0x20000>; interrupts = ; #iommu-cells = <1>; + /* + * The window iBoot programmed (ADT dart-sep vm-base-0, vm-size-0), + * which already carries the BIT(40) alias the DART translates. The + * SEP consumes the high IOVA on the wire, so no offset. + */ + apple,dma-range = /bits/ 64 <0x10000004000 0xffff0000>; + apple,dma-offset = /bits/ 64 <0x0>; + status = "disabled"; + }; + + /* + * The Secure Enclave (ADT sep, iop-sep,ascwrap-v8). iBoot hands over a + * running SEP (sepfw-booted); apple_sep enables this node and its DART + * when it loads. The board names it with the "sep" alias so the loader + * reserves the SEP firmware and publishes the boot manifests on it. + */ + sep: sep@28a600000 { + compatible = "apple,sep"; + reg = <0x2 0x8a600000 0x0 0x74000>; + mboxes = <&sep_mbox>; + mbox-names = "mbox"; + iommus = <&sep_dart 0>; + status = "disabled"; + }; + + /* + * Not an ASC v4 mailbox: the SEP's window of the post-office block, + * at its third ADT reg + 0x10080 as for the SMC. ADT interrupts in + * order: send-empty, recv-not-empty. + */ + sep_mbox: mailbox@28a710080 { + compatible = "apple,t8152-sep-mailbox", "apple,t8152-smc-mailbox"; + reg = <0x2 0x8a710080 0x0 0x80>; + interrupts = , + ; + interrupt-names = "send-empty", "recv-not-empty"; + #mbox-cells = <0>; status = "disabled"; }; From f583e8be7ee953abe323b6e38e381e58c59c6232 Mon Sep 17 00:00:00 2001 From: LiamRay11 <228416644+LiamRay11@users.noreply.github.com> Date: Mon, 16 Nov 2026 08:35:22 -0800 Subject: [PATCH 12/12] dt-bindings: mailbox: apple,mailbox: add the other T8152 post-office mailboxes On T8152 the NVMe (ANS), display (DCP), keyboard and trackpad (MTP) and SEP coprocessors talk through windows of the same post-office block as the SMC: counted FIFOs sharing one status register, with interrupt masking left to the interrupt controller. The register layout is the one apple,t8152-smc-mailbox already describes. Add a compatible per coprocessor, each with apple,t8152-smc-mailbox as its fallback, so the existing driver match serves them without a code change and a later difference can still be keyed on the specific compatible. All four carry traffic on a MacBook Pro (M6, J804), with the single-compatible form of these nodes: NVMe, the keyboard and trackpad, and Touch ID run through them, and the DCP driver exchanges its messages through the DCP window. Signed-off-by: LiamRay11 <228416644+LiamRay11@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 --- .../bindings/mailbox/apple,mailbox.yaml | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml b/Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml index 8afd38261fe30..12983f568636d 100644 --- a/Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml +++ b/Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml @@ -27,6 +27,17 @@ properties: masking provided by the interrupt controller. const: apple,t8152-smc-mailbox + - description: + The other T8152 post-office mailboxes. Each coprocessor has its own + window of the same counted-FIFO block as the SMC's. + items: + - enum: + - apple,t8152-ans-mailbox + - apple,t8152-dcp-mailbox + - apple,t8152-mtp-mailbox + - apple,t8152-sep-mailbox + - const: apple,t8152-smc-mailbox + - description: ASC mailboxes are the most common variant found on the M1 used for example for the display controller, the system management @@ -243,6 +254,20 @@ required: additionalProperties: false examples: + - | + soc { + #address-cells = <2>; + #size-cells = <2>; + + mailbox@316020300 { + compatible = "apple,t8152-ans-mailbox", "apple,t8152-smc-mailbox"; + reg = <0x3 0x16020300 0x0 0x80>; + interrupts = <1 302 4>, <1 262 4>; + interrupt-names = "send-empty", "recv-not-empty"; + #mbox-cells = <0>; + }; + }; + - | mailbox@77408000 { compatible = "apple,t8103-asc-mailbox", "apple,asc-mailbox-v4";