Skip to content

Commit cc7e403

Browse files
committed
arm64: dts: apple: Add initial t602x device trees
Signed-off-by: Hector Martin <marcan@marcan.st>
1 parent 0525e21 commit cc7e403

18 files changed

Lines changed: 4428 additions & 3 deletions

arch/arm64/boot/dts/apple/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@ dtb-$(CONFIG_ARCH_APPLE) += t6002-j375d.dtb
1313
dtb-$(CONFIG_ARCH_APPLE) += t8112-j413.dtb
1414
dtb-$(CONFIG_ARCH_APPLE) += t8112-j473.dtb
1515
dtb-$(CONFIG_ARCH_APPLE) += t8112-j493.dtb
16+
dtb-$(CONFIG_ARCH_APPLE) += t6020-j414s.dtb
17+
dtb-$(CONFIG_ARCH_APPLE) += t6021-j414c.dtb
18+
dtb-$(CONFIG_ARCH_APPLE) += t6020-j416s.dtb
19+
dtb-$(CONFIG_ARCH_APPLE) += t6021-j416c.dtb
20+
dtb-$(CONFIG_ARCH_APPLE) += t6020-j474s.dtb

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@
221221
power-domains = <&ps_disp0_cpu0>;
222222
resets = <&ps_disp0_cpu0>;
223223
clocks = <&clk_disp0>;
224-
apple,asc-dram-mask = <0x1f0 0x00000000>;
224+
apple,asc-dram-mask = <0>;
225225
apple,piodma-mapper = <&disp0_piodma>;
226226
phandle = <&dcp>;
227227
};

arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@
265265
};
266266

267267
&spi1 {
268+
status = "okay";
269+
268270
flash@0 {
269271
compatible = "jedec,spi-nor";
270272
reg = <0x0>;
@@ -277,14 +279,15 @@
277279
#address-cells = <1>;
278280
#size-cells = <1>;
279281

280-
partition@700000 {
282+
nvram: partition@700000 {
281283
label = "nvram";
282284
reg = <0x700000 0x20000>;
283285
};
284286
};
285287
};
286288
};
287289

290+
#ifndef NO_SPI_TRACKPAD
288291
&spi3 {
289292
status = "okay";
290293

@@ -305,6 +308,7 @@
305308
interrupts-extended = <&pinctrl_nub 6 IRQ_TYPE_LEVEL_LOW>;
306309
};
307310
};
311+
#endif
308312

