Skip to content

Commit 2d5ce3f

Browse files
committed
arm64: dts: apple: t8112: Initial t8112 (M2) device trees
This adds device trees for the following devices: - Macbook Air (M2, 2022) - Macbook Pro 13" (M2, 2022) - Mac mini (M2, 2023) This brings the hardware support of the machines to the same level as M1 and M1 Pro / Max / Ultra. Supported hardware include NVMe, PCIe, serial, pinctrl/gpio, I2C, iommu, watchdog, admac, nco, cpufreq, boot framebuffer for laptop panels and the interrupt controller. The ethernet LAN device on the M2 Mac mini is the only working PCIe device. The Wlan/BT devices are powered off and controlled by the not yet supported SMC. The ASMedia xHCI on the M2 Mac mini requires firmware to be loaded at startup. The main missing hardware support to make these devices useful are the integrated USB 2/3/4 controller, keyboard and trackpad on the laptops and SMC to power the PCIe Wlan/BT device on. The M2 Mac mini has currently no working display output. Due to changes in the display pipeline it is currently not possible to initialize the HDMI output in the bootloader. Co-developed-by: Janne Grunau <j@jannau.net> Signed-off-by: Janne Grunau <j@jannau.net> Reviewed-by: Sven Peter <sven@svenpeter.dev> Signed-off-by: Hector Martin <marcan@marcan.st>
1 parent 828fe6b commit 2d5ce3f

7 files changed

Lines changed: 2305 additions & 0 deletions

File tree

