Skip to content

Commit 44a3984

Browse files
kettenisjannau
authored andcommitted
arm: dts: apple: Add Apple M1 Pro/Max/Ultra device trees
Device trees for the 14" and 16" MacBook Pro and the Mac Studio. Taken from the asahi branch of the Asahi Linux github repository. Signed-off-by: Mark Kettenis <[email protected]>
1 parent 459b45a commit 44a3984

21 files changed

Lines changed: 7997 additions & 0 deletions

arch/arm/dts/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ dtb-$(CONFIG_TARGET_A3Y17LTE) += exynos78x0-axy17lte.dtb
3333
dtb-$(CONFIG_TARGET_A7Y17LTE) += exynos78x0-axy17lte.dtb
3434

3535
dtb-$(CONFIG_ARCH_APPLE) += \
36+
t6000-j314s.dtb \
37+
t6000-j316s.dtb \
38+
t6001-j314c.dtb \
39+
t6001-j316c.dtb \
40+
t6001-j375c.dtb \
41+
t6002-j375d.dtb \
3642
t8103-j274.dtb \
3743
t8103-j293.dtb \
3844
t8103-j313.dtb \

arch/arm/dts/isp-imx558.dtsi

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+
* ISP configuration for platforms with IMX558 sensor.
4+
*
5+
* Copyright The Asahi Linux Contributors
6+
*/
7+
8+
#include "isp-common.dtsi"
9+
10+
&isp {
11+
apple,temporal-filter = <0>;
12+
13+
sensor-presets {
14+
/* 1920x1080 */
15+
preset0 {
16+
apple,config-index = <1>;
17+
apple,input-size = <1920 1080>;
18+
apple,output-size = <1920 1080>;
19+
apple,crop = <0 0 1920 1080>;
20+
};
21+
/* 1080x1920 */
22+
preset1 {
23+
apple,config-index = <2>;
24+
apple,input-size = <1080 1920>;
25+
apple,output-size = <1080 1920>;
26+
apple,crop = <0 0 1080 1920>;
27+
};
28+
/* 1760x1328 */
29+
preset2 {
30+
apple,config-index = <3>;
31+
apple,input-size = <1760 1328>;
32+
apple,output-size = <1760 1328>;
33+
apple,crop = <0 0 1760 1328>;
34+
};
35+
/* 1328x1760 */
36+
preset3 {
37+
apple,config-index = <4>;
38+
apple,input-size = <1328 1760>;
39+
apple,output-size = < 1328 1760>;
40+
apple,crop = <0 0 1328 1760>;
41+
};
42+
/* 1152x1152 */
43+
preset4 {
44+
apple,config-index = <5>;
45+
apple,input-size = <1152 1152>;
46+
apple,output-size = <1152 1152>;
47+
apple,crop = <0 0 1152 1152>;
48+
};
49+
/* 1280x720 */
50+
preset5 {
51+
apple,config-index = <1>;
52+
apple,input-size = <1920 1080>;
53+
apple,output-size = <1280 720>;
54+
apple,crop = <0 0 1920 1080>;
55+
};
56+
/* 720x1280 */
57+
preset6 {
58+
apple,config-index = <2>;
59+
apple,input-size = <1080 1920>;
60+
apple,output-size = <720 1280>;
61+
apple,crop = <0 0 1080 1920>;
62+
};
63+
/* 1280x960 */
64+
preset7 {
65+
apple,config-index = <3>;
66+
apple,input-size = <1760 1328>;
67+
apple,output-size = <1280 960>;
68+
apple,crop = <0 4 1760 1320>;
69+
};
70+
/* 960x1280 */
71+
preset8 {
72+
apple,config-index = <4>;
73+
apple,input-size = <1328 1760>;
74+
apple,output-size = <960 1280>;
75+
apple,crop = <4 0 1320 1760>;
76+
};
77+
/* 640x480 */
78+
preset9 {
79+
apple,config-index = <3>;
80+
apple,input-size = <1760 1328>;
81+
apple,output-size = <640 480>;
82+
apple,crop = <0 4 1760 1320>;
83+
};
84+
/* 480x640 */
85+
preset10 {
86+
apple,config-index = <4>;
87+
apple,input-size = <1328 1760>;
88+
apple,output-size = <480 640>;
89+
apple,crop = <4 0 1320 1760>;
90+
};
91+
};
92+
};

