Skip to content
Open
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
15 changes: 10 additions & 5 deletions Documentation/devicetree/bindings/gpu/apple,agx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ properties:
- apple,agx-t8140
- apple,agx-t8142
- items:
- const: apple,agx-g17c
- enum:
- apple,agx-g17c
- apple,agx-g17d
- const: apple,agx-g17s
- items:
- const: apple,agx-t8103
Expand Down Expand Up @@ -267,12 +269,15 @@ allOf:
- if:
properties:
compatible:
const: apple,agx-g17s
anyOf:
- const: apple,agx-g17s
- contains:
const: apple,agx-g17d
then:
description:
The M5 Pro GPU uses one MMIO range and two firmware mailbox roles.
Its firmware graph supplies the performance tables, so it has no
operating-point table in the board DT.
The M5 Pro and M5 Ultra GPUs use one MMIO range and two firmware
mailbox roles. Their firmware graph supplies the performance tables,
so they have no operating-point table in the board DT.
properties:
reg:
maxItems: 1
Expand Down
120 changes: 120 additions & 0 deletions arch/arm64/boot/dts/apple/t6050-j775d-gpu.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* J775D GPU (G17D), for the boot loader's GPU handoff, as
* t6050-j714s-gpu-panel.dtsi describes the J714s's. Everything here stays
* disabled: the loader checks the ADT and the live GPU firmware state, fills
* the GPU reservations, and only then enables the nodes, the GPU last. A
* loader without the handoff, or one whose checks fail, leaves the GPU off.
*
* Values are from the J775DAP 27.0 ADT (sgx, gfx-asc, gfx1-asc, pmgr). Both
* firmware roles, their mailboxes and the GPU node are die 0's, with the
* addresses and interrupts of a one-die T6050; die 1 adds only its power
* states (t6050-ultra.dtsi).
*/

/ {
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 = <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 0x2e00000 0x0 0x88000>,
<0x23 0x2850000 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 ADT marks GPX and AFR, GFX's parents, critical. */
&ps_gpx {
apple,always-on;
};

&ps_afr {
apple,always-on;
};

&sgx {
compatible = "apple,agx-g17d", "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";
};
2 changes: 2 additions & 0 deletions arch/arm64/boot/dts/apple/t6050-j775d.dts
Original file line number Diff line number Diff line change
Expand Up @@ -696,3 +696,5 @@

#define T6050_J775D
#include "t6050-peripherals.dtsi"

#include "t6050-j775d-gpu.dtsi"
Loading
Loading