Skip to content

Commit 76f3ffe

Browse files
arm64: dts: apple: Add Apple SoC GPU
Add device tree entries for GPUs in M-series SoCs Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Sven Peter <[email protected]> Signed-off-by: Sasha Finkelstein <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sven Peter <[email protected]>
1 parent f8c667e commit 76f3ffe

File tree

7 files changed

+198
-0
lines changed

7 files changed

+198
-0
lines changed

arch/arm64/boot/dts/apple/t6000.dtsi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@
1616
};
1717

1818
/delete-node/ &pmgr_south;
19+
20+
&gpu {
21+
compatible = "apple,agx-g13s";
22+
};

arch/arm64/boot/dts/apple/t6001.dtsi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,7 @@
6262
};
6363
};
6464
};
65+
66+
&gpu {
67+
compatible = "apple,agx-g13c", "apple,agx-g13s";
68+
};

arch/arm64/boot/dts/apple/t6002.dtsi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,3 +300,7 @@
300300
// On t6002, the die0 GPU power domain needs both AFR power domains
301301
power-domains = <&ps_afr>, <&ps_afr_die1>;
302302
};
303+
304+
&gpu {
305+
compatible = "apple,agx-g13d", "apple,agx-g13s";
306+
};

arch/arm64/boot/dts/apple/t600x-common.dtsi

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
#address-cells = <2>;
1212
#size-cells = <2>;
1313

14+
aliases {
15+
gpu = &gpu;
16+
};
17+
1418
cpus {
1519
#address-cells = <2>;
1620
#size-cells = <0>;
@@ -378,4 +382,34 @@
378382
#clock-cells = <0>;
379383
clock-output-names = "nco_ref";
380384
};
385+
386+
reserved-memory {
387+
#address-cells = <2>;
388+
#size-cells = <2>;
389+
ranges;
390+
391+
gpu_globals: globals {
392+
status = "disabled";
393+
};
394+
395+
gpu_hw_cal_a: hw-cal-a {
396+
status = "disabled";
397+
};
398+
399+
gpu_hw_cal_b: hw-cal-b {
400+
status = "disabled";
401+
};
402+
403+
uat_handoff: uat-handoff {
404+
status = "disabled";
405+
};
406+
407+
uat_pagetables: uat-pagetables {
408+
status = "disabled";
409+
};
410+
411+
uat_ttbs: uat-ttbs {
412+
status = "disabled";
413+
};
414+
};
381415
};

arch/arm64/boot/dts/apple/t600x-die0.dtsi

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,34 @@
302302
#sound-dai-cells = <1>;
303303
};
304304