arch/arm/dts/multi-die-cpp.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/* SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
*
3+
* C preprocessor macros for t600x multi die support.
4+
*/
5+
6+
#ifndef __DTS_APPLE_MULTI_DIE_CPP_H
7+
#define __DTS_APPLE_MULTI_DIE_CPP_H
8+
9+
#ifndef __stringify
10+
#define __stringify_1(x...) #x
11+
#define __stringify(x...) __stringify_1(x)
12+
#endif
13+
14+
#ifndef __concat
15+
#define __concat_1(x, y...) x ## y
16+
#define __concat(x, y...) __concat_1(x, y)
17+
#endif
18+
19+
#define DIE_NODE(a) __concat(a, DIE)
20+
#define DIE_LABEL(a) __stringify(__concat(a, DIE))
21+
22+
#endif /* !__DTS_APPLE_MULTI_DIE_CPP_H */

arch/arm/dts/t6000-j314s.dts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* MacBook Pro (14-inch, M1 Pro, 2021)
4+
*
5+
* target-type: J314s
6+
*
7+
* Copyright The Asahi Linux Contributors
8+
*/
9+
10+
/dts-v1/;
11+
12+
#include "t6000.dtsi"
13+
#include "t600x-j314-j316.dtsi"
14+
15+
/ {
16+
compatible = "apple,j314s", "apple,t6000", "apple,arm-platform";
17+
model = "Apple MacBook Pro (14-inch, M1 Pro, 2021)";
18+
};
19+
20+
&wifi0 {
21+
brcm,board-type = "apple,maldives";
22+
};
23+
24+
&bluetooth0 {
25+
brcm,board-type = "apple,maldives";
26+
};
27+
28+
&panel {
29+
compatible = "apple,panel-j314", "apple,panel-mini-led", "apple,panel";
30+
width-mm = <302>;
31+
height-mm = <196>;
32+
adj-height-mm = <189>;
33+
};
34+
35+
&sound {
36+
compatible = "apple,j314-macaudio", "apple,macaudio";
37+
model = "MacBook Pro J314";
38+
};

arch/arm/dts/t6000-j316s.dts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* MacBook Pro (16-inch, M1 Pro, 2021)
4+
*
5+
* target-type: J316s
6+
*
7+
* Copyright The Asahi Linux Contributors
8+
*/
9+
10+
/dts-v1/;
11+
12+
#include "t6000.dtsi"
13+
#include "t600x-j314-j316.dtsi"
14+
15+
/ {
16+
compatible = "apple,j316s", "apple,t6000", "apple,arm-platform";
17+
model = "Apple MacBook Pro (16-inch, M1 Pro, 2021)";
18+
};
19+
20+
&wifi0 {
21+
brcm,board-type = "apple,madagascar";
22+
};
23+
24+
&bluetooth0 {
25+
brcm,board-type = "apple,madagascar";
26+
};
27+
28+
&panel {
29+
compatible = "apple,panel-j316", "apple,panel-mini-led", "apple,panel";
30+
width-mm = <346>;
31+
height-mm = <223>;
32+
adj-height-mm = <216>;
33+
};
34+
35+
&sound {
36+
compatible = "apple,j316-macaudio", "apple,macaudio";
37+
model = "MacBook Pro J316";
38+
};

