Skip to content

Commit cd7dace

Browse files
committed
Merge tag 'apple-soc-dt-6.17' of https://git.kernel.org/pub/scm/linux/kernel/git/sven/linux into soc/dt
Apple SoC device tree changes for v6.17 - Added the bindings and nodes for Apple SoC GPU. The driver itself isn't ready for upstreaming yet due to rust dependencies but we're confident that the bindings are stable at this point. - Added a missing node for the touchbar framebuffer to Apple T2 device trees, which is the BMC for some x86 Macs - Fixed a W=1 warning by adding bit offsets to NVMEM node names. This required a change to the generic NVMEM cell binding which will be part of 6.17 through the NVMEM tree. Signed-off-by: Sven Peter <[email protected]> * tag 'apple-soc-dt-6.17' of https://git.kernel.org/pub/scm/linux/kernel/git/sven/linux: arm64: dts: apple: Add Apple SoC GPU dt-bindings: gpu: Add Apple SoC GPU arm64: dts: apple: t8012-j132: Include touchbar framebuffer node arm64: dts: apple: Add bit offset to PMIC NVMEM node names Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents dc56e10 + 76f3ffe commit cd7dace

File tree

10 files changed

+303
-9
lines changed

10 files changed

+303
-9
lines changed
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/gpu/apple,agx.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Apple SoC GPU
8+
9+
maintainers:
10+
- Sasha Finkelstein <[email protected]>
11+
12+
properties:
13+
compatible:
14+
oneOf:
15+
- enum:
16+
- apple,agx-g13g
17+
- apple,agx-g13s
18+
- apple,agx-g14g
19+
- items:
20+
- enum:
21+
- apple,agx-g13c
22+
- apple,agx-g13d
23+
- const: apple,agx-g13s
24+
25+
reg:
26+
items:
27+
- description: GPU coprocessor control registers
28+
- description: GPU block MMIO registers
29+
30+
reg-names:
31+
items:
32+
- const: asc
33+
- const: sgx
34+
35+
power-domains:
36+
maxItems: 1
37+
38+
mboxes:
39+
maxItems: 1
40+
41+
memory-region:
42+
items:
43+
- description: Region containing GPU MMU TTBs
44+
- description: Region containing GPU MMU page tables
45+
- description:
46+
Region containing a shared handoff structure for VM
47+
management coordination
48+
- description: Calibration blob. Mostly power-related configuration
49+
- description: Calibration blob. Mostly GPU-related configuration
50+
- description: Shared global variables with GPU firmware
51+
52+
memory-region-names:
53+
items:
54+
- const: ttbs
55+
- const: pagetables
56+
- const: handoff
57+
- const: hw-cal-a
58+
- const: hw-cal-b
59+
- const: globals
60+
61+
apple,firmware-abi:
62+
$ref: /schemas/types.yaml#/definitions/uint32-array
63+
minItems: 3
64+
description:
65+
macOS version the current firmware is paired with, used to pick
66+
the version of firmware ABI to be used.
67+
Bootloader will overwrite this
68+
69+
required:
70+
- compatible
71+
- reg
72+
- mboxes
73+
- memory-region
74+
- apple,firmware-abi
75+
76+
additionalProperties: false
77+
78+
examples:
79+
- |
80+
gpu@6400000 {
81+
compatible = "apple,agx-g13g";
82+
reg = <0x6400000 0x40000>,
83+
<0x4000000 0x1000000>;
84+
reg-names = "asc", "sgx";
85+
mboxes = <&agx_mbox>;
86+
power-domains = <&ps_gfx>;
87+
memory-region = <&uat_ttbs>, <&uat_pagetables>, <&uat_handoff>,
88+
<&gpu_hw_cal_a>, <&gpu_hw_cal_b>, <&gpu_globals>;
89+
memory-region-names = "ttbs", "pagetables", "handoff",
90+
"hw-cal-a", "hw-cal-b", "globals";
91+
92+
apple,firmware-abi = <0 0 0>;
93+
};
94+
...

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2330,6 +2330,7 @@ F: Documentation/devicetree/bindings/arm/apple/*
23302330
F: Documentation/devicetree/bindings/clock/apple,nco.yaml
23312331
F: Documentation/devicetree/bindings/cpufreq/apple,cluster-cpufreq.yaml
23322332
F: Documentation/devicetree/bindings/dma/apple,admac.yaml
2333+
F: Documentation/devicetree/bindings/gpu/apple,agx.yaml
23332334
F: Documentation/devicetree/bindings/i2c/apple,i2c.yaml
23342335
F: Documentation/devicetree/bindings/input/touchscreen/apple,z2-multitouch.yaml
23352336
F: Documentation/devicetree/bindings/interrupt-controller/apple,*

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: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@
7272
reg = <0x6001 0x1>;
7373
};
7474

75-
boot_error_count: boot-error-count@6002 {
75+
boot_error_count: boot-error-count@6002,0 {
7676
reg = <0x6002 0x1>;
7777
bits = <0 4>;
7878
};
7979

80-
panic_count: panic-count@6002 {
80+
panic_count: panic-count@6002,4 {
8181
reg = <0x6002 0x1>;
8282
bits = <4 4>;
8383
};
@@ -86,7 +86,7 @@
8686
reg = <0x6003 0x1>;
8787
};
8888

89-
shutdown_flag: shutdown-flag@600f {
89+
shutdown_flag: shutdown-flag@600f,3 {
9090
reg = <0x600f 0x1>;
9191
bits = <3 1>;
9292
};
@@ -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/t8012-j132.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
/dts-v1/;
88

99
#include "t8012-jxxx.dtsi"
10+
#include "t8012-touchbar.dtsi"
1011

1112
/ {
1213
model = "Apple T2 MacBookPro15,2 (j132)";

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

Lines changed: 65 additions & 3 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>;
@@ -761,12 +823,12 @@
761823
reg = <0x9f01 0x1>;
762824
};
763825

764-
boot_error_count: boot-error-count@9f02 {
826+
boot_error_count: boot-error-count@9f02,0 {
765827
reg = <0x9f02 0x1>;
766828
bits = <0 4>;
767829
};
768830

769-
panic_count: panic-count@9f02 {
831+
panic_count: panic-count@9f02,4 {
770832
reg = <0x9f02 0x1>;
771833
bits = <4 4>;
772834
};
@@ -775,7 +837,7 @@
775837
reg = <0x9f03 0x1>;
776838
};
777839

778-
shutdown_flag: shutdown-flag@9f0f {
840+
shutdown_flag: shutdown-flag@9f0f,3 {
779841
reg = <0x9f0f 0x1>;
780842
bits = <3 1>;
781843
};

0 commit comments

Comments
 (0)