From d32e8dcabef0ddfa7d533a0d9e7f404ae989f2bc Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Thu, 19 Nov 2026 22:42:01 +1100 Subject: [PATCH 1/4] arm64: dts: apple: t6050: share the G17S GPU description t6050-k114c-gpu.dtsi and t6050-k116s-gpu.dtsi describe the GPU in the same G17S layout: the gpu alias, six loader-filled reservations, the GFX and GFX1 mailboxes in place of the inventory ASC nodes, the always-on GPX and AFR states and the sgx override. Only one property differs per board (K114c keeps GFX on across s2idle, K116s puts the GPU on its PMP report entry). Move the common part into t6050-gpu-g17s.dtsi so other M5 Pro boards can use it. Both boards keep their own notes and their one board property. The K116s ADT reference values move to the file header unchanged. No functional change: the K114c and K116s DTBs are byte-identical before and after. Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t6050-gpu-g17s.dtsi | 127 +++++++++++++ .../arm64/boot/dts/apple/t6050-k114c-gpu.dtsi | 107 +---------- .../arm64/boot/dts/apple/t6050-k116s-gpu.dtsi | 169 ++++-------------- 3 files changed, 161 insertions(+), 242 deletions(-) create mode 100644 arch/arm64/boot/dts/apple/t6050-gpu-g17s.dtsi diff --git a/arch/arm64/boot/dts/apple/t6050-gpu-g17s.dtsi b/arch/arm64/boot/dts/apple/t6050-gpu-g17s.dtsi new file mode 100644 index 0000000000000..ac1bb69ebe90e --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6050-gpu-g17s.dtsi @@ -0,0 +1,127 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * T6050 GPU in the G17S layout, for the boot loader's GPU handoff. + * + * Shared by the boards that describe the GPU this way (K114c, K116s, J873s, K114s). It is the + * common part of t6050-k114c-gpu.dtsi and t6050-k116s-gpu.dtsi, which keep only their board + * notes, and the GPU half of t6050-j714s-gpu-panel.dtsi. Every value is the SoC's: the + * GPU aperture (ADT sgx), both GPU ASCs (gfx-asc, gfx1-asc) and the GPX/AFR power states, + * the same in every T6050 ADT read so far. What a part or a firmware build sets (the six + * memory reservations) is left zero for the loader to fill from the ADT the Mac boots with. + * + * Everything stays disabled: the loader checks the ADT and the live GPU firmware build, fills + * the reservations, then enables the GPU PMGR, GPX, AFR, GFX, both mailboxes and the GPU, the + * GPU last. A loader that refuses, or one without the handoff, leaves the GPU off. + */ + +/ { + aliases { + /* The loader finds the GPU through this alias */ + gpu = &sgx; + }; + + reserved-memory { + /* Filled and enabled by the loader from the ADT */ + 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 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. + */ + 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"; + }; + + 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"; + }; +}; + +/* The ADT marks GPX and AFR, GFX's parents, critical. */ +&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 then picks its configuration + * from the GPU's ID registers. + */ + compatible = "apple,agx-g17s"; + /* ADT sgx reg[0]; 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"; +}; diff --git a/arch/arm64/boot/dts/apple/t6050-k114c-gpu.dtsi b/arch/arm64/boot/dts/apple/t6050-k114c-gpu.dtsi index ceec5b22d2ae7..cd3f544069a54 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114c-gpu.dtsi +++ b/arch/arm64/boot/dts/apple/t6050-k114c-gpu.dtsi @@ -9,99 +9,7 @@ * sgx and both GPU ASCs are the same as on the M5 Pro. */ -/ { - aliases { - /* The loader finds the GPU through this alias */ - gpu = &sgx; - }; - - reserved-memory { - /* Filled and enabled by the loader from the ADT */ - 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 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. - */ - 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"; - }; - - 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"; - }; -}; - -/* The ADT marks GPX and AFR, GFX's parents, critical. */ -&ps_gpx { - apple,always-on; -}; - -&ps_afr { - apple,always-on; -}; +#include "t6050-gpu-g17s.dtsi" /* * The G17 firmware stays live across suspend-to-idle, as the G16's does on T8132: keep @@ -110,16 +18,3 @@ &ps_gfx { apple,sleep-retained; }; - -&sgx { - compatible = "apple,agx-g17s"; - /* ADT sgx reg[0]; 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"; -}; diff --git a/arch/arm64/boot/dts/apple/t6050-k116s-gpu.dtsi b/arch/arm64/boot/dts/apple/t6050-k116s-gpu.dtsi index 7bc349759028d..ab94211132d3b 100644 --- a/arch/arm64/boot/dts/apple/t6050-k116s-gpu.dtsi +++ b/arch/arm64/boot/dts/apple/t6050-k116s-gpu.dtsi @@ -2,150 +2,47 @@ /* * 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. + * The layout is t6050-gpu-g17s.dtsi, 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"; - }; -}; - -/* + * Every value 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). + * + * Reservations, 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). + * + * 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. + * 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. * 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. + * ADT sgx reg[0] 0x21_00000000 + 0x3fdc000; the driver maps the first 16 MiB as "sgx". The + * driver uses the J714 tables for it, 5 mV below this unit's ADT voltages at eight of the + * fourteen states. */ -&ps_gpx { - apple,always-on; -}; -&ps_afr { - apple,always-on; -}; +#include "t6050-gpu-g17s.dtsi" &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 From c5bd591a9dea45c12dcfbcd4c7f1dd32023e79b9 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Thu, 19 Nov 2026 22:42:05 +1100 Subject: [PATCH 2/4] arm64: dts: apple: t6050: share the G17C GPU description The M5 Max GPU description in t6050-j716c-gpu-panel.dtsi (the GPU node under /soc@2300000000, its mailboxes, reservations, operating point tables and GPU power states) has nothing J716c-specific in it: every value is either the SoC's or left zero for the loader to fill from the ADT. Move that half into t6050-gpu-g17c.dtsi and include it from the J716c file, which keeps the internal panel half. Let a board that has no GPU bus of its own ask t6050-peripherals.dtsi for one with T6050_GPU_BUS, so the GPU PMGR lands under /soc@2300000000 where the loader looks for it, as on J716c. No functional change: no board defines T6050_GPU_BUS yet and the J716c DTB is byte-identical before and after. Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t6050-gpu-g17c.dtsi | 367 ++++++++++++++++++ .../boot/dts/apple/t6050-j716c-gpu-panel.dtsi | 351 +---------------- .../boot/dts/apple/t6050-peripherals.dtsi | 22 +- 3 files changed, 390 insertions(+), 350 deletions(-) create mode 100644 arch/arm64/boot/dts/apple/t6050-gpu-g17c.dtsi diff --git a/arch/arm64/boot/dts/apple/t6050-gpu-g17c.dtsi b/arch/arm64/boot/dts/apple/t6050-gpu-g17c.dtsi new file mode 100644 index 0000000000000..a7841f6669336 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6050-gpu-g17c.dtsi @@ -0,0 +1,367 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * T6050 M5 Max GPU (G17C, four clusters on one die) for the boot loader's GPU handoff. + * + * Split out of t6050-j716c-gpu-panel.dtsi unchanged, so every M5 Max board describes its GPU + * the same way. The values are those of the SoC (the GPU aperture, both GPU ASC mailboxes and + * the GPU PMGR states); everything a part or a firmware build sets (the memory reservations, + * the operating points, the CS/AFR tables, the power telemetry records) is left zero for the + * loader to fill from the ADT the Mac boots with. Nothing here starts either coprocessor: the + * GPU, its power states and both mailboxes stay disabled until the loader accepts the handoff. + * + * The loader addresses the GPU, its mailboxes and the GPU PMGR under /soc@2300000000, so the + * board must provide that bus (as t6050-j716c.dts does, or T6050_GPU_BUS before + * t6050-peripherals.dtsi) and include this file after t6050-peripherals.dtsi. + */ + +/* Replace the disabled inventory with the GPU driver's resource layout. */ +/delete-node/ &sgx; +/delete-node/ &gfx_asc; +/delete-node/ &gfx1_asc; + +/ { + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + 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_handoff: uat-handoff { + reg = <0 0 0 0>; + no-map; + status = "disabled"; + }; + + uat_l2_pagetables: uat-l2-pagetables { + reg = <0 0 0 0>; + no-map; + status = "disabled"; + }; + + 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"; + }; + }; + + /* Four clusters on one die: four main voltage lanes and one CS/AFR lane. */ + gpu_opp: opp-table-gpu { + compatible = "operating-points-v2"; + + opp00 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0 0 0 0>; + opp-microvolt-sram = <0 0 0 0>; + }; + + opp01 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0 0 0 0>; + opp-microvolt-sram = <0 0 0 0>; + }; + + opp02 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0 0 0 0>; + opp-microvolt-sram = <0 0 0 0>; + }; + + opp03 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0 0 0 0>; + opp-microvolt-sram = <0 0 0 0>; + }; + + opp04 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0 0 0 0>; + opp-microvolt-sram = <0 0 0 0>; + }; + + opp05 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0 0 0 0>; + opp-microvolt-sram = <0 0 0 0>; + }; + + opp06 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0 0 0 0>; + opp-microvolt-sram = <0 0 0 0>; + }; + + opp07 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0 0 0 0>; + opp-microvolt-sram = <0 0 0 0>; + }; + + opp08 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0 0 0 0>; + opp-microvolt-sram = <0 0 0 0>; + }; + + opp09 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0 0 0 0>; + opp-microvolt-sram = <0 0 0 0>; + }; + + opp10 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0 0 0 0>; + opp-microvolt-sram = <0 0 0 0>; + }; + + opp11 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0 0 0 0>; + opp-microvolt-sram = <0 0 0 0>; + }; + + opp12 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0 0 0 0>; + opp-microvolt-sram = <0 0 0 0>; + }; + + opp13 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0 0 0 0>; + opp-microvolt-sram = <0 0 0 0>; + }; + }; + + gpu_afr_opp: opp-table-gpu-afr { + compatible = "operating-points-v2"; + + opp00 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp01 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp02 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp03 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp04 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp05 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp06 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp07 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp08 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp09 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp10 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp11 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp12 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp13 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + }; + + gpu_cs_opp: opp-table-gpu-cs { + compatible = "operating-points-v2"; + + opp00 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp01 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp02 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp03 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp04 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp05 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp06 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp07 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp08 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp09 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp10 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp11 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp12 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + + opp13 { + opp-hz = /bits/ 64 <0>; + opp-microvolt = <0>; + }; + }; + + soc@2300000000 { + + gpu: gpu@2302600000 { + compatible = "apple,agx-g17c", "apple,agx-g17s"; + reg = <0x23 0x02600000 0x0 0x88000>, + <0x23 0x00000000 0x0 0x4000000>; + reg-names = "asc", "sgx"; + mboxes = <&gfx_mbox>, <&gfx1_mbox>; + power-domains = <&ps_gfx>; + /* Raises the DRAM and fabric floors while GPU work is in flight */ + apple,clpc = <&clpc>; + 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"; + operating-points-v2 = <&gpu_opp>; + apple,afr-opp = <&gpu_afr_opp>; + apple,cs-opp = <&gpu_cs_opp>; + apple,csafr-min-sram-microvolt = <0>; + /* Three power telemetry records, each an identifier and two words. */ + apple,aon-ptd = <0 0 0 0 0 0 0 0 0>; + status = "disabled"; + }; + + gfx_mbox: mailbox@2302600000 { + compatible = "apple,t6050-j775d-ascwrap-v6"; + reg = <0x23 0x02600000 0x0 0x88000>, + <0x23 0x02050000 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"; + }; + + gfx1_mbox: mailbox@2302e00000 { + compatible = "apple,t6050-j775d-ascwrap-v6"; + reg = <0x23 0x02e00000 0x0 0x88000>, + <0x23 0x02850000 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"; + }; + }; +}; + +/* The power states stay disabled until the loader accepts the GPU handoff. */ +&pmgr_gpx { + status = "okay"; +}; + +&ps_gpx { + apple,always-on; +}; + +&ps_afr { + apple,always-on; +}; diff --git a/arch/arm64/boot/dts/apple/t6050-j716c-gpu-panel.dtsi b/arch/arm64/boot/dts/apple/t6050-j716c-gpu-panel.dtsi index 2b908e34fdaab..b1f3a48a27d57 100644 --- a/arch/arm64/boot/dts/apple/t6050-j716c-gpu-panel.dtsi +++ b/arch/arm64/boot/dts/apple/t6050-j716c-gpu-panel.dtsi @@ -5,344 +5,10 @@ * dependent devices. A source DT alone must not start either coprocessor. */ -/* Replace the disabled inventory with the GPU driver's resource layout. */ -/delete-node/ &sgx; -/delete-node/ &gfx_asc; -/delete-node/ &gfx1_asc; +/* The GPU: t6050-gpu-g17c.dtsi, shared with the other M5 Max boards. */ +#include "t6050-gpu-g17c.dtsi" / { - reserved-memory { - #address-cells = <2>; - #size-cells = <2>; - ranges; - - 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_handoff: uat-handoff { - reg = <0 0 0 0>; - no-map; - status = "disabled"; - }; - - uat_l2_pagetables: uat-l2-pagetables { - reg = <0 0 0 0>; - no-map; - status = "disabled"; - }; - - 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"; - }; - }; - - /* Four clusters on one die: four main voltage lanes and one CS/AFR lane. */ - gpu_opp: opp-table-gpu { - compatible = "operating-points-v2"; - - opp00 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0 0 0 0>; - opp-microvolt-sram = <0 0 0 0>; - }; - - opp01 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0 0 0 0>; - opp-microvolt-sram = <0 0 0 0>; - }; - - opp02 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0 0 0 0>; - opp-microvolt-sram = <0 0 0 0>; - }; - - opp03 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0 0 0 0>; - opp-microvolt-sram = <0 0 0 0>; - }; - - opp04 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0 0 0 0>; - opp-microvolt-sram = <0 0 0 0>; - }; - - opp05 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0 0 0 0>; - opp-microvolt-sram = <0 0 0 0>; - }; - - opp06 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0 0 0 0>; - opp-microvolt-sram = <0 0 0 0>; - }; - - opp07 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0 0 0 0>; - opp-microvolt-sram = <0 0 0 0>; - }; - - opp08 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0 0 0 0>; - opp-microvolt-sram = <0 0 0 0>; - }; - - opp09 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0 0 0 0>; - opp-microvolt-sram = <0 0 0 0>; - }; - - opp10 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0 0 0 0>; - opp-microvolt-sram = <0 0 0 0>; - }; - - opp11 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0 0 0 0>; - opp-microvolt-sram = <0 0 0 0>; - }; - - opp12 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0 0 0 0>; - opp-microvolt-sram = <0 0 0 0>; - }; - - opp13 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0 0 0 0>; - opp-microvolt-sram = <0 0 0 0>; - }; - }; - - gpu_afr_opp: opp-table-gpu-afr { - compatible = "operating-points-v2"; - - opp00 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp01 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp02 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp03 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp04 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp05 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp06 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp07 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp08 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp09 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp10 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp11 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp12 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp13 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - }; - - gpu_cs_opp: opp-table-gpu-cs { - compatible = "operating-points-v2"; - - opp00 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp01 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp02 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp03 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp04 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp05 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp06 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp07 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp08 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp09 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp10 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp11 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp12 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - - opp13 { - opp-hz = /bits/ 64 <0>; - opp-microvolt = <0>; - }; - }; - - soc@2300000000 { - - gpu: gpu@2302600000 { - compatible = "apple,agx-g17c", "apple,agx-g17s"; - reg = <0x23 0x02600000 0x0 0x88000>, - <0x23 0x00000000 0x0 0x4000000>; - reg-names = "asc", "sgx"; - mboxes = <&gfx_mbox>, <&gfx1_mbox>; - power-domains = <&ps_gfx>; - /* Raises the DRAM and fabric floors while GPU work is in flight */ - apple,clpc = <&clpc>; - 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"; - operating-points-v2 = <&gpu_opp>; - apple,afr-opp = <&gpu_afr_opp>; - apple,cs-opp = <&gpu_cs_opp>; - apple,csafr-min-sram-microvolt = <0>; - /* Three power telemetry records, each an identifier and two words. */ - apple,aon-ptd = <0 0 0 0 0 0 0 0 0>; - status = "disabled"; - }; - - gfx_mbox: mailbox@2302600000 { - compatible = "apple,t6050-j775d-ascwrap-v6"; - reg = <0x23 0x02600000 0x0 0x88000>, - <0x23 0x02050000 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"; - }; - - gfx1_mbox: mailbox@2302e00000 { - compatible = "apple,t6050-j775d-ascwrap-v6"; - reg = <0x23 0x02e00000 0x0 0x88000>, - <0x23 0x02850000 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"; - }; - }; - /* The loader verifies these clock identifiers and fills their rates. */ dcp_fw_clk361: clock-dcp-firmware-361 { compatible = "fixed-clock"; @@ -365,19 +31,6 @@ }; }; -/* The power states stay disabled until the loader accepts the GPU handoff. */ -&pmgr_gpx { - status = "okay"; -}; - -&ps_gpx { - apple,always-on; -}; - -&ps_afr { - apple,always-on; -}; - &dcp_dart { apple,dma-range = <0x100 0x0 0x300 0x0>; }; diff --git a/arch/arm64/boot/dts/apple/t6050-peripherals.dtsi b/arch/arm64/boot/dts/apple/t6050-peripherals.dtsi index 488f3c3ee6d6e..84913ec161d2c 100644 --- a/arch/arm64/boot/dts/apple/t6050-peripherals.dtsi +++ b/arch/arm64/boot/dts/apple/t6050-peripherals.dtsi @@ -983,8 +983,28 @@ }; }; -#ifdef T6050_J716C +#ifdef T6050_GPU_BUS +/* + * The GPU aperture (ADT sgx, gfx-asc, gfx1-asc and the GPU PMGR, 0x23_0000_0000) as its own + * bus, as on J716c (t6050-j716c.dts): the M5 Max GPU handoff (t6050-gpu-g17c.dtsi) finds the + * GPU, both mailboxes and the GPU power states under /soc@2300000000. + */ +/ { + gpu_bus: soc@2300000000 { + compatible = "simple-bus"; + #address-cells = <2>; + #size-cells = <2>; + ranges = <0x23 0x0 0x23 0x0 0x0 0x4000000>; + interrupt-parent = <&aic>; + nonposted-mmio; + }; +}; + +#endif +#if defined(T6050_J716C) &j716c_gpu_bus { +#elif defined(T6050_GPU_BUS) +&gpu_bus { #else &{/soc} { #endif From 0cac76d33a6df438f2480c5bede2404a4a1cb9c3 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Thu, 19 Nov 2026 22:42:10 +1100 Subject: [PATCH 3/4] arm64: dts: apple: t6050: describe the GPU on J714c, J873s, K114s, K116c These four boards inherit the inventory GPU node from t6050-peripherals.dtsi, compatible "apple,agx-t6050". Neither drm/asahi (which matches "gpu,t6050" and "apple,agx-g17s") nor the loader's GPU handoff (which looks for "apple,agx-g17s", or "apple,agx-g17c" under /soc@2300000000) accepts it, so the GPU never binds on them. Describe the GPU as on the booted boards of the same part: - J714c and K116c (M5 Max): t6050-gpu-g17c.dtsi, as J716c, on its own /soc@2300000000 bus (T6050_GPU_BUS). J714c already runs its PMP, so its GPU stays on the PMP's GFX report entry as before. - J873s and K114s (M5 Pro): t6050-gpu-g17s.dtsi, as K116s and J714s. Nothing here is per board: the driver picks its configuration from the GPU's ID registers, the loader fills the reservations and operating points from the ADT the Mac boots with and checks the firmware build before it enables anything. Everything stays disabled until it does, so a loader that refuses leaves these boards as they are now. No other board's DTB changes. Not yet booted on any of the four. Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t6050-j714c.dts | 5 ++++- arch/arm64/boot/dts/apple/t6050-j873s.dts | 3 +++ arch/arm64/boot/dts/apple/t6050-k114s.dts | 3 +++ arch/arm64/boot/dts/apple/t6050-k116c.dts | 4 ++++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/apple/t6050-j714c.dts b/arch/arm64/boot/dts/apple/t6050-j714c.dts index cf1d62c690fcc..71c2c4dfe66bd 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 +/* The GPU in the M5 Max layout (t6050-gpu-g17c.dtsi), under its own bus */ +#define T6050_GPU_BUS #include "t6050-max.dtsi" / { @@ -255,6 +257,7 @@ }; #include "t6050-peripherals.dtsi" +#include "t6050-gpu-g17c.dtsi" /* * The PMP (ADT pmp0, /chosen, /arm-io/pmgr), as on the J714s. iBoot loads its firmware and the @@ -303,7 +306,7 @@ apple,pmp = <&pmp0>; }; -&sgx { +&gpu { power-domains = <&pmp0_gfx>; }; diff --git a/arch/arm64/boot/dts/apple/t6050-j873s.dts b/arch/arm64/boot/dts/apple/t6050-j873s.dts index 0a7976e50230f..6ef82f23638df 100644 --- a/arch/arm64/boot/dts/apple/t6050-j873s.dts +++ b/arch/arm64/boot/dts/apple/t6050-j873s.dts @@ -34,3 +34,6 @@ #define T6050_J873S #include "t6050-peripherals.dtsi" + +/* The GPU in the M5 Pro layout */ +#include "t6050-gpu-g17s.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6050-k114s.dts b/arch/arm64/boot/dts/apple/t6050-k114s.dts index caa609babef0d..79fa200d3a9ef 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114s.dts +++ b/arch/arm64/boot/dts/apple/t6050-k114s.dts @@ -22,3 +22,6 @@ #define T6050_K114S #include "t6050-peripherals.dtsi" + +/* The GPU in the M5 Pro layout */ +#include "t6050-gpu-g17s.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6050-k116c.dts b/arch/arm64/boot/dts/apple/t6050-k116c.dts index ff9e875fb1951..b1c0098284046 100644 --- a/arch/arm64/boot/dts/apple/t6050-k116c.dts +++ b/arch/arm64/boot/dts/apple/t6050-k116c.dts @@ -21,4 +21,8 @@ }; #define T6050_K116C +/* The GPU in the M5 Max layout (t6050-gpu-g17c.dtsi), under its own bus */ +#define T6050_GPU_BUS #include "t6050-peripherals.dtsi" + +#include "t6050-gpu-g17c.dtsi" From ca5c3701b3af89251f35e1773e12b48fa41b88b8 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Fri, 20 Nov 2026 02:54:55 +1100 Subject: [PATCH 4/4] arm64: dts: apple: t6050: give the G17C OPP tables schema-valid names opp-v2-base.yaml allows one suffix after opp-table, so opp-table-gpu-afr and opp-table-gpu-cs fail CHECK_DTBS. J716c already carried those warnings; sharing the block with J714c and K116c would add the same four on each board. Rename the nodes to opp-table-afr and opp-table-cs. Nothing looks them up by name: drm/asahi and the loader follow the GPU node's apple,afr-opp and apple,cs-opp phandles. Signed-off-by: Ryan Murray --- arch/arm64/boot/dts/apple/t6050-gpu-g17c.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t6050-gpu-g17c.dtsi b/arch/arm64/boot/dts/apple/t6050-gpu-g17c.dtsi index a7841f6669336..4fc4df0789b99 100644 --- a/arch/arm64/boot/dts/apple/t6050-gpu-g17c.dtsi +++ b/arch/arm64/boot/dts/apple/t6050-gpu-g17c.dtsi @@ -151,7 +151,7 @@ }; }; - gpu_afr_opp: opp-table-gpu-afr { + gpu_afr_opp: opp-table-afr { compatible = "operating-points-v2"; opp00 { @@ -225,7 +225,7 @@ }; }; - gpu_cs_opp: opp-table-gpu-cs { + gpu_cs_opp: opp-table-cs { compatible = "operating-points-v2"; opp00 {