Skip to content

Commit 49c6abf

Browse files
committed
Merge branch 'bits/000-devicetree' into asahi-wip
2 parents 62dae01 + 703a105 commit 49c6abf

78 files changed

Lines changed: 14428 additions & 49 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/devicetree/bindings/arm/apple.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ description: |
9292
Devices based on the "M2" SoC:
9393
9494
- MacBook Air (M2, 2022)
95+
- MacBook Air (15-inch, M2, 2023)
9596
- MacBook Pro (13-inch, M2, 2022)
9697
- Mac mini (M2, 2023)
9798
@@ -279,6 +280,7 @@ properties:
279280
items:
280281
- enum:
281282
- apple,j413 # MacBook Air (M2, 2022)
283+
- apple,j415 # MacBook Air (15-inch, M2, 2023)
282284
- apple,j473 # Mac mini (M2, 2023)
283285
- apple,j493 # MacBook Pro (13-inch, M2, 2022)
284286
- const: apple,t8112
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 <fnkl.kernel@gmail.com>
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/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,14 @@ dtb-$(CONFIG_ARCH_APPLE) += t6001-j316c.dtb
8080
dtb-$(CONFIG_ARCH_APPLE) += t6001-j375c.dtb
8181
dtb-$(CONFIG_ARCH_APPLE) += t6002-j375d.dtb
8282
dtb-$(CONFIG_ARCH_APPLE) += t8112-j413.dtb
83+
dtb-$(CONFIG_ARCH_APPLE) += t8112-j415.dtb
8384
dtb-$(CONFIG_ARCH_APPLE) += t8112-j473.dtb
8485
dtb-$(CONFIG_ARCH_APPLE) += t8112-j493.dtb
86+
dtb-$(CONFIG_ARCH_APPLE) += t6020-j414s.dtb
87+
dtb-$(CONFIG_ARCH_APPLE) += t6021-j414c.dtb
88+
dtb-$(CONFIG_ARCH_APPLE) += t6020-j416s.dtb
89+
dtb-$(CONFIG_ARCH_APPLE) += t6021-j416c.dtb
90+
dtb-$(CONFIG_ARCH_APPLE) += t6020-j474s.dtb
91+
dtb-$(CONFIG_ARCH_APPLE) += t6021-j475c.dtb
92+
dtb-$(CONFIG_ARCH_APPLE) += t6022-j475d.dtb
93+
dtb-$(CONFIG_ARCH_APPLE) += t6022-j180d.dtb
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* hwmon sensors expected on all systems
4+
*
5+
* Copyright The Asahi Linux Contributors
6+
*/
7+
8+
&smc {
9+
hwmon {
10+
apple,power-keys {
11+
power-PSTR {
12+
apple,key-id = "PSTR";
13+
label = "Total System Power";
14+
};
15+
power-PDTR {
16+
apple,key-id = "PDTR";
17+
label = "AC Input Power";
18+
};
19+
power-PMVR {
20+
apple,key-id = "PMVR";
21+
label = "3.8 V Rail Power";
22+
};
23+
};
24+
apple,temp-keys {
25+
temp-TH0x {
26+
apple,key-id = "TH0x";
27+
label = "NAND Flash Temperature";
28+
};
29+
};
30+
apple,volt-keys {
31+
volt-VD0R {
32+
apple,key-id = "VD0R";
33+
label = "AC Input Voltage";
34+
};
35+
};
36+
apple,current-keys {
37+
current-ID0R {
38+
apple,key-id = "ID0R";
39+
label = "AC Input Current";
40+
};
41+
};
42+
};
43+
};
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Copyright The Asahi Linux Contributors
4+
*
5+
* Fan hwmon sensors for machines with 2 fan.
6+
*/
7+
8+
#include "hwmon-fan.dtsi"
9+
10+
&smc {
11+
hwmon {
12+
apple,fan-keys {
13+
fan-F0Ac {
14+
label = "Fan 1";
15+
};
16+
fan-F1Ac {
17+
apple,key-id = "F1Ac";
18+
label = "Fan 2";
19+
apple,fan-minimum = "F1Mn";
20+
apple,fan-maximum = "F1Mx";
21+
apple,fan-target = "F1Tg";
22+
apple,fan-mode = "F1Md";
23+
};
24+
};
25+
};
26+
};
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Copyright The Asahi Linux Contributors
4+
*
5+
* Fan hwmon sensors for machines with a single fan.
6+
*/
7+
8+
&smc {
9+
hwmon {
10+
apple,fan-keys {
11+
fan-F0Ac {
12+
apple,key-id = "F0Ac";
13+
label = "Fan";
14+
apple,fan-minimum = "F0Mn";
15+
apple,fan-maximum = "F0Mx";
16+
apple,fan-target = "F0Tg";
17+
apple,fan-mode = "F0Md";
18+
};
19+
};
20+
};
21+
};
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* hwmon sensors expected on all laptops
4+
*
5+
* Copyright The Asahi Linux Contributors
6+
*/
7+
8+
&smc {
9+
hwmon {
10+
apple,power-keys {
11+
power-PHPC {
12+
apple,key-id = "PHPC";
13+
label = "Heatpipe Power";
14+
};
15+
};
16+
apple,temp-keys {
17+
temp-TB0T {
18+
apple,key-id = "TB0T";
19+
label = "Battery Hotspot";
20+
};
21+
temp-TCHP {
22+
apple,key-id = "TCHP";
23+
label = "Charge Regulator Temp";
24+
};
25+
temp-TW0P {
26+
apple,key-id = "TW0P";
27+
label = "WiFi/BT Module Temp";
28+
};
29+
};
30+
apple,volt-keys {
31+
volt-SBAV {
32+
apple,key-id = "SBAV";
33+
label = "Battery Voltage";
34+
};
35+
volt-VD0R {
36+
apple,key-id = "VD0R";
37+
label = "Charger Input Voltage";
38+
};
39+
};
40+
};
41+
};
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* hwmon sensors common to the Mac mini desktop
4+
* models, but not the Studio or Pro.
5+
*
6+
* Copyright The Asahi Linux Contributors
7+
*/
8+
9+
#include "hwmon-fan.dtsi"
10+
11+
&smc {
12+
hwmon {
13+
apple,temp-keys {
14+
temp-TW0P {
15+
apple,key-id = "TW0P";
16+
label = "WiFi/BT Module Temp";
17+
};
18+
};
19+
};
20+
};
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Common ISP configuration for Apple silicon platforms.
4+
*
5+
* Copyright The Asahi Linux Contributors
6+
*/
7+
8+
/ {
9+
aliases {
10+
isp = &isp;
11+
};
12+
13+
reserved-memory {
14+
#address-cells = <2>;
15+
#size-cells = <2>;
16+
ranges;
17+
18+
isp_heap: isp-heap {
19+
compatible = "apple,asc-mem";
20+
/* Filled in by bootloder */
21+
reg = <0 0 0 0>;
22+
no-map;
23+
};
24+
};
25+
};
26+
27+
&isp {
28+
memory-region = <&isp_heap>;
29+
memory-region-names = "heap";
30+
status = "okay";
31+
};
32+
33+
&isp_dart0 {
34+
status = "okay";
35+
};
36+
37+
&isp_dart1 {
38+
status = "okay";
39+
};
40+
41+
&isp_dart2 {
42+
status = "okay";
43+
};
44+
45+
&ps_isp_sys {
46+
status = "okay";
47+
};

0 commit comments

Comments
 (0)