From 065ad624701a154d67304f81bb63494b870f469f Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Thu, 19 Nov 2026 23:10:32 +1100 Subject: [PATCH 1/9] arm64: dts: apple: t6050: share the K boards' N1 and USB-C ports, add K114s and K116c The K114s and K116c had no USB, no Wi-Fi/Bluetooth and no PCIe: the shared t6050-k114-k116.dtsi disabled ATC1, nub-spmi-a0 and the PCIe host, and only the K114c and K116s described their N1 port and USB-C ports, each in its own copy. The boards' ADTs have the same apcie0 port 0 (registers, IRQ 1523, PERST# GPIO 80, N1 on dart-apcie0 streams 1-3), the same PD controllers (hpm1 at 0xa on nub-spmi-a0, hpm2 at 0xc on nub-spmi-a1, SN201202x) and the same atc-phy, usb-drd and dart-usb nodes on all four boards. So: - t6050-k114-k116.dtsi now describes PCIe port 0 with the N1, its wifi0/bluetooth0 aliases and PERST# pin 80. The board file defines the N1's firmware name and its board-id before including it; the platform ID is board-id << 16 | 0x6050. - The new t6050-k114-k116-usb.dtsi describes ATC1 (left-front) and ATC2 (right): PD controllers, combo PHYs, DWC3s, DARTs and the atcphy aliases. Boards include it after t6050-peripherals.dtsi, which defines nub-spmi-a1 for them. - K114c and K116s keep only their deltas: K114c the nub-spmi-a0 fault queue window, the MagSafe PD controller and the ATC2 router; K116s the SD reader on port 1 and the single nub-spmi-a1 window. - K114s (board-id 0x14) and K116c (board-id 0x06) include both. The K114c and K116s DTBs are byte-identical before and after, as are the other T6050 DTBs. The shared blocks are Joshua Warren's K114c and Jens Axboe's K116s descriptions. Signed-off-by: Ryan Murray --- .../boot/dts/apple/t6050-k114-k116-usb.dtsi | 182 +++++++++++++ .../arm64/boot/dts/apple/t6050-k114-k116.dtsi | 106 +++++--- arch/arm64/boot/dts/apple/t6050-k114c.dts | 257 +----------------- arch/arm64/boot/dts/apple/t6050-k114s.dts | 6 + arch/arm64/boot/dts/apple/t6050-k116c.dts | 6 + arch/arm64/boot/dts/apple/t6050-k116s.dts | 235 +--------------- 6 files changed, 291 insertions(+), 501 deletions(-) create mode 100644 arch/arm64/boot/dts/apple/t6050-k114-k116-usb.dtsi diff --git a/arch/arm64/boot/dts/apple/t6050-k114-k116-usb.dtsi b/arch/arm64/boot/dts/apple/t6050-k114-k116-usb.dtsi new file mode 100644 index 0000000000000..c82d8c24e3ede --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6050-k114-k116-usb.dtsi @@ -0,0 +1,182 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * The K114c, K114s, K116c and K116s USB-C ports ATC1 (left-front) and ATC2 (right): + * USB 2/3 and the PD controllers. A board file includes this after + * t6050-peripherals.dtsi, which describes nub-spmi-a1 for these boards. + * + * From the boards' ADT, the same on all four: + * ATC0 usb-drd0 left-back hpm0 nub-spmi-a0 0x0c (the boot link's debug port, not described) + * ATC1 usb-drd1 left-front hpm1 nub-spmi-a0 0x0a, port-number 2, acio-parent acio1 + * ATC2 usb-drd2 right hpm2 nub-spmi-a1 0x0c, port-number 3, acio-parent acio2 + * hpm5 nub-spmi-a0 0x08 (MagSafe, not a USB-C connector) + * The PD controllers are SN201202x. The USB4/Thunderbolt routers (acio1, acio2) and the + * DisplayPort routes are not described here; the PHYs run in USB mode. The combo PHY driver + * leaves ATC0 alone on purpose (apple,port-index 0). + * + * The boot loader fills the PHYs' tunables from the ADT through the atcphy aliases. + */ +/ { + aliases { + atcphy1 = &atc1_phy; + atcphy2 = &atc2_phy; + }; +}; + +/* ==== The left-front USB-C port (ATC1) ==== */ +&nub_spmi_a0 { + status = "okay"; + + hpm1: usb-pd@a { + compatible = "apple,sn201202x"; + reg = <0xa SPMI_USID>; + + connector { + compatible = "usb-c-connector"; + label = "USB-C Left-front"; + power-role = "dual"; + data-role = "dual"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + hpm1_hs: endpoint { + remote-endpoint = <&usb_drd1_hs>; + }; + }; + + port@1 { + reg = <1>; + hpm1_ss: endpoint { + remote-endpoint = <&atc1_phy_ep>; + }; + }; + }; + }; + }; +}; + +&atc1_phy_mbox { + status = "okay"; +}; + +&atc1_phy { + status = "okay"; + + port { + atc1_phy_ep: endpoint { + remote-endpoint = <&hpm1_ss>; + }; + }; +}; + +&usb_drd1 { + status = "okay"; + + port { + usb_drd1_hs: endpoint { + remote-endpoint = <&hpm1_hs>; + }; + }; +}; + +&usb_drd1_dart_0 { + status = "okay"; +}; + +&usb_drd1_dart_1 { + status = "okay"; +}; + +/* + * ==== The right USB-C port (ATC2) ==== + * + * The HPM is on its own bus, nub-spmi-a1, and nothing hands the port off, so the power + * domains, the PHY mailbox, the PHY, the DWC3 and its DARTs are enabled outright. The driver + * polls the generation 4 bus and refuses an interrupt on it. + */ +&ps_atc2_common { + status = "okay"; +}; + +&ps_atc2_usb_aon { + status = "okay"; +}; + +&ps_atc2_phymxwrap { + status = "okay"; +}; + +&ps_atc2_usb { + status = "okay"; +}; + +&atc2_phy_mbox { + status = "okay"; +}; + +&atc2_phy { + status = "okay"; + + port { + atc2_phy_ep: endpoint { + remote-endpoint = <&hpm2_ss>; + }; + }; +}; + +&usb_drd2 { + status = "okay"; + + port { + usb_drd2_hs: endpoint { + remote-endpoint = <&hpm2_hs>; + }; + }; +}; + +&usb_drd2_dart_0 { + status = "okay"; +}; + +&usb_drd2_dart_1 { + status = "okay"; +}; + +&nub_spmi_a1 { + /delete-property/ interrupts; + status = "okay"; + + hpm2: usb-pd@c { + compatible = "apple,sn201202x"; + reg = <0xc SPMI_USID>; + + connector { + compatible = "usb-c-connector"; + label = "USB-C Right"; + power-role = "dual"; + data-role = "dual"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + hpm2_hs: endpoint { + remote-endpoint = <&usb_drd2_hs>; + }; + }; + + port@1 { + reg = <1>; + hpm2_ss: endpoint { + remote-endpoint = <&atc2_phy_ep>; + }; + }; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/apple/t6050-k114-k116.dtsi b/arch/arm64/boot/dts/apple/t6050-k114-k116.dtsi index 70502c23beffb..a1fa5068268c5 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114-k116.dtsi +++ b/arch/arm64/boot/dts/apple/t6050-k114-k116.dtsi @@ -35,6 +35,9 @@ aliases { serial0 = &dockchannel; + /* The boot loader fills the N1's factory addresses through these */ + wifi0 = &n1_alpha; + bluetooth0 = &n1_beta; }; chosen { @@ -80,35 +83,14 @@ }; }; -/* ATC1, ATC3 and the PD controller buses nub-spmi-a0 and -a2: not yet described for these boards */ -&nub_spmi_a0 { - status = "disabled"; -}; - +/* + * ATC3 and the PD controller bus nub-spmi-a2: not described for these boards. The + * USB-C ports ATC1 and ATC2 are in t6050-k114-k116-usb.dtsi. + */ &nub_spmi_a2 { status = "disabled"; }; -&atc1_phy_mbox { - status = "disabled"; -}; - -&atc1_phy { - status = "disabled"; -}; - -&usb_drd1 { - status = "disabled"; -}; - -&usb_drd1_dart_0 { - status = "disabled"; -}; - -&usb_drd1_dart_1 { - status = "disabled"; -}; - &atc3_phy_mbox { status = "disabled"; }; @@ -139,23 +121,81 @@ /* * As on J716c, where reading pin 112 takes an SError, only the pins a node - * here names are exposed, and none is yet. The N1 on PCIe port 0 needs its - * board's platform ID, which the static ADT does not carry, so the port and - * its PERST# pin stay unused for now. + * names are exposed: here 80, PCIe port 0's PERST#. A board that names more + * pins replaces the list. */ &pinctrl_ap { - gpio-reserved-ranges = <0 221>; + gpio-reserved-ranges = <0 80>, <81 140>; }; /* - * The K114s N1 needs its own platform ID (its ADT /chosen board-id << 16 | 0x6050) - * before the port can be described. aura's T6050 hand-off still wants the host's - * iommu-map to mark the ports as it found them, so carry it with the host disabled. + * PCIe port 0: the N1 (Wi-Fi and Bluetooth), the same on all four boards and + * laid out as on J716c: the boot loader trains the link and keeps power, + * clocks, the PHY and PERST; Linux owns the routing, MSI and the DART. The + * port stays disabled until the loader trains it. From the boards' ADT: + * apcie0 gives port 0's registers and IRQ 1523, pci-bridge0's PERST# is GPIO + * 80, and the N1's three functions are on DART streams 1-3. + * + * The board file defines, before including this file, the N1's personalized + * firmware (T6050_K_N1_FIRMWARE) and its ADT /chosen board-id + * (T6050_K_BOARD_ID). The N1's platform ID is board-id << 16 | chip 0x6050. + * aura's T6050 hand-off wants the host's iommu-map to mark the ports as it + * found them. */ &pcie0 { iommu-map = <0x100 &dart_apcie0 1 3>; bus-range = <0 4>; - status = "disabled"; + status = "okay"; + reg = <0x1c 0xb0000000 0x0 0x10000000>, + <0x4 0x14000000 0x0 0x4000>, + <0x4 0x10028000 0x0 0x8000>, + <0x4 0x17010000 0x0 0x4000>, + <0x4 0x10024000 0x0 0x4000>; + reg-names = "config", "rc", "port0", "phy0", "intr2axi0"; + interrupts = ; + interrupt-names = "port0"; + + port00: pci@0,0 { + device_type = "pci"; + reg = <0x0 0 0 0 0>; + bus-range = <1 1>; + apple,link-trained-by-bootloader; + /* PERST#, driven only by the root-port reset after the N1's ROM stage */ + reset-gpios = <&pinctrl_ap 80 GPIO_ACTIVE_LOW>; + status = "disabled"; + + #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>; + + n1_control: control@0,0 { + compatible = "pci106b,1900"; + reg = <0x10000 0x0 0x0 0x0 0x0>; + firmware-name = T6050_K_N1_FIRMWARE; + apple,centauri-platform-id = <((T6050_K_BOARD_ID << 16) | 0x6050)>; + apple,centauri-protocol = <27>; + }; + + n1_alpha: wifi@0,1 { + compatible = "pci106b,1902"; + 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]; + }; + }; }; /* These boards' SMC fan and power keys are not yet checked */ diff --git a/arch/arm64/boot/dts/apple/t6050-k114c.dts b/arch/arm64/boot/dts/apple/t6050-k114c.dts index ed1f3ec3036a6..8a15f89849ca8 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114c.dts +++ b/arch/arm64/boot/dts/apple/t6050-k114c.dts @@ -11,6 +11,9 @@ /* Defined before the includes: t6050-max.dtsi guards the ATC2 router on it. */ #define T6050_K114C +/* The N1's firmware and this board's ADT board-id, for t6050-k114-k116.dtsi */ +#define T6050_K_N1_FIRMWARE "apple/centauri/k114c-ftab.bin" +#define T6050_K_BOARD_ID 0x04 #include "t6050-k114-k116.dtsi" / { @@ -53,78 +56,10 @@ / { aliases { - /* kboot fills the N1's factory addresses from /chosen through these */ - wifi0 = &n1_alpha; - bluetooth0 = &n1_beta; nvram = &nvram; }; }; -/* - * PCIe port 0: the N1 (Wi-Fi and Bluetooth), laid out as on J716c: the boot - * loader trains the link and keeps power, clocks, the PHY and PERST; Linux owns - * the routing, MSI and the DART. The port stays disabled until the loader - * trains it. - */ -&pcie0 { - reg = <0x1c 0xb0000000 0x0 0x10000000>, - <0x4 0x14000000 0x0 0x4000>, - <0x4 0x10028000 0x0 0x8000>, - <0x4 0x17010000 0x0 0x4000>, - <0x4 0x10024000 0x0 0x4000>; - reg-names = "config", "rc", "port0", "phy0", "intr2axi0"; - interrupts = ; - interrupt-names = "port0"; - - /* The N1's three functions are on DART streams 1-3 */ - iommu-map = <0x100 &dart_apcie0 1 3>; - bus-range = <0 4>; - status = "okay"; - - port00: pci@0,0 { - device_type = "pci"; - reg = <0x0 0 0 0 0>; - bus-range = <1 1>; - apple,link-trained-by-bootloader; - /* PERST#, driven only by the root-port reset after the N1's ROM stage */ - reset-gpios = <&pinctrl_ap 80 GPIO_ACTIVE_LOW>; - status = "disabled"; - - #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>; - - /* platform ID (board 0x04 << 16) | chip 0x6050 */ - n1_control: control@0,0 { - compatible = "pci106b,1900"; - reg = <0x10000 0x0 0x0 0x0 0x0>; - firmware-name = "apple/centauri/k114c-ftab.bin"; - apple,centauri-platform-id = <0x00046050>; - apple,centauri-protocol = <27>; - }; - - n1_alpha: wifi@0,1 { - compatible = "pci106b,1902"; - 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]; - }; - }; -}; - /* * Pin 112's register takes an SError when read, so only the pins a node here * names are exposed: 80 (PCIe port 0's PERST#); 106 and 107, the speaker amps' @@ -361,61 +296,16 @@ }; /* - * ==== The left-front USB-C port (ATC1) ==== - * - * ADT /arm-io/nub-spmi-a0/hpm1 (SN201202x, SPMI address 0xa, port-number 2, port-location - * "left-front", acio-parent acio1), with atc-phy1, usb-drd1 and dart-usb1. The K114cAP ADT - * has the same hpm0, hpm1, hpm5, atc-phy and usb-drd nodes as the J714cAP one, so this is the - * J714c port block. The ATC1 template nodes of t6050-dieX.dtsi are enabled here; the boards - * sharing t6050-k114-k116.dtsi keep them disabled. The port's USB4/Thunderbolt router - * (/arm-io/acio1) and its DisplayPort routes are not described; the PHY runs in USB mode. - * - * The left-back port (ATC0, hpm0) is the boot link's debug port; the combo PHY driver - * excludes it on purpose (apple,port-index 0). + * The USB-C ports ATC1 and ATC2, as on the other K boards (t6050-k114-k116-usb.dtsi). This + * board also gives nub-spmi-a0 its generation 4 fault queue (reg[1], which macOS empties when + * the controller starts) and describes the MagSafe 3 port's PD controller. */ -/ { - aliases { - atcphy1 = &atc1_phy; - }; -}; +#include "t6050-k114-k116-usb.dtsi" &nub_spmi_a0 { - status = "okay"; - /* reg[1]: the generation 4 fault queue, which macOS empties when the controller starts */ reg = <0x2 0x8a188000 0x0 0x4000>, <0x2 0x8a184000 0x0 0x4000>; - hpm1: usb-pd@a { - compatible = "apple,sn201202x"; - reg = <0xa SPMI_USID>; - - connector { - compatible = "usb-c-connector"; - label = "USB-C Left-front"; - power-role = "dual"; - data-role = "dual"; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - hpm1_hs: endpoint { - remote-endpoint = <&usb_drd1_hs>; - }; - }; - - port@1 { - reg = <1>; - hpm1_ss: endpoint { - remote-endpoint = <&atc1_phy_ep>; - }; - }; - }; - }; - }; - /* * The MagSafe 3 port's PD controller (ADT hpm5, port-type 0x11). It has no USB data * path, so it gets no connector node; tipd registers a Type-C port and a power supply @@ -428,139 +318,10 @@ }; }; -&atc1_phy_mbox { - status = "okay"; -}; - -&atc1_phy { - status = "okay"; - - port { - atc1_phy_ep: endpoint { - remote-endpoint = <&hpm1_ss>; - }; - }; -}; - -&usb_drd1 { - status = "okay"; - - port { - usb_drd1_hs: endpoint { - remote-endpoint = <&hpm1_hs>; - }; - }; -}; - -&usb_drd1_dart_0 { - status = "okay"; -}; - -&usb_drd1_dart_1 { - status = "okay"; -}; - /* - * ==== The right USB-C port (ATC2) ==== - * - * ADT /arm-io/nub-spmi-a1/hpm2 (SN201202x, SPMI address 0xc, port-number 3, port-location - * "right", acio-parent acio2), with atc-phy2, usb-drd2 and dart-usb2. The HPM is on its own - * bus, nub-spmi-a1, and nothing hands the port off, so the power domains, the PHY mailbox, the - * PHY, the DWC3 and its DARTs are enabled outright, as t6050-max-atc2.dtsi does for the J714c - * and J716c. Its USB4/Thunderbolt router (acio2) and PCIe tunnel are - * t6050-max-atc2-router.dtsi, included below; the DisplayPort route is not described. + * The right port's USB4/Thunderbolt router (acio2) and PCIe tunnel; the DisplayPort route + * is not described. */ -/ { - aliases { - atcphy2 = &atc2_phy; - }; -}; - -&ps_atc2_common { - status = "okay"; -}; - -&ps_atc2_usb_aon { - status = "okay"; -}; - -&ps_atc2_phymxwrap { - status = "okay"; -}; - -&ps_atc2_usb { - status = "okay"; -}; - -&atc2_phy_mbox { - status = "okay"; -}; - -&atc2_phy { - status = "okay"; - - port { - atc2_phy_ep: endpoint { - remote-endpoint = <&hpm2_ss>; - }; - }; -}; - -&usb_drd2 { - status = "okay"; - - port { - usb_drd2_hs: endpoint { - remote-endpoint = <&hpm2_hs>; - }; - }; -}; - -&usb_drd2_dart_0 { - status = "okay"; -}; - -&usb_drd2_dart_1 { - status = "okay"; -}; - -&nub_spmi_a1 { - status = "okay"; - /* the driver polls the PD controllers and refuses an interrupt on this bus */ - /delete-property/ interrupts; - - hpm2: usb-pd@c { - compatible = "apple,sn201202x"; - reg = <0xc SPMI_USID>; - - connector { - compatible = "usb-c-connector"; - label = "USB-C Right"; - power-role = "dual"; - data-role = "dual"; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - hpm2_hs: endpoint { - remote-endpoint = <&usb_drd2_hs>; - }; - }; - - port@1 { - reg = <1>; - hpm2_ss: endpoint { - remote-endpoint = <&atc2_phy_ep>; - }; - }; - }; - }; - }; -}; - #include "t6050-max-atc2-router.dtsi" /* The host DROM from the K114cAP ADT (/arm-io/acio2 thunderbolt-drom); the boot loader replaces it */ diff --git a/arch/arm64/boot/dts/apple/t6050-k114s.dts b/arch/arm64/boot/dts/apple/t6050-k114s.dts index 2b88e99a6d993..409979f034678 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114s.dts +++ b/arch/arm64/boot/dts/apple/t6050-k114s.dts @@ -10,6 +10,9 @@ * Copyright The Asahi Linux Contributors */ +/* The N1's firmware and this board's ADT board-id, for t6050-k114-k116.dtsi */ +#define T6050_K_N1_FIRMWARE "apple/centauri/k114s-ftab.bin" +#define T6050_K_BOARD_ID 0x14 #include "t6050-k114-k116.dtsi" / { @@ -60,3 +63,6 @@ }; }; }; + +/* The USB-C ports ATC1 and ATC2, as on the other K boards */ +#include "t6050-k114-k116-usb.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6050-k116c.dts b/arch/arm64/boot/dts/apple/t6050-k116c.dts index ff9e875fb1951..a270ed24ba3c7 100644 --- a/arch/arm64/boot/dts/apple/t6050-k116c.dts +++ b/arch/arm64/boot/dts/apple/t6050-k116c.dts @@ -9,6 +9,9 @@ * Copyright The Asahi Linux Contributors */ +/* The N1's firmware and this board's ADT board-id, for t6050-k114-k116.dtsi */ +#define T6050_K_N1_FIRMWARE "apple/centauri/k116c-ftab.bin" +#define T6050_K_BOARD_ID 0x06 #include "t6050-k114-k116.dtsi" / { @@ -22,3 +25,6 @@ #define T6050_K116C #include "t6050-peripherals.dtsi" + +/* The USB-C ports ATC1 and ATC2, as on the other K boards */ +#include "t6050-k114-k116-usb.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6050-k116s.dts b/arch/arm64/boot/dts/apple/t6050-k116s.dts index 56cf949d10413..c6b1adc3ede00 100644 --- a/arch/arm64/boot/dts/apple/t6050-k116s.dts +++ b/arch/arm64/boot/dts/apple/t6050-k116s.dts @@ -9,6 +9,9 @@ * Copyright The Asahi Linux Contributors */ +/* The N1's firmware and this board's ADT board-id, for t6050-k114-k116.dtsi */ +#define T6050_K_N1_FIRMWARE "apple/centauri/k116s-ftab.bin" +#define T6050_K_BOARD_ID 0x16 #include "t6050-k114-k116.dtsi" / { @@ -25,9 +28,6 @@ / { aliases { - /* The loader fills the N1's factory addresses through these */ - wifi0 = &n1_alpha; - bluetooth0 = &n1_beta; /* the boot loader reserves the SEP firmware and adds its manifests through this alias */ sep = &sep; }; @@ -44,10 +44,7 @@ }; /* - * PCIe port 0: the N1 (Wi-Fi and Bluetooth), laid out as on J714s. ADT apcie0 - * gives port 0's registers and IRQ 1523, pci-bridge0's PERST# is GPIO 80, and - * the N1's three functions are on DART streams 1-3. The platform ID is this - * board's ADT /chosen board-id (0x16) << 16 | chip 0x6050. + * PCIe port 0, the N1, is in t6050-k114-k116.dtsi. * * PCIe port 1: the SD card reader (ADT apcie0/pci-bridge1/pcie-sdreader, a * GL9755), as on J714s. The boot loader leaves the port down, so the kernel @@ -86,52 +83,8 @@ interrupt-names = "port0", "port1"; iommu-map = <0x100 &dart_apcie0 1 3>, <0x200 &apcie1_dart 1 1>; - bus-range = <0 4>; /* apcie1_dart probes only once port 1 is up: the host must not wait for it */ post-init-providers = <&apcie1_dart>; - status = "okay"; - - port00: pci@0,0 { - device_type = "pci"; - reg = <0x0 0 0 0 0>; - bus-range = <1 1>; - apple,link-trained-by-bootloader; - /* PERST#: ADT pci-bridge0 function-perst, GPIO 80 */ - reset-gpios = <&pinctrl_ap 80 GPIO_ACTIVE_LOW>; - status = "disabled"; - - #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>; - - n1_control: control@0,0 { - compatible = "pci106b,1900"; - reg = <0x10000 0x0 0x0 0x0 0x0>; - firmware-name = "apple/centauri/k116s-ftab.bin"; - apple,centauri-platform-id = <0x00166050>; - apple,centauri-protocol = <27>; - }; - - n1_alpha: wifi@0,1 { - compatible = "pci106b,1902"; - 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]; - }; - }; port01: pci@1,0 { device_type = "pci"; @@ -193,172 +146,6 @@ status = "okay"; }; -/* - * Type-C, from the ADT (as on J714s): - * ATC0 usb-drd0 left-back hpm0 nub-spmi-a0 0x0c (the debug port, not described) - * ATC1 usb-drd1 left-front hpm1 nub-spmi-a0 0x0a - * ATC2 usb-drd2 right hpm2 nub-spmi-a1 0x0c - * hpm5 nub-spmi-a0 0x08 (MagSafe, not a USB-C connector) - */ - -/* Left-front port (ATC1): the SN201202x hpm1 and the connector graph */ -&nub_spmi_a0 { - status = "okay"; - - hpm1: usb-pd@a { - compatible = "apple,sn201202x"; - reg = <0xa SPMI_USID>; - - typec1: connector { - compatible = "usb-c-connector"; - label = "USB-C Left-front"; - power-role = "dual"; - data-role = "dual"; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - typec1_hs: endpoint { - remote-endpoint = <&usb_drd1_hs>; - }; - }; - - port@1 { - reg = <1>; - typec1_ss: endpoint { - remote-endpoint = <&atc1_phy_typec>; - }; - }; - }; - }; - }; -}; - -&atc1_phy_mbox { - status = "okay"; -}; - -&atc1_phy { - status = "okay"; - - port { - atc1_phy_typec: endpoint { - remote-endpoint = <&typec1_ss>; - }; - }; -}; - -&usb_drd1 { - status = "okay"; - - port { - usb_drd1_hs: endpoint { - remote-endpoint = <&typec1_hs>; - }; - }; -}; - -&usb_drd1_dart_0 { - status = "okay"; -}; - -&usb_drd1_dart_1 { - status = "okay"; -}; - -/* - * Right port (ATC2): hpm2 on nub-spmi-a1, USB only (dcpext0's DisplayPort route - * through ATC2 stays off). The driver polls the generation 4 bus and refuses an - * interrupt, so it takes the first register window only, as on J714s. - */ -&nub_spmi_a1 { - reg = <0x2 0x8a1a8000 0x0 0x4000>; - /delete-property/ interrupts; - status = "okay"; - - hpm2: usb-pd@c { - compatible = "apple,sn201202x"; - reg = <0xc SPMI_USID>; - - typec2: connector { - compatible = "usb-c-connector"; - label = "USB-C Right"; - power-role = "dual"; - data-role = "dual"; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - typec2_hs: endpoint { - remote-endpoint = <&usb_drd2_hs>; - }; - }; - - port@1 { - reg = <1>; - typec2_ss: endpoint { - remote-endpoint = <&atc2_phy_typec>; - }; - }; - }; - }; - }; -}; - -&ps_atc2_common { - status = "okay"; -}; - -&ps_atc2_usb_aon { - status = "okay"; -}; - -&ps_atc2_phymxwrap { - status = "okay"; -}; - -&ps_atc2_usb { - status = "okay"; -}; - -&atc2_phy_mbox { - status = "okay"; -}; - -&atc2_phy { - status = "okay"; - - port { - atc2_phy_typec: endpoint { - remote-endpoint = <&typec2_ss>; - }; - }; -}; - -&usb_drd2 { - status = "okay"; - - port { - usb_drd2_hs: endpoint { - remote-endpoint = <&typec2_hs>; - }; - }; -}; - -&usb_drd2_dart_0 { - status = "okay"; -}; - -&usb_drd2_dart_1 { - status = "okay"; -}; - /* * SMC sensors, as on J714s: every readable float T* key is discovered through * apple,discover-temperatures in t6050-die0.dtsi, so the shared temperature @@ -471,12 +258,20 @@ / { aliases { keyboard = &keyboard; - /* The loader fills the PHYs' tunables from the ADT through these */ - atcphy1 = &atc1_phy; - atcphy2 = &atc2_phy; }; }; +/* The USB-C ports ATC1 and ATC2, as on the other K boards */ +#include "t6050-k114-k116-usb.dtsi" + +/* + * Right port (ATC2): nub-spmi-a1 takes the first register window only, as on + * J714s. + */ +&nub_spmi_a1 { + reg = <0x2 0x8a1a8000 0x0 0x4000>; +}; + /* * The PMP (ADT pmp0, /chosen, /arm-io/pmgr), as on the J714s: iBoot loads its firmware and * the driver starts it with these boot arguments and the firmware properties in the tunables From cb414a5c4020f65f70dfe3eba1f006b1efd7ef9d Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Sun, 22 Nov 2026 21:21:42 +1100 Subject: [PATCH 2/9] arm64: dts: apple: t6050: expose the K boards' jack pins with the PCIe PERST# pin The K board headphone jack change opens pins 134 and 139 (the CS42L84's interrupt and reset) in the shared K114/K116 pinctrl_ap list, and this branch opens pin 80 for PCIe port 0. Use the union, <0 80>, <81 53>, <135 4>, <140 81>, in both so they land in either order. Both pins read cleanly; only pin 112 takes an SError. Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t6050-k114-k116.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t6050-k114-k116.dtsi b/arch/arm64/boot/dts/apple/t6050-k114-k116.dtsi index a1fa5068268c5..a37a1aa19ce0b 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114-k116.dtsi +++ b/arch/arm64/boot/dts/apple/t6050-k114-k116.dtsi @@ -121,11 +121,11 @@ /* * As on J716c, where reading pin 112 takes an SError, only the pins a node - * names are exposed: here 80, PCIe port 0's PERST#. A board that names more - * pins replaces the list. + * names are exposed: 80, PCIe port 0's PERST#, and 134 and 139, the jack + * codec's interrupt and reset. A board that names more pins replaces the list. */ &pinctrl_ap { - gpio-reserved-ranges = <0 80>, <81 140>; + gpio-reserved-ranges = <0 80>, <81 53>, <135 4>, <140 81>; }; /* From 7403c74453ea9d9009166e8c30c5ac6c11040102 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Fri, 27 Nov 2026 13:37:22 +1100 Subject: [PATCH 3/9] arm64: dts: apple: t6050: share the K boards' GPU, add it to K114s and K116c The K114s and K116c keep the inventory GPU node of t6050-peripherals.dtsi, compatible "apple,agx-t6050". The boot loader's GPU hand-off looks for "apple,agx-g17s" under the "gpu" alias and drm/asahi does not bind the inventory node, so on a K114s the GPU is never enabled and there is no render node. The K114c and K116s each carry the same G17S description in their own file (t6050-k114c-gpu.dtsi, t6050-k116s-gpu.dtsi). The four boards' ADTs (live K114s 27.2, the K114c, K116s and K116c images) have the same GPU: - sgx: "gpu,t6050", reg 0x21_00000000 + 0x3fdc000 and 0x21_00d00000 + 0x177000, interrupts 2448-2451, 450, 2806, 2463, 2465; - gfx-asc: reg 0x21_02600000 + 0x88000, 0x21_02050000 + 8, interrupts [2798, 2797, 2800, 2799], role GFX, power-gates 614; - gfx1-asc: reg 0x21_02e00000 + 0x88000, 0x21_02850000 + 0x60000, interrupts [2802, 2801, 2804, 2803], role GFX1, power-gates 657; - pmgr GPX (+0x0) and AFR (+0x100) critical, GFX (+0x110) not. On the K114s the GPU ASCs' __TEXT (0x50000 + 0x54000) and fw-data bounds are the K116s's, which the loader checks against its builds. So move the description into t6050-k114-k116-gpu.dtsi and include it from all four boards. It also carries the K114c's apple,sleep-retained on ps_gfx: the G17 firmware stays live across suspend-to-idle on every one of these boards. The K116s keeps only its delta, the GPU on the PMP's GFX report entry, as its board runs the PMP. Everything stays disabled until the loader fills the reservations and enables it, as before. The K114c DTB and the other T6050 DTBs are byte-identical before and after; the K116s DTB gains only apple,sleep-retained on ps_gfx, which its sleep description already keeps always-on. Signed-off-by: Ryan Murray --- ...114c-gpu.dtsi => t6050-k114-k116-gpu.dtsi} | 40 +++-- arch/arm64/boot/dts/apple/t6050-k114c.dts | 3 +- arch/arm64/boot/dts/apple/t6050-k114s.dts | 3 + arch/arm64/boot/dts/apple/t6050-k116c.dts | 3 + .../arm64/boot/dts/apple/t6050-k116s-gpu.dtsi | 155 ------------------ arch/arm64/boot/dts/apple/t6050-k116s.dts | 11 +- 6 files changed, 46 insertions(+), 169 deletions(-) rename arch/arm64/boot/dts/apple/{t6050-k114c-gpu.dtsi => t6050-k114-k116-gpu.dtsi} (58%) delete mode 100644 arch/arm64/boot/dts/apple/t6050-k116s-gpu.dtsi diff --git a/arch/arm64/boot/dts/apple/t6050-k114c-gpu.dtsi b/arch/arm64/boot/dts/apple/t6050-k114-k116-gpu.dtsi similarity index 58% rename from arch/arm64/boot/dts/apple/t6050-k114c-gpu.dtsi rename to arch/arm64/boot/dts/apple/t6050-k114-k116-gpu.dtsi index ceec5b22d2ae7..9270842379086 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114c-gpu.dtsi +++ b/arch/arm64/boot/dts/apple/t6050-k114-k116-gpu.dtsi @@ -1,12 +1,14 @@ // SPDX-License-Identifier: GPL-2.0+ OR MIT /* - * K114c (M5 Max, G17C) GPU, for the boot loader's GPU handoff. Everything here - * stays disabled: the loader checks the ADT and the live GPU firmware build, - * fills the GPU reservations, then enables the power states, both mailboxes and - * the GPU, the GPU last. A loader that refuses leaves the GPU off. + * The GPU of the K114c, K114s, K116s and K116c (ADT /arm-io/sgx "gpu,t6050"), for the boot + * loader's GPU hand-off. It is the GPU half of t6050-j714s-gpu-panel.dtsi: the four boards' + * ADTs have the J714s's sgx, gfx-asc and gfx1-asc. * - * Same layout as t6050-j714s-gpu-panel.dtsi; the GPU is G17C and, in the ADT, - * sgx and both GPU ASCs are the same as on the M5 Pro. + * Everything here stays disabled: the loader checks the ADT and the live GPU firmware build, + * fills the six reservations, then enables the GPU PMGR, GPX, AFR, GFX, both mailboxes and the + * GPU, the GPU last. A loader that refuses leaves the GPU off and the rest of the boot as it is. + * + * arm-io's ranges add 0x2_0000_0000 to the ADT's 0x21_xxxx_xxxx bus addresses. */ / { @@ -16,7 +18,12 @@ }; reserved-memory { - /* Filled and enabled by the loader from the ADT */ + /* + * Filled and enabled by the loader from the ADT: sgx gpu-region-*, + * gfx-shared-region-*, gfx-shared-l2-region-* and gfx-handoff-* (the UAT + * ranges), the GPU ASCs' __TEXT (fw-text) and gfx-data-base to the end of + * gfx1-data-shared-ro (fw-data). iBoot places them; they differ per Mac. + */ gpu_fw_text: gpu-fw-text { reg = <0 0 0 0>; no-map; @@ -61,9 +68,9 @@ &{/soc} { /* - * ADT gfx-asc and gfx1-asc at their physical windows: the wrapper, the - * 8-byte iop-vbar, and their second and third interrupts (send-empty, - * recv-not-empty), as T8140/T8142. + * ADT gfx-asc: reg 0x21_02600000 + 0x88000 (wrapper), 0x21_02050000 + 8 (iop-vbar); + * interrupts [2798, 2797, 2800, 2799], of which the second and third are send-empty + * and recv-not-empty; role "GFX"; power-gates [614] (GFX_ASC). */ gfx_mbox: mailbox@2302600000 { compatible = "apple,t6050-j775d-ascwrap-v6"; @@ -79,6 +86,11 @@ status = "disabled"; }; + /* + * ADT gfx1-asc: reg 0x21_02e00000 + 0x88000, 0x21_02850000 (ADT size 0x60000; the + * driver uses the first 8 bytes); interrupts [2802, 2801, 2804, 2803]; role "GFX1"; + * power-gates [657] (GFX_ASC1). + */ gfx1_mbox: mailbox@2302e00000 { compatible = "apple,t6050-j775d-ascwrap-v6"; reg = <0x23 0x2e00000 0x0 0x88000>, @@ -94,7 +106,10 @@ }; }; -/* The ADT marks GPX and AFR, GFX's parents, critical. */ +/* + * ADT pmgr devices GPX (id 359, +0x0), AFR (id 360, +0x100) and GFX (id 362, +0x110) in the + * GPU PMGR. The ADT marks GPX and AFR, GFX's parents, critical; GFX not. + */ &ps_gpx { apple,always-on; }; @@ -112,8 +127,9 @@ }; &sgx { + /* What the loader checks and drivers/gpu/drm/asahi binds */ compatible = "apple,agx-g17s"; - /* ADT sgx reg[0]; the driver maps the first 16 MiB as "sgx" */ + /* ADT sgx reg[0] 0x21_00000000 + 0x3fdc000; the driver maps the first 16 MiB as "sgx" */ reg = <0x23 0x0 0x0 0x3fdc000>; reg-names = "sgx"; /delete-property/ interrupts; diff --git a/arch/arm64/boot/dts/apple/t6050-k114c.dts b/arch/arm64/boot/dts/apple/t6050-k114c.dts index 8a15f89849ca8..086c2dd3244b7 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114c.dts +++ b/arch/arm64/boot/dts/apple/t6050-k114c.dts @@ -70,7 +70,8 @@ gpio-reserved-ranges = <0 80>, <81 25>, <108 26>, <135 1>, <138 1>, <140 81>; }; -#include "t6050-k114c-gpu.dtsi" +/* The GPU, handed over by the boot loader */ +#include "t6050-k114-k116-gpu.dtsi" /* * Sound through the AOP, as on J813: its audio service runs the serializers, the diff --git a/arch/arm64/boot/dts/apple/t6050-k114s.dts b/arch/arm64/boot/dts/apple/t6050-k114s.dts index 409979f034678..c92c961141aaa 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114s.dts +++ b/arch/arm64/boot/dts/apple/t6050-k114s.dts @@ -27,6 +27,9 @@ #define T6050_K114S #include "t6050-peripherals.dtsi" +/* The GPU, handed over by the boot loader */ +#include "t6050-k114-k116-gpu.dtsi" + / { aliases { /* asahi-bless and the boot loader find the NVRAM partition by this alias */ diff --git a/arch/arm64/boot/dts/apple/t6050-k116c.dts b/arch/arm64/boot/dts/apple/t6050-k116c.dts index a270ed24ba3c7..40bfec8ab72a8 100644 --- a/arch/arm64/boot/dts/apple/t6050-k116c.dts +++ b/arch/arm64/boot/dts/apple/t6050-k116c.dts @@ -26,5 +26,8 @@ #define T6050_K116C #include "t6050-peripherals.dtsi" +/* The GPU, handed over by the boot loader */ +#include "t6050-k114-k116-gpu.dtsi" + /* The USB-C ports ATC1 and ATC2, as on the other K boards */ #include "t6050-k114-k116-usb.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6050-k116s-gpu.dtsi b/arch/arm64/boot/dts/apple/t6050-k116s-gpu.dtsi deleted file mode 100644 index 7bc349759028d..0000000000000 --- a/arch/arm64/boot/dts/apple/t6050-k116s-gpu.dtsi +++ /dev/null @@ -1,155 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ OR MIT -/* - * K116s GPU (AGX G17S, ADT /arm-io/sgx "gpu,t6050") for the boot loader hand-off. - * - * It is the GPU half of t6050-j714s-gpu-panel.dtsi (integration/aurora 06c3db9c3752); the - * K116s tree already has its own display half. Everything stays disabled: a loader with the - * G17S hand-off fills the six reservations from the ADT and enables the GPU PMGR, GPX, AFR, - * GFX, both mailboxes and the GPU, the GPU last. Without such a loader (the enrolled aura - * 58d65df0 has none for this layout) this file changes nothing at run time except the two - * always-on marks, which sit on disabled nodes. - * - * Every value below was checked against the K116s 27.2 ADT. arm-io ranges add 0x2_0000_0000 - * to the 0x21_xxxx_xxxx bus addresses (bus 0x20_2000_0000 -> parent 0x22_2000_0000). - */ - -/ { - aliases { - /* The loader finds the GPU through this alias */ - gpu = &sgx; - }; - - reserved-memory { - /* - * Filled and enabled by the loader from the ADT. K116s 27.2 values, for - * reference only (never hard-code: iBoot places them): - * gpu-fw-text 0x100_00ff8000 + 0xa4000 gfx-asc __TEXT 0x50000, then - * gfx1-asc __TEXT 0x54000 at - * 0x100_01048000 - * gpu-fw-data 0x100_0251c000 + 0x184000 sgx gfx-data-base .. end of - * gfx1-data-shared-ro - * uat-ttbs 0x10f_fffa8000 + 0x4000 sgx gpu-region-base/-size - * uat-pagetables 0x10f_fff28000 + 0x80000 sgx gfx-shared-region-* - * uat-l2-pagetables 0x10f_fff24000 + 0x4000 sgx gfx-shared-l2-region-* - * uat-handoff 0x10f_fff20000 + 0x4000 sgx gfx-handoff-* - * The four UAT ranges are the J714s's (aura ec204ea50b5d message); the firmware - * segments differ (J714s 27.0: fw-text 0x100_00fd4000, fw-data 0x100_024f4000). - */ - gpu_fw_text: gpu-fw-text { - reg = <0 0 0 0>; - no-map; - status = "disabled"; - }; - - gpu_fw_data: gpu-fw-data { - reg = <0 0 0 0>; - no-map; - status = "disabled"; - }; - - uat_ttbs: uat-ttbs { - reg = <0 0 0 0>; - no-map; - status = "disabled"; - }; - - uat_pagetables: uat-pagetables { - reg = <0 0 0 0>; - no-map; - status = "disabled"; - }; - - uat_l2_pagetables: uat-l2-pagetables { - reg = <0 0 0 0>; - no-map; - status = "disabled"; - }; - - uat_handoff: uat-handoff { - reg = <0 0 0 0>; - no-map; - status = "disabled"; - }; - }; -}; - -/* The inventory ASC nodes; the mailboxes below describe the same windows. */ -/delete-node/ &gfx_asc; -/delete-node/ &gfx1_asc; - -&{/soc} { - /* - * ADT gfx-asc: reg 0x21_02600000 + 0x88000 (wrapper), 0x21_02050000 + 8 (iop-vbar); - * interrupts [2798, 2797, 2800, 2799], of which the second and third are send-empty - * and recv-not-empty; role "GFX"; power-gates [614] = GFX_ASC. As J714s. - */ - gfx_mbox: mailbox@2302600000 { - compatible = "apple,t6050-j775d-ascwrap-v6"; - reg = <0x23 0x2600000 0x0 0x88000>, - <0x23 0x2050000 0x0 0x8>; - reg-names = "wrapper", "iop-vbar"; - interrupts = , - ; - interrupt-names = "send-empty", "recv-not-empty"; - apple,firmware-role = "GFX"; - power-domains = <&ps_gfx>; - #mbox-cells = <0>; - status = "disabled"; - }; - - /* - * ADT gfx1-asc: reg 0x21_02e00000 + 0x88000, 0x21_02850000 (ADT size 0x60000; the - * driver uses the first 8 bytes as on J714s); interrupts [2802, 2801, 2804, 2803]; - * role "GFX1"; power-gates [657] = GFX_ASC1. - */ - gfx1_mbox: mailbox@2302e00000 { - compatible = "apple,t6050-j775d-ascwrap-v6"; - reg = <0x23 0x2e00000 0x0 0x88000>, - <0x23 0x2850000 0x0 0x8>; - reg-names = "wrapper", "iop-vbar"; - interrupts = , - ; - interrupt-names = "send-empty", "recv-not-empty"; - apple,firmware-role = "GFX1"; - power-domains = <&ps_gfx>; - #mbox-cells = <0>; - status = "disabled"; - }; -}; - -/* - * ADT pmgr devices: GPX (id 359, reg +0x0), AFR (id 360, +0x100) and GFX (id 362, +0x110) - * in the GPU PMGR (pmgr reg[51] 0x21_00e80000). The K116s ADT marks GPX and AFR critical, - * GFX not, as the J714s file states for its board. - */ -&ps_gpx { - apple,always-on; -}; - -&ps_afr { - apple,always-on; -}; - -&sgx { - /* - * "apple,agx-g17s" is what the loader checks and the driver binds - * (drivers/gpu/drm/asahi/driver.rs). The driver uses the J714 tables for it, - * 5 mV below this unit's ADT voltages at eight of the fourteen states. - */ - compatible = "apple,agx-g17s"; - /* ADT sgx reg[0] 0x21_00000000 + 0x3fdc000; the driver maps the first 16 MiB as "sgx" */ - reg = <0x23 0x0 0x0 0x3fdc000>; - reg-names = "sgx"; - /delete-property/ interrupts; - mboxes = <&gfx_mbox>, <&gfx1_mbox>; - memory-region = <&uat_ttbs>, <&uat_pagetables>, <&uat_handoff>, - <&gpu_fw_data>, <&uat_l2_pagetables>, <&gpu_fw_text>; - memory-region-names = "ttbs", "pagetables", "handoff", "fw-data", - "l2-pagetables", "fw-text"; - /* - * As t6050-j714s.dts: the GPU on the PMP's GFX report entry (report@f, on ps_gfx), - * so the PMP is told the GPU is on only while it is powered. The K116s already - * runs the PMP with its report (t6050-k116s.dts &pmp0_report). - */ - power-domains = <&pmp0_gfx>; -}; diff --git a/arch/arm64/boot/dts/apple/t6050-k116s.dts b/arch/arm64/boot/dts/apple/t6050-k116s.dts index c6b1adc3ede00..26f4bce4362db 100644 --- a/arch/arm64/boot/dts/apple/t6050-k116s.dts +++ b/arch/arm64/boot/dts/apple/t6050-k116s.dts @@ -608,7 +608,16 @@ dma-names = "cout", "cin", "spkr", "sense", "hpai"; }; /* The GPU, handed over by the boot loader */ -#include "t6050-k116s-gpu.dtsi" +#include "t6050-k114-k116-gpu.dtsi" + +/* + * As t6050-j714s.dts: the GPU on the PMP's GFX report entry (report@f, on ps_gfx), so the PMP + * is told the GPU is on only while it is powered. This board runs the PMP with its report + * (&pmp0_report above). + */ +&sgx { + power-domains = <&pmp0_gfx>; +}; /* * The camera: the T6050 ISP as J716c and J714s describe it. From the K116sAP ADT (27.2): From 76a6f4c47ef539838c02f4e1ebb7fb18903f04e9 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Fri, 27 Nov 2026 13:41:14 +1100 Subject: [PATCH 4/9] arm64: dts: apple: t6050: share the 14-inch K boards' jack, card and AOP, add them to K114s The K114s has no internal audio card and no AOP: its DT leaves the jack codec, the sound card, the AOP and the microphone's ADMAC disabled. The K114c describes all of them in its own file, with its speakers. The live K114s ADT (27.2) describes the K114c's audio hardware node for node: - i2c2 audio-codec-output at 0x4b, audio-control,cs42l84, reset GPIO 0x8b (pin 139), interrupts [134, 1]; - i2c1/i2c3 audio-speaker* at 0x38-0x3d, six audio-control,sn012776, function-speaker-id0/1 GPIO 0x88/0x89 (pins 136/137), the shutdown line GPIO 0x6b (pin 107) and fault interrupt 106; - aop (reg 0x90600000, 0x90c00000), aop-exclave-mailbox 0x2d067c000 interrupts [585, 582], dart-aop 0x90fc0000 interrupt 616, admac-base-ns 0x93800000 interrupt 637 with 13 + 13 channels, admac-hp-mic-ec-proxy 0x2d3200000 dma-channel 0 and audio-hp-mic. The K114c and K114s static ADTs differ in none of these beyond phandles. So move the K114c's pin list, jack codec, sound card with its jack link, AOP and microphone ADMAC into t6050-k114.dtsi, the 14-inch chassis, and include it from both boards. The shared card is "apple,k114-macaudio", the K114 entry, which runs the jack only. The speakers stay with the K114c: its six SN012776 amps, their shutdown regulator and the "Speaker" link remain in t6050-k114c.dts, which also keeps its "apple,j714-macaudio" card. On the K114s the amps are not described and i2c1 and i2c3 stay disabled: speakerguardd refuses this board (its protection is not qualified), so its speakers stay off. The K114c DTB and the other T6050 DTBs are byte-identical before and after. Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t6050-k114.dtsi | 107 +++++++++++++++ arch/arm64/boot/dts/apple/t6050-k114c.dts | 150 +++++----------------- arch/arm64/boot/dts/apple/t6050-k114s.dts | 3 + 3 files changed, 145 insertions(+), 115 deletions(-) create mode 100644 arch/arm64/boot/dts/apple/t6050-k114.dtsi diff --git a/arch/arm64/boot/dts/apple/t6050-k114.dtsi b/arch/arm64/boot/dts/apple/t6050-k114.dtsi new file mode 100644 index 0000000000000..77dbf809bc7d0 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6050-k114.dtsi @@ -0,0 +1,107 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * The 14-inch K boards' chassis (K114c, M5 Max, and K114s, M5 Pro): what their ADTs describe + * alike beyond what t6050-k114-k116.dtsi shares with the 16-inch boards. The live K114s ADT + * (27.2) and the K114c's have the same nodes and values here, phandles aside. + * + * The speaker amps are left to the board: they need a qualified speaker protection, which + * the K114s does not have. + * + * Included after t6050-peripherals.dtsi. + */ + +/* + * Pin 112's register takes an SError when read, so only the pins a node names are + * exposed: 80 (PCIe port 0's PERST#); 106 and 107, the speaker amps' interrupt and + * shutdown line (ADT audio-speaker, used only where a board describes the amps); + * 134 and 139, the jack codec's interrupt and reset; 136 and 137, the speaker ID. + */ +&pinctrl_ap { + gpio-reserved-ranges = <0 80>, <81 25>, <108 26>, <135 1>, <138 1>, <140 81>; +}; + +/* + * The CS42L84 headphone codec (ADT /arm-io/i2c2/audio-codec-output): its reset line + * is AP pin 139, driven high to run the codec, and its interrupt AP pin 134, level + * low. + */ +&i2c2 { + status = "okay"; + + jack_codec: codec@4b { + compatible = "cirrus,cs42l84"; + reg = <0x4b>; + reset-gpios = <&pinctrl_ap 139 GPIO_ACTIVE_HIGH>; + interrupts-extended = <&pinctrl_ap 134 IRQ_TYPE_LEVEL_LOW>; + #sound-dai-cells = <0>; + sound-name-prefix = "Jack"; + }; +}; + +/ { + sound { + /* + * The headphone jack only. The speaker amps and the "Speaker" link are not + * described here: no speaker protection is qualified for this chassis + * (speakerguardd refuses it), and the K114 entry has the speakers off. + */ + compatible = "apple,k114-macaudio", "apple,macaudio"; + model = "MacBook Pro K114"; + /* ADT audio-speaker function-speaker-id0 and -id1 */ + speaker-id-gpios = <&pinctrl_ap 136 GPIO_ACTIVE_HIGH>, + <&pinctrl_ap 137 GPIO_ACTIVE_HIGH>; + #address-cells = <1>; + #size-cells = <0>; + + dai-link@0 { + reg = <0>; + link-name = "Headphone Jack"; + + cpu { + sound-dai = <&aop_audio 0>; + }; + + codec { + sound-dai = <&jack_codec>; + }; + }; + }; +}; + +/* The AOP, booted through its setup port, with its sensor and audio services. */ +&aop_mbox { + status = "okay"; +}; + +&aop_setup_mbox { + status = "okay"; +}; + +&aop_dart { + status = "okay"; +}; + +&aop { + status = "okay"; +}; + +/* + * The microphone array: ADT audio-hp-mic, three microphones on leap-s RX0 through the + * proxy ADMAC (Linux channel 1, as on J813), captured by the AOP audio service's own card. + */ +&admac_base_ns { + status = "okay"; +}; + +&admac_ec_proxy { + status = "okay"; +}; + +&aop_audio { + apple,chassis-name = "K114"; + apple,machine-kind = "MacBook Pro"; + dmas = <&admac_base_ns 4>, <&admac_base_ns 5>, + <&admac_base_ns 0>, <&admac_base_ns 1>, + <&admac_ec_proxy 1>; + dma-names = "cout", "cin", "spkr", "sense", "hpai"; +}; diff --git a/arch/arm64/boot/dts/apple/t6050-k114c.dts b/arch/arm64/boot/dts/apple/t6050-k114c.dts index 086c2dd3244b7..132b29f08749d 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114c.dts +++ b/arch/arm64/boot/dts/apple/t6050-k114c.dts @@ -61,22 +61,9 @@ }; /* - * Pin 112's register takes an SError when read, so only the pins a node here - * names are exposed: 80 (PCIe port 0's PERST#); 106 and 107, the speaker amps' - * interrupt and shutdown line; 134 and 139, the jack codec's interrupt and - * reset; 136 and 137, the speaker ID. - */ -&pinctrl_ap { - gpio-reserved-ranges = <0 80>, <81 25>, <108 26>, <135 1>, <138 1>, <140 81>; -}; - -/* The GPU, handed over by the boot loader */ -#include "t6050-k114-k116-gpu.dtsi" - -/* - * Sound through the AOP, as on J813: its audio service runs the serializers, the - * CS42L84 headphone jack on admac-base-ns TX2/RX2 and the six SN012776 speaker amps - * on TX0, their voltage and current sense on RX0 (ADT iop-audio-controller). + * The speakers, through the AOP as on J813: the six SN012776 speaker amps on admac-base-ns + * TX0, their voltage and current sense on RX0 (ADT iop-audio-controller). The jack, the + * card and the AOP are the chassis' (t6050-k114.dtsi). * * The amps (ADT /arm-io/i2c1/audio-speaker* and /arm-io/i2c3/audio-speaker*) share * one shutdown line, AP pin 107 (function-reset of the first), and one fault @@ -189,113 +176,46 @@ }; }; -/* - * The CS42L84 headphone codec (ADT /arm-io/i2c2/audio-codec-output): its reset line - * is AP pin 139, driven high to run the codec, and its interrupt AP pin 134, level - * low. - */ -&i2c2 { - status = "okay"; +/* The 14-inch chassis: pins, the jack, the card and the AOP */ +#include "t6050-k114.dtsi" - jack_codec: codec@4b { - compatible = "cirrus,cs42l84"; - reg = <0x4b>; - reset-gpios = <&pinctrl_ap 139 GPIO_ACTIVE_HIGH>; - interrupts-extended = <&pinctrl_ap 134 IRQ_TYPE_LEVEL_LOW>; - #sound-dai-cells = <0>; - sound-name-prefix = "Jack"; - }; -}; - -/ { - sound { - compatible = "apple,j714-macaudio", "apple,macaudio"; - model = "MacBook Pro K114"; - /* ADT audio-speaker function-speaker-id0 and -id1 */ - speaker-id-gpios = <&pinctrl_ap 136 GPIO_ACTIVE_HIGH>, - <&pinctrl_ap 137 GPIO_ACTIVE_HIGH>; - #address-cells = <1>; - #size-cells = <0>; - - dai-link@0 { - reg = <0>; - link-name = "Headphone Jack"; - - cpu { - sound-dai = <&aop_audio 0>; - }; +/* The GPU, handed over by the boot loader */ +#include "t6050-k114-k116-gpu.dtsi" - codec { - sound-dai = <&jack_codec>; - }; +/* + * The K114c keeps J714's card with its speakers, at the J714's safe level. The + * chassis' K114 entry (t6050-k114.dtsi) has the jack only. + */ +&{/sound} { + compatible = "apple,j714-macaudio", "apple,macaudio"; + + dai-link@1 { + reg = <1>; + link-name = "Speaker"; + /* + * Codecs in ADT speaker-config order, so that macaudio gives them + * playback slots 0-5 as macOS does (left channels in slots 0, 2 + * and 4, right in 1, 3 and 5). The idle masks are the ADT + * amp-tx-zd-config rows 0 and 1: left woofer 1 drives zeros in the + * right amps' sense slots, right woofer 1 in the left amps'. + */ + dai-tdm-idle-mode-0 = "zero"; + dai-tdm-slot-tx-idle-mask-0 = <0xfff0f0f0>; + dai-tdm-idle-mode-1 = "zero"; + dai-tdm-slot-tx-idle-mask-1 = <0xff0f0f0f>; + + cpu { + sound-dai = <&aop_audio 3>; }; - dai-link@1 { - reg = <1>; - link-name = "Speaker"; - /* - * Codecs in ADT speaker-config order, so that macaudio gives them - * playback slots 0-5 as macOS does (left channels in slots 0, 2 - * and 4, right in 1, 3 and 5). The idle masks are the ADT - * amp-tx-zd-config rows 0 and 1: left woofer 1 drives zeros in the - * right amps' sense slots, right woofer 1 in the left amps'. - */ - dai-tdm-idle-mode-0 = "zero"; - dai-tdm-slot-tx-idle-mask-0 = <0xfff0f0f0>; - dai-tdm-idle-mode-1 = "zero"; - dai-tdm-slot-tx-idle-mask-1 = <0xff0f0f0f>; - - cpu { - sound-dai = <&aop_audio 3>; - }; - - codec { - sound-dai = <&speaker_left_woof1>, <&speaker_right_woof1>, - <&speaker_left_woof2>, <&speaker_right_woof2>, - <&speaker_left_tweet>, <&speaker_right_tweet>; - }; + codec { + sound-dai = <&speaker_left_woof1>, <&speaker_right_woof1>, + <&speaker_left_woof2>, <&speaker_right_woof2>, + <&speaker_left_tweet>, <&speaker_right_tweet>; }; }; }; -/* The AOP, booted through its setup port, with its sensor and audio services. */ -&aop_mbox { - status = "okay"; -}; - -&aop_setup_mbox { - status = "okay"; -}; - -&aop_dart { - status = "okay"; -}; - -&aop { - status = "okay"; -}; - -/* - * The microphone array: ADT audio-hp-mic, three microphones on leap-s RX0 through the - * proxy ADMAC (Linux channel 1, as on J813), captured by the AOP audio service's own card. - */ -&admac_base_ns { - status = "okay"; -}; - -&admac_ec_proxy { - status = "okay"; -}; - -&aop_audio { - apple,chassis-name = "K114"; - apple,machine-kind = "MacBook Pro"; - dmas = <&admac_base_ns 4>, <&admac_base_ns 5>, - <&admac_base_ns 0>, <&admac_base_ns 1>, - <&admac_ec_proxy 1>; - dma-names = "cout", "cin", "spkr", "sense", "hpai"; -}; - /* * The USB-C ports ATC1 and ATC2, as on the other K boards (t6050-k114-k116-usb.dtsi). This * board also gives nub-spmi-a0 its generation 4 fault queue (reg[1], which macOS empties when diff --git a/arch/arm64/boot/dts/apple/t6050-k114s.dts b/arch/arm64/boot/dts/apple/t6050-k114s.dts index c92c961141aaa..b0e7cd937d5b8 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114s.dts +++ b/arch/arm64/boot/dts/apple/t6050-k114s.dts @@ -27,6 +27,9 @@ #define T6050_K114S #include "t6050-peripherals.dtsi" +/* The 14-inch chassis: pins, the jack, the card and the AOP; no speakers */ +#include "t6050-k114.dtsi" + /* The GPU, handed over by the boot loader */ #include "t6050-k114-k116-gpu.dtsi" From ec261e91ad6102b0bcb656f5a158a507ccfc86f9 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Fri, 27 Nov 2026 13:52:54 +1100 Subject: [PATCH 5/9] arm64: dts: apple: t6050: share the 14-inch K boards' Neural Engine, add it to K114s The K114s has no Neural Engine: ane0, its three DARTs and ANE_SYS stay disabled. The K114c enables them with t6050-j714s-ane.dtsi and the fabric domains ANE_SYS depends on, in its own file. The live K114s ADT has the K114c's and J714s's engine: ane0 "ane,t8132exclave" at 0x3_08000000 + 0x2000000 with the ANE PMGR window 0x80900000 + 0x18000, interrupts [954, 967], pre-loaded = 1 (iBoot loads the personalized firmware), and dart-ane0 at 0x3_09800000, 0x3_09820000 and 0x3_09840000 (0xc000 each) with its DAPF at 0x3_09810000, interrupt 955. These are the inventory nodes of t6050-peripherals.dtsi. So move the K114c's ANE include and its fab0_piogw, fab8_soc and fab9_soc enables into t6050-k114.dtsi. As on the K114c, the engine stays off until the boot loader has filled its two firmware reservations from the ADT. The K114c DTB and the other T6050 DTBs are byte-identical before and after. Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t6050-k114.dtsi | 30 +++++++++++++++++++++++ arch/arm64/boot/dts/apple/t6050-k114c.dts | 29 +--------------------- arch/arm64/boot/dts/apple/t6050-k114s.dts | 2 +- 3 files changed, 32 insertions(+), 29 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t6050-k114.dtsi b/arch/arm64/boot/dts/apple/t6050-k114.dtsi index 77dbf809bc7d0..a895eebe32f03 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114.dtsi +++ b/arch/arm64/boot/dts/apple/t6050-k114.dtsi @@ -10,6 +10,36 @@ * Included after t6050-peripherals.dtsi. */ +/* + * The Neural Engine (ADT ane0, "ane,t8132exclave", firmware pre-loaded by iBoot), started only + * after the boot loader's preload hand-off + */ +#include "t6050-j714s-ane.dtsi" + +/* + * ANE_SYS's declared suppliers are the fabric domains: enabled the way + * the J714s enables them (t6050-j714s.dts for fab8/fab0, + * t6050-j716c-isp.dtsi for fab9). Left disabled they never register a + * provider and the enabled ps_ane_sys defers forever, taking ane0 and its + * three DARTs with it. + */ +&ps_fab0_piogw { + apple,firmware-owned; + status = "okay"; +}; + +&ps_fab8_soc { + apple,firmware-owned; + status = "okay"; +}; + +&ps_fab9_soc { + /delete-property/ power-domains; + apple,no-auto-pm; + apple,firmware-owned; + status = "okay"; +}; + /* * Pin 112's register takes an SError when read, so only the pins a node names are * exposed: 80 (PCIe port 0's PERST#); 106 and 107, the speaker amps' interrupt and diff --git a/arch/arm64/boot/dts/apple/t6050-k114c.dts b/arch/arm64/boot/dts/apple/t6050-k114c.dts index 132b29f08749d..238e87f4f6f8e 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114c.dts +++ b/arch/arm64/boot/dts/apple/t6050-k114c.dts @@ -27,33 +27,6 @@ #include "t6050-peripherals.dtsi" -/* The Neural Engine, started only after the boot loader's preload hand-off */ -#include "t6050-j714s-ane.dtsi" - -/* - * ANE_SYS's declared suppliers are the fabric domains: enabled here the way - * the J714s enables them (t6050-j714s.dts for fab8/fab0, - * t6050-j716c-isp.dtsi for fab9). Left disabled they never register a - * provider and the enabled ps_ane_sys defers forever, taking ane0 and its - * three DARTs with it. - */ -&ps_fab0_piogw { - apple,firmware-owned; - status = "okay"; -}; - -&ps_fab8_soc { - apple,firmware-owned; - status = "okay"; -}; - -&ps_fab9_soc { - /delete-property/ power-domains; - apple,no-auto-pm; - apple,firmware-owned; - status = "okay"; -}; - / { aliases { nvram = &nvram; @@ -176,7 +149,7 @@ }; }; -/* The 14-inch chassis: pins, the jack, the card and the AOP */ +/* The 14-inch chassis: the Neural Engine, pins, the jack, the card and the AOP */ #include "t6050-k114.dtsi" /* The GPU, handed over by the boot loader */ diff --git a/arch/arm64/boot/dts/apple/t6050-k114s.dts b/arch/arm64/boot/dts/apple/t6050-k114s.dts index b0e7cd937d5b8..9c1057d71cb7a 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114s.dts +++ b/arch/arm64/boot/dts/apple/t6050-k114s.dts @@ -27,7 +27,7 @@ #define T6050_K114S #include "t6050-peripherals.dtsi" -/* The 14-inch chassis: pins, the jack, the card and the AOP; no speakers */ +/* The 14-inch chassis: the Neural Engine, pins, the jack, the card and the AOP; no speakers */ #include "t6050-k114.dtsi" /* The GPU, handed over by the boot loader */ From a381dc4017e9993564dfeeeed440ac7cbb9c8ed8 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Fri, 27 Nov 2026 13:47:07 +1100 Subject: [PATCH 6/9] arm64: dts: apple: t6050: share the 14-inch K boards' MagSafe PD and USB4 router, add them to K114s The K114s describes neither its MagSafe 3 port's PD controller nor the right port's USB4/Thunderbolt router: the K114c has both in its own file, and t6050-max.dtsi and t6050-peripherals.dtsi describe the ATC2 router and its PCIe tunnel only for the boards they list. The live K114s ADT has the K114c's hardware here: - nub-spmi-a0: reg 0x8a188000, 0x8a184000 (the generation 4 fault queue) and 0x8a180000; hpm5 "usbc,sn201202x,spmi" at USID 8, port-type 17 (MagSafe), features-supported 3 (power in only); - acio2 "acio,v2" at 0x1_81f00000 (NHI), 0x1_81ac0000.. (rc and router blocks), interrupts 1655-1666, 1643-1654, 1672, gpio-lstx on AOP pin 0x51; dart-acio2 0x1_81a80000 interrupt 1670; acio-cpu2 0x1_81108000 and 0x1_81100000; - apciec2 "apciec,t6050" at 0x1c_70000000 with its root port blocks at 0x1_84020000.., interrupt 1469; dart-apciec2 0x1_84000000 interrupt 1470; - acio2 thunderbolt-drom identical to the K114c's (no UID). So move the K114c's nub-spmi-a0 fault queue window, hpm5, ATC2 router, DROM and router power states into t6050-k114-usb.dtsi, included after t6050-k114-k116-usb.dtsi by both boards. The K114s now defines T6050_K114S before its includes, as the K114c does, and the two board lists that guard the ATC2 router and its tunnel DART name it. The K114c DTB and the other T6050 DTBs are byte-identical before and after. The new K114s schema message (apple,t6050-pciec "port0") is the one the K114c and J714s already have for the same node. Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t6050-k114-usb.dtsi | 85 +++++++++++++++++++ arch/arm64/boot/dts/apple/t6050-k114c.dts | 76 +---------------- arch/arm64/boot/dts/apple/t6050-k114s.dts | 10 ++- arch/arm64/boot/dts/apple/t6050-max.dtsi | 3 +- .../boot/dts/apple/t6050-peripherals.dtsi | 3 +- 5 files changed, 101 insertions(+), 76 deletions(-) create mode 100644 arch/arm64/boot/dts/apple/t6050-k114-usb.dtsi diff --git a/arch/arm64/boot/dts/apple/t6050-k114-usb.dtsi b/arch/arm64/boot/dts/apple/t6050-k114-usb.dtsi new file mode 100644 index 0000000000000..24184a4e505ce --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6050-k114-usb.dtsi @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * The 14-inch K boards' ports beyond t6050-k114-k116-usb.dtsi: the MagSafe 3 PD controller + * on nub-spmi-a0 and ATC2's USB4/Thunderbolt router with its PCIe tunnel. The live K114s ADT + * (27.2) and the K114c's have the same nodes and values here, phandles aside. + * + * Included after t6050-k114-k116-usb.dtsi. t6050-max.dtsi describes the ATC2 router for the + * boards that define T6050_K114C or T6050_K114S before including it. + */ + +/* + * nub-spmi-a0's generation 4 fault queue: ADT reg[1] 0x8a184000 + 0x4000, which macOS empties + * when the controller starts. + */ +&nub_spmi_a0 { + reg = <0x2 0x8a188000 0x0 0x4000>, + <0x2 0x8a184000 0x0 0x4000>; + + /* + * The MagSafe 3 port's PD controller (ADT hpm5, port-type 0x11). It has no USB data + * path, so it gets no connector node; tipd registers a Type-C port and a power supply + * for it. Its ADT features-supported is <3>, "Power In" only: no liquid detection. + */ + hpm5: usb-pd@8 { + compatible = "apple,sn201202x"; + reg = <0x8 SPMI_USID>; + apple,no-liquid-detection; + }; +}; + +/* + * The right port's USB4/Thunderbolt router (acio2) and PCIe tunnel; the DisplayPort route + * is not described. + */ +#include "t6050-max-atc2-router.dtsi" + +/* + * The host DROM from the ADT (/arm-io/acio2 thunderbolt-drom, the same on the K114c and the + * K114s); the boot loader replaces it + */ +&acio2_nhi { + apple,thunderbolt-drom = [fd 02 00 00 00 00 00 00 00 90 19 c3 8c 00 5c 00 + 00 00 00 00 00 00 08 81 82 02 82 00 00 00 08 82 + 92 01 82 00 00 00 03 83 20 08 84 00 00 00 00 00 + 00 08 85 00 00 00 00 00 00 05 86 09 01 00 08 87 + 00 00 00 00 00 00 05 88 09 01 00 05 89 09 01 00 + 05 8a 09 01 00 0e 01 41 70 70 6c 65 2c 20 49 6e + 63 2e 00 06 02 69 4f 53 00 00 00 00]; +}; + +/* The right router's suppliers, disabled in the inventory (as t6050-j714s-display.dtsi enables them) */ +&ps_atc2_cio { + status = "okay"; +}; + +&ps_atc2_cio_pcie { + status = "okay"; +}; + +&ps_atc2_cio_usb { + status = "okay"; +}; + +&ps_atc2_cio_auss { + status = "okay"; +}; + +&ps_atc2_pcie { + status = "okay"; +}; + +/* + * The router and its mailbox are on, with all five domains and the PCIe tunnel, whether or not + * t6050-max.dtsi leaves acio2 disabled and without the fifth domain for boards outside its list. + */ +&acio2_mbox { + status = "okay"; +}; + +&acio2 { + status = "okay"; + power-domains = <&ps_atc2_cio>, <&ps_atc2_cio_pcie>, + <&ps_atc2_cio_usb>, <&ps_atc2_cio_auss>, <&ps_atc2_pcie>; + apple,pcie-tunnel = <&acio2_pcie_tunnel>; +}; diff --git a/arch/arm64/boot/dts/apple/t6050-k114c.dts b/arch/arm64/boot/dts/apple/t6050-k114c.dts index 238e87f4f6f8e..495334da4a875 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114c.dts +++ b/arch/arm64/boot/dts/apple/t6050-k114c.dts @@ -190,80 +190,12 @@ }; /* - * The USB-C ports ATC1 and ATC2, as on the other K boards (t6050-k114-k116-usb.dtsi). This - * board also gives nub-spmi-a0 its generation 4 fault queue (reg[1], which macOS empties when - * the controller starts) and describes the MagSafe 3 port's PD controller. + * The USB-C ports ATC1 and ATC2, as on the other K boards (t6050-k114-k116-usb.dtsi), then the + * 14-inch chassis' MagSafe 3 PD controller and the right port's USB4/Thunderbolt router + * (t6050-k114-usb.dtsi). */ #include "t6050-k114-k116-usb.dtsi" - -&nub_spmi_a0 { - reg = <0x2 0x8a188000 0x0 0x4000>, - <0x2 0x8a184000 0x0 0x4000>; - - /* - * The MagSafe 3 port's PD controller (ADT hpm5, port-type 0x11). It has no USB data - * path, so it gets no connector node; tipd registers a Type-C port and a power supply - * for it. Its ADT features-supported is <3>, "Power In" only: no liquid detection. - */ - hpm5: usb-pd@8 { - compatible = "apple,sn201202x"; - reg = <0x8 SPMI_USID>; - apple,no-liquid-detection; - }; -}; - -/* - * The right port's USB4/Thunderbolt router (acio2) and PCIe tunnel; the DisplayPort route - * is not described. - */ -#include "t6050-max-atc2-router.dtsi" - -/* The host DROM from the K114cAP ADT (/arm-io/acio2 thunderbolt-drom); the boot loader replaces it */ -&acio2_nhi { - apple,thunderbolt-drom = [fd 02 00 00 00 00 00 00 00 90 19 c3 8c 00 5c 00 - 00 00 00 00 00 00 08 81 82 02 82 00 00 00 08 82 - 92 01 82 00 00 00 03 83 20 08 84 00 00 00 00 00 - 00 08 85 00 00 00 00 00 00 05 86 09 01 00 08 87 - 00 00 00 00 00 00 05 88 09 01 00 05 89 09 01 00 - 05 8a 09 01 00 0e 01 41 70 70 6c 65 2c 20 49 6e - 63 2e 00 06 02 69 4f 53 00 00 00 00]; -}; - -/* The right router's suppliers, disabled in the inventory (as t6050-j714s-display.dtsi enables them) */ -&ps_atc2_cio { - status = "okay"; -}; - -&ps_atc2_cio_pcie { - status = "okay"; -}; - -&ps_atc2_cio_usb { - status = "okay"; -}; - -&ps_atc2_cio_auss { - status = "okay"; -}; - -&ps_atc2_pcie { - status = "okay"; -}; - -/* - * The router and its mailbox are on, with all five domains and the PCIe tunnel, whether or not - * t6050-max.dtsi leaves acio2 disabled and without the fifth domain for boards outside its list. - */ -&acio2_mbox { - status = "okay"; -}; - -&acio2 { - status = "okay"; - power-domains = <&ps_atc2_cio>, <&ps_atc2_cio_pcie>, - <&ps_atc2_cio_usb>, <&ps_atc2_cio_auss>, <&ps_atc2_pcie>; - apple,pcie-tunnel = <&acio2_pcie_tunnel>; -}; +#include "t6050-k114-usb.dtsi" /* * The boot NOR. spi-nor reads the part's JEDEC ID itself. The partition is diff --git a/arch/arm64/boot/dts/apple/t6050-k114s.dts b/arch/arm64/boot/dts/apple/t6050-k114s.dts index 9c1057d71cb7a..417f6007e0119 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114s.dts +++ b/arch/arm64/boot/dts/apple/t6050-k114s.dts @@ -10,6 +10,8 @@ * Copyright The Asahi Linux Contributors */ +/* Defined before the includes: t6050-max.dtsi guards the ATC2 router on it. */ +#define T6050_K114S /* The N1's firmware and this board's ADT board-id, for t6050-k114-k116.dtsi */ #define T6050_K_N1_FIRMWARE "apple/centauri/k114s-ftab.bin" #define T6050_K_BOARD_ID 0x14 @@ -24,7 +26,6 @@ firmware-name = "apple/tpmtfw-k114s.bin"; }; -#define T6050_K114S #include "t6050-peripherals.dtsi" /* The 14-inch chassis: the Neural Engine, pins, the jack, the card and the AOP; no speakers */ @@ -70,5 +71,10 @@ }; }; -/* The USB-C ports ATC1 and ATC2, as on the other K boards */ +/* + * The USB-C ports ATC1 and ATC2, as on the other K boards (t6050-k114-k116-usb.dtsi), then the + * 14-inch chassis' MagSafe 3 PD controller and the right port's USB4/Thunderbolt router + * (t6050-k114-usb.dtsi). + */ #include "t6050-k114-k116-usb.dtsi" +#include "t6050-k114-usb.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6050-max.dtsi b/arch/arm64/boot/dts/apple/t6050-max.dtsi index 922b83b01d057..84c3ddbb61363 100644 --- a/arch/arm64/boot/dts/apple/t6050-max.dtsi +++ b/arch/arm64/boot/dts/apple/t6050-max.dtsi @@ -219,7 +219,8 @@ #endif }; -#if defined(T6050_J714C) || defined(T6050_J714S) || defined(T6050_J716C) || defined(T6050_K114C) +#if defined(T6050_J714C) || defined(T6050_J714S) || defined(T6050_J716C) || defined(T6050_K114C) || \ + defined(T6050_K114S) /* * ATC2's USB4/Thunderbolt router (ADT /arm-io/acio2, acio-cpu2 and dart-acio2), powered per * connection: the PHY enters CIO mode, then the router's domains come on (ATC2_CIO, _PCIE, _USB, diff --git a/arch/arm64/boot/dts/apple/t6050-peripherals.dtsi b/arch/arm64/boot/dts/apple/t6050-peripherals.dtsi index c7a6178d27371..cf9ba10059161 100644 --- a/arch/arm64/boot/dts/apple/t6050-peripherals.dtsi +++ b/arch/arm64/boot/dts/apple/t6050-peripherals.dtsi @@ -1617,7 +1617,8 @@ status = "disabled"; }; -#if !defined(T6050_J714C) && !defined(T6050_J714S) && !defined(T6050_J716C) && !defined(T6050_K114C) +#if !defined(T6050_J714C) && !defined(T6050_J714S) && !defined(T6050_J716C) && !defined(T6050_K114C) && \ + !defined(T6050_K114S) apciec2_dart: iommu@384000000 { compatible = "apple,t6050-dart", "apple,t8110-dart"; reg = <0x3 0x84000000 0x0 0x20000>; From 1c71360f65af7a6b576e069463dc99bc685b9da9 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Fri, 27 Nov 2026 14:21:29 +1100 Subject: [PATCH 7/9] arm64: dts: apple: t6050: give the K boards' port 0 DART its power domain With the K boards' PCIe port 0 described, pcie0's iommu-map makes the N1 use dart_apcie0, which names no power domain on any T6050 board, so the DART power-domain check flags it as a new user on K114s and K116c. The ADT's apcie0 power-gates start with APCIE_GP (137) and APCIE_SYS_GP (143); APCIE_SYS_GP sits on APCIE_GP and FAB6_SOC, as ps_apcie_sys_gp already says. dart_apcie0 now takes APCIE_SYS_GP, as the T600x/T602x PCIe DARTs take theirs. The boot loader trains port 0 and keeps it powered for the hand-off, so ps_apcie_sys_gp, ps_apcie_gp and ps_fab6_soc are enabled as firmware-owned. They are enabled in t6050-k114-k116-usb.dtsi because the boards include it after t6050-peripherals.dtsi, which defines them. The host node takes no power-domains: its binding allows none. Only the four K board DTBs change. Signed-off-by: Ryan Murray --- .../boot/dts/apple/t6050-k114-k116-usb.dtsi | 16 ++++++++++++++++ arch/arm64/boot/dts/apple/t6050-k114-k116.dtsi | 12 ++++++++++++ 2 files changed, 28 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t6050-k114-k116-usb.dtsi b/arch/arm64/boot/dts/apple/t6050-k114-k116-usb.dtsi index c82d8c24e3ede..87b16d9a0429a 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114-k116-usb.dtsi +++ b/arch/arm64/boot/dts/apple/t6050-k114-k116-usb.dtsi @@ -180,3 +180,19 @@ }; }; }; + +/* PCIe port 0's power states, used by pcie0 and dart_apcie0 (see t6050-k114-k116.dtsi) */ +&ps_fab6_soc { + apple,firmware-owned; + status = "okay"; +}; + +&ps_apcie_gp { + apple,firmware-owned; + status = "okay"; +}; + +&ps_apcie_sys_gp { + apple,firmware-owned; + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/apple/t6050-k114-k116.dtsi b/arch/arm64/boot/dts/apple/t6050-k114-k116.dtsi index a37a1aa19ce0b..d26d2621b38a0 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114-k116.dtsi +++ b/arch/arm64/boot/dts/apple/t6050-k114-k116.dtsi @@ -306,3 +306,15 @@ &smc_pcio { apple,output-commands = /bits/ 64 <0x001a000000000000 0x000f000000800000 0x011c000000010000>; }; + +/* + * Port 0's power: the ADT's apcie0 power-gates are APCIE_GP (137), APCIE_SYS_GP (143) and the + * fabric; APCIE_SYS_GP sits on APCIE_GP and FAB6_SOC. Its DART (dart-apcie0, which the N1 uses + * through the host's iommu-map) takes APCIE_SYS_GP, as the T600x/T602x PCIe DARTs do. The loader + * trains port 0 and keeps it powered for the hand-off, so these stay firmware-owned + * (enabled in t6050-k114-k116-usb.dtsi, which boards include after t6050-peripherals.dtsi). + */ +&dart_apcie0 { + power-domains = <&ps_apcie_sys_gp>; +}; + From 0a57fc2e701998e0d8808d4a2e991f9e591cc017 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Fri, 27 Nov 2026 15:13:56 +1100 Subject: [PATCH 8/9] arm64: dts: apple: t6050: drop the ATC2 router's unused interrupt name The right-port USB4 PCIe tunnel (apciec2, apple,t6050-pciec) names its one interrupt "port0". The binding allows no interrupt-names for this controller, so every board that enables the node gets a schema warning; with the K114s now enabling it, CHECK_DTBS reports it as new there. pcie-apple looks interrupts up by name only for hosts that adopt a trained link (hw->adopt_link). t6050_pciec_hw does not, so it maps the port interrupt by index and never reads the name. Dropping the property changes nothing at run time. The J714c, J714s, J716c, K114c and K114s DTBs lose that one property; no other T6050 DTB changes. Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t6050-max.dtsi | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64/boot/dts/apple/t6050-max.dtsi b/arch/arm64/boot/dts/apple/t6050-max.dtsi index 84c3ddbb61363..13d8950b5eca0 100644 --- a/arch/arm64/boot/dts/apple/t6050-max.dtsi +++ b/arch/arm64/boot/dts/apple/t6050-max.dtsi @@ -457,7 +457,6 @@ reg-names = "config", "rc", "port0", "fabric", "debug", "ltssm", "intr2axi"; /* The port's: link events and INTx */ interrupts = ; - interrupt-names = "port0"; power-domains = <&ps_atc2_pcie>; /* No boot loader hands the port over: the kernel cold-initializes it. */ apple,pciec-kernel-init; From 354734e7da56dd1427dd9b39c9d2ddfd243eebee Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Fri, 27 Nov 2026 15:47:03 +1100 Subject: [PATCH 9/9] arm64: dts: apple: t6050: select ATC2's USB4 router by a hardware macro ATC2's USB4/Thunderbolt router (ADT /arm-io/acio2 with its CPU and DART) was selected by two hand-kept board lists: a positive one in t6050-max.dtsi for the router and a negative one in t6050-peripherals.dtsi for the plain apciec2 DART. Adding a board meant editing both. Boards whose ADT has acio2 (J714c, J714s, J716c, K114c, K114s) now define T6050_ATC2_USB4_ROUTER before their includes, and both places test that. All T6050 DTBs are byte-identical before and after. Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t6050-j714c.dts | 2 ++ arch/arm64/boot/dts/apple/t6050-j714s.dts | 2 ++ arch/arm64/boot/dts/apple/t6050-j716c.dts | 2 ++ arch/arm64/boot/dts/apple/t6050-k114c.dts | 2 ++ arch/arm64/boot/dts/apple/t6050-k114s.dts | 4 +++- arch/arm64/boot/dts/apple/t6050-max.dtsi | 4 ++-- arch/arm64/boot/dts/apple/t6050-peripherals.dtsi | 4 ++-- 7 files changed, 15 insertions(+), 5 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t6050-j714c.dts b/arch/arm64/boot/dts/apple/t6050-j714c.dts index 2909e86fc426e..ff202d0d0ec0c 100644 --- a/arch/arm64/boot/dts/apple/t6050-j714c.dts +++ b/arch/arm64/boot/dts/apple/t6050-j714c.dts @@ -15,6 +15,8 @@ /dts-v1/; #define T6050_J714C +/* ADT /arm-io/acio2: the right port's USB4/Thunderbolt router */ +#define T6050_ATC2_USB4_ROUTER #include #include "t6050-max.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6050-j714s.dts b/arch/arm64/boot/dts/apple/t6050-j714s.dts index 3ed3baaf05fd5..23475ad163f58 100644 --- a/arch/arm64/boot/dts/apple/t6050-j714s.dts +++ b/arch/arm64/boot/dts/apple/t6050-j714s.dts @@ -14,6 +14,8 @@ /dts-v1/; #define T6050_J714S +/* ADT /arm-io/acio2: the right port's USB4/Thunderbolt router */ +#define T6050_ATC2_USB4_ROUTER #include #include "t6050-max.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6050-j716c.dts b/arch/arm64/boot/dts/apple/t6050-j716c.dts index 36575c200d534..679e9f2f78856 100644 --- a/arch/arm64/boot/dts/apple/t6050-j716c.dts +++ b/arch/arm64/boot/dts/apple/t6050-j716c.dts @@ -14,6 +14,8 @@ /dts-v1/; #define T6050_J716C +/* ADT /arm-io/acio2: the right port's USB4/Thunderbolt router */ +#define T6050_ATC2_USB4_ROUTER #include "t6050-max.dtsi" #include "hwmon-fan-dual.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6050-k114c.dts b/arch/arm64/boot/dts/apple/t6050-k114c.dts index 495334da4a875..c6957fef6b8b2 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114c.dts +++ b/arch/arm64/boot/dts/apple/t6050-k114c.dts @@ -11,6 +11,8 @@ /* Defined before the includes: t6050-max.dtsi guards the ATC2 router on it. */ #define T6050_K114C +/* ADT /arm-io/acio2: the right port's USB4/Thunderbolt router */ +#define T6050_ATC2_USB4_ROUTER /* The N1's firmware and this board's ADT board-id, for t6050-k114-k116.dtsi */ #define T6050_K_N1_FIRMWARE "apple/centauri/k114c-ftab.bin" #define T6050_K_BOARD_ID 0x04 diff --git a/arch/arm64/boot/dts/apple/t6050-k114s.dts b/arch/arm64/boot/dts/apple/t6050-k114s.dts index 417f6007e0119..41059929b296e 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114s.dts +++ b/arch/arm64/boot/dts/apple/t6050-k114s.dts @@ -10,8 +10,10 @@ * Copyright The Asahi Linux Contributors */ -/* Defined before the includes: t6050-max.dtsi guards the ATC2 router on it. */ +/* Defined before the includes, which select this board's blocks on it. */ #define T6050_K114S +/* ADT /arm-io/acio2: the right port's USB4/Thunderbolt router */ +#define T6050_ATC2_USB4_ROUTER /* The N1's firmware and this board's ADT board-id, for t6050-k114-k116.dtsi */ #define T6050_K_N1_FIRMWARE "apple/centauri/k114s-ftab.bin" #define T6050_K_BOARD_ID 0x14 diff --git a/arch/arm64/boot/dts/apple/t6050-max.dtsi b/arch/arm64/boot/dts/apple/t6050-max.dtsi index 13d8950b5eca0..b1a95aa559a5e 100644 --- a/arch/arm64/boot/dts/apple/t6050-max.dtsi +++ b/arch/arm64/boot/dts/apple/t6050-max.dtsi @@ -219,8 +219,8 @@ #endif }; -#if defined(T6050_J714C) || defined(T6050_J714S) || defined(T6050_J716C) || defined(T6050_K114C) || \ - defined(T6050_K114S) +/* Boards whose ADT has ATC2's USB4 router (acio2) define T6050_ATC2_USB4_ROUTER. */ +#ifdef T6050_ATC2_USB4_ROUTER /* * ATC2's USB4/Thunderbolt router (ADT /arm-io/acio2, acio-cpu2 and dart-acio2), powered per * connection: the PHY enters CIO mode, then the router's domains come on (ATC2_CIO, _PCIE, _USB, diff --git a/arch/arm64/boot/dts/apple/t6050-peripherals.dtsi b/arch/arm64/boot/dts/apple/t6050-peripherals.dtsi index cf9ba10059161..9c8f5441a94a3 100644 --- a/arch/arm64/boot/dts/apple/t6050-peripherals.dtsi +++ b/arch/arm64/boot/dts/apple/t6050-peripherals.dtsi @@ -1617,8 +1617,8 @@ status = "disabled"; }; -#if !defined(T6050_J714C) && !defined(T6050_J714S) && !defined(T6050_J716C) && !defined(T6050_K114C) && \ - !defined(T6050_K114S) +/* With ATC2's USB4 router, t6050-max.dtsi describes this DART with the router instead. */ +#ifndef T6050_ATC2_USB4_ROUTER apciec2_dart: iommu@384000000 { compatible = "apple,t6050-dart", "apple,t8110-dart"; reg = <0x3 0x84000000 0x0 0x20000>;