305+
gpu: gpu@406400000 {
306+
compatible = "apple,agx-g13s";
307+
reg = <0x4 0x6400000 0 0x40000>,
308+
<0x4 0x4000000 0 0x1000000>;
309+
reg-names = "asc", "sgx";
310+
mboxes = <&agx_mbox>;
311+
power-domains = <&ps_gfx>;
312+
memory-region = <&uat_ttbs>, <&uat_pagetables>, <&uat_handoff>,
313+
<&gpu_hw_cal_a>, <&gpu_hw_cal_b>, <&gpu_globals>;
314+
memory-region-names = "ttbs", "pagetables", "handoff",
315+
"hw-cal-a", "hw-cal-b", "globals";
316+
317+
apple,firmware-abi = <0 0 0>;
318+
};
319+
320+
agx_mbox: mbox@406408000 {
321+
compatible = "apple,t6000-asc-mailbox", "apple,asc-mailbox-v4";
322+
reg = <0x4 0x6408000 0x0 0x4000>;
323+
interrupt-parent = <&aic>;
324+
interrupts = <AIC_IRQ 0 1059 IRQ_TYPE_LEVEL_HIGH>,
325+
<AIC_IRQ 0 1060 IRQ_TYPE_LEVEL_HIGH>,
326+
<AIC_IRQ 0 1061 IRQ_TYPE_LEVEL_HIGH>,
327+
<AIC_IRQ 0 1062 IRQ_TYPE_LEVEL_HIGH>;
328+
interrupt-names = "send-empty", "send-not-empty",
329+
"recv-empty", "recv-not-empty";
330+
#mbox-cells = <0>;
331+
};
332+
305333
pcie0_dart_0: iommu@581008000 {
306334
compatible = "apple,t6000-dart";
307335
reg = <0x5 0x81008000 0x0 0x4000>;

arch/arm64/boot/dts/apple/t8103.dtsi

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
#address-cells = <2>;
2020
#size-cells = <2>;
2121

22+
aliases {
23+
gpu = &gpu;
24+
};
25+
2226
cpus {
2327
#address-cells = <2>;
2428
#size-cells = <0>;
@@ -351,6 +355,36 @@
351355
clock-output-names = "nco_ref";
352356
};
353357

358+
reserved-memory {
359+
#address-cells = <2>;
360+
#size-cells = <2>;
361+
ranges;
362+
363+
gpu_globals: globals {
364+
status = "disabled";
365+
};
366+
367+
gpu_hw_cal_a: hw-cal-a {
368+
status = "disabled";
369+
};
370+
371+
gpu_hw_cal_b: hw-cal-b {
372+
status = "disabled";
373+
};
374+
375+
uat_handoff: uat-handoff {
376+
status = "disabled";
377+
};
378+
379+
uat_pagetables: uat-pagetables {
380+
status = "disabled";
381+
};
382+
383+
uat_ttbs: uat-ttbs {
384+
status = "disabled";
385+
};
386+
};
387+
354388
soc {
355389
compatible = "simple-bus";
356390
#address-cells = <2>;
@@ -359,6 +393,34 @@
359393
ranges;
360394
nonposted-mmio;
361395

396+
gpu: gpu@206400000 {
397+
compatible = "apple,agx-g13g";
398+
reg = <0x2 0x6400000 0 0x40000>,
399+
<0x2 0x4000000 0 0x1000000>;
400+
reg-names = "asc", "sgx";
401+
mboxes = <&agx_mbox>;
402+
power-domains = <&ps_gfx>;
403+
memory-region = <&uat_ttbs>, <&uat_pagetables>, <&uat_handoff>,
404+
<&gpu_hw_cal_a>, <&gpu_hw_cal_b>, <&gpu_globals>;
405+
memory-region-names = "ttbs", "pagetables", "handoff",
406+
"hw-cal-a", "hw-cal-b", "globals";
407+
408+
apple,firmware-abi = <0 0 0>;
409+
};
410+
411+
agx_mbox: mbox@206408000 {
412+
compatible = "apple,t8103-asc-mailbox", "apple,asc-mailbox-v4";
413+
reg = <0x2 0x6408000 0x0 0x4000>;
414+
interrupt-parent = <&aic>;
415+
interrupts = <AIC_IRQ 575 IRQ_TYPE_LEVEL_HIGH>,
416+
<AIC_IRQ 576 IRQ_TYPE_LEVEL_HIGH>,
417+
<AIC_IRQ 577 IRQ_TYPE_LEVEL_HIGH>,
418+
<AIC_IRQ 578 IRQ_TYPE_LEVEL_HIGH>;
419+
interrupt-names = "send-empty", "send-not-empty",
420+
"recv-empty", "recv-not-empty";
421+
#mbox-cells = <0>;
422+
};
423+
362424
cpufreq_e: performance-controller@210e20000 {
363425
compatible = "apple,t8103-cluster-cpufreq", "apple,cluster-cpufreq";
364426
reg = <0x2 0x10e20000 0 0x1000>;

arch/arm64/boot/dts/apple/t8112.dtsi

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
#address-cells = <2>;
2020
#size-cells = <2>;
2121

22+
aliases {
23+
gpu = &gpu;
24+
};
25+
2226
cpus {
2327
#address-cells = <2>;
2428
#size-cells = <0>;
@@ -366,6 +370,36 @@
366370
clock-output-names = "nco_ref";
367371
};
368372

373+
reserved-memory {
374+
#address-cells = <2>;
375+
#size-cells = <2>;
376+
ranges;
377+
378+
gpu_globals: globals {
379+
status = "disabled";
380+
};
381+
382+
gpu_hw_cal_a: hw-cal-a {
383+
status = "disabled";
384+
};
385+
386+
gpu_hw_cal_b: hw-cal-b {
387+
status = "disabled";
388+
};
389+
390+
uat_handoff: uat-handoff {
391+
status = "disabled";
392+
};
393+
394+
uat_pagetables: uat-pagetables {
395+
status = "disabled";
396+
};
397+
398+
uat_ttbs: uat-ttbs {
399+
status = "disabled";
400+
};
401+
};
402+
369403
soc {
370404
compatible = "simple-bus";
371405
#address-cells = <2>;
@@ -374,6 +408,34 @@
374408
ranges;
375409
nonposted-mmio;
376410

411+
gpu: gpu@206400000 {
412+
compatible = "apple,agx-g14g";
413+
reg = <0x2 0x6400000 0 0x40000>,
414+
<0x2 0x4000000 0 0x1000000>;
415+
reg-names = "asc", "sgx";
416+
mboxes = <&agx_mbox>;
417+
power-domains = <&ps_gfx>;
418+
memory-region = <&uat_ttbs>, <&uat_pagetables>, <&uat_handoff>,
419+
<&gpu_hw_cal_a>, <&gpu_hw_cal_b>, <&gpu_globals>;
420+
memory-region-names = "ttbs", "pagetables", "handoff",
421+
"hw-cal-a", "hw-cal-b", "globals";
422+
423+
apple,firmware-abi = <0 0 0>;
424+
};
425+
426+
agx_mbox: mbox@206408000 {
427+
compatible = "apple,t8103-asc-mailbox", "apple,asc-mailbox-v4";
428+
reg = <0x2 0x6408000 0x0 0x4000>;
429+
interrupt-parent = <&aic>;
430+
interrupts = <AIC_IRQ 709 IRQ_TYPE_LEVEL_HIGH>,
431+
<AIC_IRQ 710 IRQ_TYPE_LEVEL_HIGH>,
432+
<AIC_IRQ 711 IRQ_TYPE_LEVEL_HIGH>,
433+
<AIC_IRQ 712 IRQ_TYPE_LEVEL_HIGH>;
434+
interrupt-names = "send-empty", "send-not-empty",
435+
"recv-empty", "recv-not-empty";
436+
#mbox-cells = <0>;
437+
};
438+
377439
cpufreq_e: cpufreq@210e20000 {
378440
compatible = "apple,t8112-cluster-cpufreq", "apple,cluster-cpufreq";
379441
reg = <0x2 0x10e20000 0 0x1000>;

0 commit comments

Comments
 (0)