309313
/* PCIe devices */
310314
&port00 {
@@ -331,6 +335,7 @@
331335
/* SD card reader */
332336
bus-range = <2 2>;
333337
pwren-gpios = <&smc_gpio 26 GPIO_ACTIVE_HIGH>;
338+
status = "okay";
334339
sdhci0: mmc@0,0 {
335340
compatible = "pci17a0,9755";
336341
reg = <0x20000 0x0 0x0 0x0 0x0>;
@@ -343,6 +348,10 @@
343348
status = "okay";
344349
};
345350

351+
&pcie0_dart_1 {
352+
status = "okay";
353+
};
354+
346355
/* USB controllers */
347356
&dwc3_0 {
348357
port {

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@
287287
};
288288

289289
/ {
290-
sound {
290+
sound: sound {
291291
compatible = "apple,j375-macaudio", "apple,macaudio";
292292
model = "Mac Studio J375";
293293

@@ -345,6 +345,7 @@
345345
};
346346
};
347347

348+
#ifndef NO_PCIE_SDHC
348349
&port01 {
349350
/* SD card reader */
350351
bus-range = <2 2>;
@@ -356,6 +357,7 @@
356357
wp-inverted;
357358
};
358359
};
360+
#endif
359361

360362
&port02 {
361363
/* 10 Gbit Ethernet */
@@ -384,6 +386,7 @@
384386
status = "okay";
385387
};
386388

389+
#ifndef NO_GPU
387390
&gpu {
388391
apple,avg-power-ki-only = <0.6375>;
389392
apple,avg-power-kp = <0.58>;
@@ -392,3 +395,4 @@
392395
apple,ppm-ki = <5.8>;
393396
apple,ppm-kp = <0.355>;
394397
};
398+
#endif
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* MacBook Pro (14-inch, M2 Pro, 2023)
4+
*
5+
* target-type: J414s
6+
*
7+
* Copyright The Asahi Linux Contributors
8+
*/
9+
10+
/dts-v1/;
11+
12+
#include "t6020.dtsi"
13+
#include "t602x-j414-j416.dtsi"
14+
15+
/ {
16+
compatible = "apple,j414s", "apple,t6020", "apple,arm-platform";
17+
model = "Apple MacBook Pro (14-inch, M2 Pro, 2023)";
18+
};
19+
20+
&wifi0 {
21+
brcm,board-type = "apple,tokara";
22+
};
23+
24+
&bluetooth0 {
25+
brcm,board-type = "apple,tokara";
26+
};
27+
28+
&panel {
29+
compatible = "apple,panel-j414", "apple,panel-mini-led", "apple,panel";
30+
width-mm = <302>;
31+
height-mm = <196>;
32+
adj-height-mm = <189>;
33+
};
34+
35+
&sound {
36+
model = "MacBook Pro J414";
37+
};
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* MacBook Pro (16-inch, M2 Pro, 2023)
4+
*
5+
* target-type: J416s
6+
*
7+
* Copyright The Asahi Linux Contributors
8+
*/
9+
10+
/dts-v1/;
11+
12+
#include "t6020.dtsi"
13+
#include "t602x-j414-j416.dtsi"
14+
15+
/ {
16+
compatible = "apple,j416s", "apple,t6020", "apple,arm-platform";
17+
model = "Apple MacBook Pro (16-inch, M2 Pro, 2023)";
18+
};
19+
20+
&wifi0 {
21+
brcm,board-type = "apple,amami";
22+
};
23+
24+
&bluetooth0 {
25+
brcm,board-type = "apple,amami";
26+
};
27+
28+
&panel {
29+
compatible = "apple,panel-j416", "apple,panel-mini-led", "apple,panel";
30+
width-mm = <346>;
31+
height-mm = <223>;
32+
adj-height-mm = <216>;
33+
};
34+
35+
&sound {
36+
model = "MacBook Pro J416";
37+
};
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Mac Mini (M2 Pro, 2023)
4+
*
5+
* target-type: J474s
6+
*
7+
* Copyright The Asahi Linux Contributors
8+
*/
9+
10+
/dts-v1/;
11+
12+
#include "t6020.dtsi"
13+
14+
/*
15+
* These model is very similar to the previous generation Mac Studio, other than
16+
* the GPIO indices.
17+
*/
18+
19+
#define NO_PCIE_SDHC
20+
#define NO_GPU
21+
#include "t600x-j375.dtsi"
22+
23+
/ {
24+
compatible = "apple,j474s", "apple,t6020", "apple,arm-platform";
25+
model = "Apple Mac Mini (M2 Pro, 2023)";
26+
27+
aliases {
28+
ethernet0 = &ethernet0;
29+
};
30+
};
31+
32+
&hpm0 {
33+
interrupts = <44 IRQ_TYPE_LEVEL_LOW>;
34+
};
35+
36+
&hpm1 {
37+
interrupts = <44 IRQ_TYPE_LEVEL_LOW>;
38+
};
39+
40+
&hpm2 {
41+
interrupts = <44 IRQ_TYPE_LEVEL_LOW>;
42+
};
43+
44+
&hpm3 {
45+
interrupts = <44 IRQ_TYPE_LEVEL_LOW>;
46+
};
47+
48+
&wifi0 {
49+
compatible = "pci14e4,4434";
50+
brcm,board-type = "apple,tasmania";
51+
};
52+
53+
&bluetooth0 {
54+
compatible = "pci14e4,5f72";
55+
brcm,board-type = "apple,tasmania";
56+
};
57+
58+
/* PCIe devices */
59+
&port00 {
60+
pwren-gpios = <&smc_gpio 13 GPIO_ACTIVE_HIGH>;
61+
};
62+
63+
&port02 {
64+
/* 10 Gbit Ethernet */
65+
bus-range = <3 3>;
66+
status = "okay";
67+
ethernet0: ethernet@0,0 {
68+
reg = <0x30000 0x0 0x0 0x0 0x0>;
69+
/* To be filled by the loader */
70+
local-mac-address = [00 10 18 00 00 00];
71+
};
72+
};
73+
74+
&port03 {
75+
/* USB xHCI */
76+
pwren-gpios = <&smc_gpio 19 GPIO_ACTIVE_HIGH>;
77+
};
78+
79+
80+
&speaker {
81+
shutdown-gpios = <&pinctrl_ap 57 GPIO_ACTIVE_HIGH>;
82+
interrupts-extended = <&pinctrl_ap 58 IRQ_TYPE_LEVEL_LOW>;
83+
};
84+
85+
&jack_codec {
86+
reset-gpios = <&pinctrl_nub 8 GPIO_ACTIVE_HIGH>;
87+
interrupts-extended = <&pinctrl_ap 59 IRQ_TYPE_LEVEL_LOW>;
88+
};
89+
90+
&sound {
91+
model = "Mac mini J474";
92+
};
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple T6020 "M2 Pro" SoC
4+
*
5+
* Other names: H14J, "Rhodes Chop"
6+
*
7+
* Copyright The Asahi Linux Contributors
8+
*/
9+
10+
/* This chip is just a cut down version of t6021, so include it and disable the missing parts */
11+
12+
#define GPU_REPEAT(x) <x x>
13+
14+
#include "t6021.dtsi"
15+
16+
/ {
17+
compatible = "apple,t6020", "apple,arm-platform";
18+
};
19+
20+
/delete-node/ &pmgr_south;
21+
22+
&gpu {
23+
compatible = "apple,agx-t6020", "apple,agx-g14x";
24+
};
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* MacBook Pro (14-inch, M2 Max, 2023)
4+
*
5+
* target-type: J414c
6+
*
7+
* Copyright The Asahi Linux Contributors
8+
*/
9+
10+
/dts-v1/;
11+
12+
#include "t6021.dtsi"
13+
#include "t602x-j414-j416.dtsi"
14+
15+
/ {
16+
compatible = "apple,j414c", "apple,t6021", "apple,arm-platform";
17+
model = "Apple MacBook Pro (14-inch, M2 Max, 2023)";
18+
};
19+
20+
&wifi0 {
21+
brcm,board-type = "apple,tokara";
22+
};
23+
24+
&bluetooth0 {
25+
brcm,board-type = "apple,tokara";
26+
};
27+
28+
&panel {
29+
compatible = "apple,panel-j414", "apple,panel-mini-led", "apple,panel";
30+
width-mm = <302>;
31+
height-mm = <196>;
32+
adj-height-mm = <189>;
33+
};
34+
35+
&sound {
36+
model = "MacBook Pro J414";
37+
};
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* MacBook Pro (16-inch, M2 Max, 2022)
4+
*
5+
* target-type: J416c
6+
*
7+
* Copyright The Asahi Linux Contributors
8+
*/
9+
10+
/dts-v1/;
11+
12+
#include "t6021.dtsi"
13+
#include "t602x-j414-j416.dtsi"
14+
15+
/ {
16+
compatible = "apple,j416c", "apple,t6021", "apple,arm-platform";
17+
model = "Apple MacBook Pro (16-inch, M2 Max, 2023)";
18+
};
19+
20+
/* This machine model (only) has two extra boost CPU P-states */
21+
&avalanche_opp {
22+
opp18 {
23+
opp-hz = /bits/ 64 <3528000000>;
24+
opp-level = <18>;
25+
clock-latency-ns = <67000>;
26+
turbo-mode;
27+
};
28+
opp19 {
29+
opp-hz = /bits/ 64 <3696000000>;
30+
opp-level = <19>;
31+
clock-latency-ns = <67000>;
32+
turbo-mode;
33+
};
34+
};
35+
36+
&wifi0 {
37+
brcm,board-type = "apple,amami";
38+
};
39+
40+
&bluetooth0 {
41+
brcm,board-type = "apple,amami";
42+
};
43+
44+
&panel {
45+
compatible = "apple,panel-j416", "apple,panel-mini-led", "apple,panel";
46+
width-mm = <346>;
47+
height-mm = <223>;
48+
adj-height-mm = <216>;
49+
};
50+
51+
&sound {
52+
model = "MacBook Pro J416";
53+
};

0 commit comments

Comments
 (0)