Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
367 changes: 367 additions & 0 deletions arch/arm64/boot/dts/apple/t6050-gpu-g17c.dtsi
Original file line number Diff line number Diff line change
@@ -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-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-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 = <AIC_IRQ 0 2797 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 0 2800 IRQ_TYPE_LEVEL_HIGH>;
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 = <AIC_IRQ 0 2801 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 0 2804 IRQ_TYPE_LEVEL_HIGH>;
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;
};
Loading
Loading