arch/arm/dts/t6000.dtsi

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 T6000 "M1 Pro" SoC
4+
*
5+
* Other names: H13J, "Jade Chop"
6+
*
7+
* Copyright The Asahi Linux Contributors
8+
*/
9+
10+
/* This chip is just a cut down version of t6001, so include it and disable the missing parts */
11+
12+
#define GPU_REPEAT(x) <x x>
13+
14+
#include "t6001.dtsi"
15+
16+
/ {
17+
compatible = "apple,t6000", "apple,arm-platform";
18+
};
19+
20+
/delete-node/ &pmgr_south;
21+
22+
&gpu {
23+
compatible = "apple,agx-t6000", "apple,agx-g13x";
24+
};

arch/arm/dts/t6001-j314c.dts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* MacBook Pro (14-inch, M1 Max, 2021)
4+
*
5+
* target-type: J314c
6+
*
7+
* Copyright The Asahi Linux Contributors
8+
*/
9+
10+
/dts-v1/;
11+
12+
#include "t6001.dtsi"
13+
#include "t600x-j314-j316.dtsi"
14+
15+
/ {
16+
compatible = "apple,j314c", "apple,t6001", "apple,arm-platform";
17+
model = "Apple MacBook Pro (14-inch, M1 Max, 2021)";
18+
};
19+
20+
&wifi0 {
21+
brcm,board-type = "apple,maldives";
22+
};
23+
24+
&bluetooth0 {
25+
brcm,board-type = "apple,maldives";
26+
};
27+
28+
&panel {
29+
compatible = "apple,panel-j314", "apple,panel-mini-led", "apple,panel";
30+
width-mm = <302>;
31+
height-mm = <196>;
32+
adj-height-mm = <189>;
33+
};
34+
35+
&sound {
36+
compatible = "apple,j314-macaudio", "apple,macaudio";
37+
model = "MacBook Pro J314";
38+
};

arch/arm/dts/t6001-j316c.dts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* MacBook Pro (16-inch, M1 Max, 2021)
4+
*
5+
* target-type: J316c
6+
*
7+
* Copyright The Asahi Linux Contributors
8+
*/
9+
10+
/dts-v1/;
11+
12+
#include "t6001.dtsi"
13+
#include "t600x-j314-j316.dtsi"
14+
15+
/ {
16+
compatible = "apple,j316c", "apple,t6001", "apple,arm-platform";
17+
model = "Apple MacBook Pro (16-inch, M1 Max, 2021)";
18+
};
19+
20+
&wifi0 {
21+
brcm,board-type = "apple,madagascar";
22+
};
23+
24+
&bluetooth0 {
25+
brcm,board-type = "apple,madagascar";
26+
};
27+
28+
&panel {
29+
compatible = "apple,panel-j316", "apple,panel-mini-led", "apple,panel";
30+
width-mm = <346>;
31+
height-mm = <223>;
32+
adj-height-mm = <216>;
33+
};
34+
35+
&sound {
36+
compatible = "apple,j316-macaudio", "apple,macaudio";
37+
model = "MacBook Pro J316";
38+
};

arch/arm/dts/t6001-j375c.dts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Mac Studio (M1 Max, 2022)
4+
*
5+
* target-type: J375c
6+
*
7+
* Copyright The Asahi Linux Contributors
8+
*/
9+
10+
/dts-v1/;
11+
12+
#include "t6001.dtsi"
13+
#include "t600x-j375.dtsi"
14+
15+
/ {
16+
compatible = "apple,j375c", "apple,t6001", "apple,arm-platform";
17+
model = "Apple Mac Studio (M1 Max, 2022)";
18+
};
19+
20+
&sound {
21+
compatible = "apple,j375-macaudio", "apple,macaudio";
22+
model = "Mac Studio J375";
23+
};
24+
25+
&pinctrl_ap {
26+
usb_hub_oe-hog {
27+
gpio-hog;
28+
gpios = <230 0>;
29+
input;
30+
line-name = "usb-hub-oe";
31+
};
32+
33+
usb_hub_rst-hog {
34+
gpio-hog;
35+
gpios = <231 GPIO_ACTIVE_LOW>;
36+
output-low;
37+
line-name = "usb-hub-rst";
38+
};
39+
};

0 commit comments

Comments
 (0)