arch/arm64/boot/dts/apple/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ dtb-$(CONFIG_ARCH_APPLE) += t6000-j316s.dtb
1010
dtb-$(CONFIG_ARCH_APPLE) += t6001-j316c.dtb
1111
dtb-$(CONFIG_ARCH_APPLE) += t6001-j375c.dtb
1212
dtb-$(CONFIG_ARCH_APPLE) += t6002-j375d.dtb
13+
dtb-$(CONFIG_ARCH_APPLE) += t8112-j413.dtb
14+
dtb-$(CONFIG_ARCH_APPLE) += t8112-j473.dtb
15+
dtb-$(CONFIG_ARCH_APPLE) += t8112-j493.dtb
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple MacBook Air (M2, 2022)
4+
*
5+
* target-type: J413
6+
*
7+
* Copyright The Asahi Linux Contributors
8+
*/
9+
10+
/dts-v1/;
11+
12+
#include "t8112.dtsi"
13+
#include "t8112-jxxx.dtsi"
14+
15+
/ {
16+
compatible = "apple,j413", "apple,t8112", "apple,arm-platform";
17+
model = "Apple MacBook Air (13-inch, M2, 2022)";
18+
19+
aliases {
20+
bluetooth0 = &bluetooth0;
21+
wifi0 = &wifi0;
22+
};
23+
};
24+
25+
/*
26+
* Force the bus number assignments so that we can declare some of the
27+
* on-board devices and properties that are populated by the bootloader
28+
* (such as MAC addresses).
29+
*/
30+
&port00 {
31+
bus-range = <1 1>;
32+
wifi0: wifi@0,0 {
33+
compatible = "pci14e4,4433";
34+
reg = <0x10000 0x0 0x0 0x0 0x0>;
35+
/* To be filled by the loader */
36+
local-mac-address = [00 10 18 00 00 10];
37+
apple,antenna-sku = "XX";
38+
brcm,board-type = "apple,hokkaido";
39+
};
40+
41+
bluetooth0: bluetooth@0,1 {
42+
compatible = "pci14e4,5f71";
43+
reg = <0x10100 0x0 0x0 0x0 0x0>;
44+
/* To be filled by the loader */
45+
local-bd-address = [00 00 00 00 00 00];
46+
brcm,board-type = "apple,hokkaido";
47+
};
48+
};
49+
50+
&i2c0 {
51+
/* MagSafe port */
52+
hpm5: usb-pd@3a {
53+
compatible = "apple,cd321x";
54+
reg = <0x3a>;
55+
interrupt-parent = <&pinctrl_ap>;
56+
interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
57+
interrupt-names = "irq";
58+
};
59+
};
60+
61+
&i2c4 {
62+
status = "okay";
63+
};
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple Mac mini (M2, 2023)
4+
*
5+
* target-type: J473
6+
*
7+
* Copyright The Asahi Linux Contributors
8+
*/
9+
10+
/dts-v1/;
11+
12+
#include "t8112.dtsi"
13+
#include "t8112-jxxx.dtsi"
14+
15+
/ {
16+
compatible = "apple,j473", "apple,t8112", "apple,arm-platform";
17+
model = "Apple Mac mini (M2, 2023)";
18+
19+
aliases {
20+
ethernet0 = &ethernet0;
21+
};
22+
};
23+
24+
/*
25+
* Force the bus number assignments so that we can declare some of the
26+
* on-board devices and properties that are populated by the bootloader
27+
* (such as MAC addresses).
28+
*/
29+
&port00 {
30+
bus-range = <1 1>;
31+
};
32+
33+
&port01 {
34+
bus-range = <2 2>;
35+
status = "okay";
36+
};
37+
38+
&port02 {
39+
bus-range = <3 3>;
40+
status = "okay";
41+
ethernet0: ethernet@0,0 {
42+
reg = <0x30000 0x0 0x0 0x0 0x0>;
43+
/* To be filled by the loader */
44+
local-mac-address = [00 10 18 00 00 00];
45+
};
46+
};
47+
48+
&pcie1_dart {
49+
status = "okay";
50+
};
51+
52+
&pcie2_dart {
53+
status = "okay";
54+
};
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple MacBook Pro (13-inch, M1, 2022)
4+
*
5+
* target-type: J493
6+
*
7+
* Copyright The Asahi Linux Contributors
8+
*/
9+
10+
/dts-v1/;
11+
12+
#include "t8112.dtsi"
13+
#include "t8112-jxxx.dtsi"
14+
15+
/ {
16+
compatible = "apple,j493", "apple,t8112", "apple,arm-platform";
17+
model = "Apple MacBook Pro (13-inch, M2, 2022)";
18+
19+
aliases {
20+
bluetooth0 = &bluetooth0;
21+
wifi0 = &wifi0;
22+
};
23+
};
24+
25+
/*
26+
* Force the bus number assignments so that we can declare some of the
27+
* on-board devices and properties that are populated by the bootloader
28+
* (such as MAC addresses).
29+
*/
30+
&port00 {
31+
bus-range = <1 1>;
32+
wifi0: wifi@0,0 {
33+
compatible = "pci14e4,4425";
34+
reg = <0x10000 0x0 0x0 0x0 0x0>;
35+
/* To be filled by the loader */
36+
local-mac-address = [00 00 00 00 00 00];
37+
apple,antenna-sku = "XX";
38+
brcm,board-type = "apple,kyushu";
39+
};
40+
41+
bluetooth0: bluetooth@0,1 {
42+
compatible = "pci14e4,5f69";
43+
reg = <0x10100 0x0 0x0 0x0 0x0>;
44+
/* To be filled by the loader */
45+
local-bd-address = [00 00 00 00 00 00];
46+
brcm,board-type = "apple,kyushu";
47+
};
48+
};
49+
50+
&i2c4 {
51+
status = "okay";
52+
};
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple M2 MacBook Air/Pro (M2, 2022)
4+
*
5+
* This file contains parts common to all Apple M2 devices using the t8112.
6+
*
7+
* target-type: J493, J413
8+
*
9+
* Copyright The Asahi Linux Contributors
10+
*/
11+
12+
/ {
13+
aliases {
14+
serial0 = &serial0;
15+
serial2 = &serial2;
16+
};
17+
18+
chosen {
19+
#address-cells = <2>;
20+
#size-cells = <2>;
21+
ranges;
22+
23+
stdout-path = "serial0";
24+
25+
framebuffer0: framebuffer@0 {
26+
compatible = "apple,simple-framebuffer", "simple-framebuffer";
27+
reg = <0 0 0 0>; /* To be filled by loader */
28+
/* Format properties will be added by loader */
29+
status = "disabled";
30+
};
31+
};
32+
33+
memory@800000000 {
34+
device_type = "memory";
35+
reg = <0x8 0 0x2 0>; /* To be filled by loader */
36+
};
37+
};
38+
39+
&serial0 {
40+
status = "okay";
41+
};
42+
43+
&serial2 {
44+
status = "okay";
45+
};
46+
47+
&i2c0 {
48+
status = "okay";
49+
50+
hpm0: usb-pd@38 {
51+
compatible = "apple,cd321x";
52+
reg = <0x38>;
53+
interrupt-parent = <&pinctrl_ap>;
54+
interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
55+
interrupt-names = "irq";
56+
};
57+
58+
hpm1: usb-pd@3f {
59+
compatible = "apple,cd321x";
60+
reg = <0x3f>;
61+
interrupt-parent = <&pinctrl_ap>;
62+
interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
63+
interrupt-names = "irq";
64+
};
65+
};
66+
67+
&i2c1 {
68+
status = "okay";
69+
};
70+
71+
&i2c2 {
72+
status = "okay";
73+
};
74+
75+
&i2c3 {
76+
status = "okay";
77+
};
78+
79+
&nco_clkref {
80+
clock-frequency = <900000000>;
81+
};

0 commit comments

Comments
 (0)