Skip to content

Commit 459b45a

Browse files
kettenisjannau
authored andcommitted
arm: dts: apple: Update Apple M1 device trees
This synchronizes the device trees with those that are in the process of being upstreamed into Linux. These now match the current state of the device trees on the asahi branch of the Asahi Linux github repository. Signed-off-by: Mark Kettenis <[email protected]>
1 parent 655fc2f commit 459b45a

12 files changed

Lines changed: 1859 additions & 295 deletions

arch/arm/dts/isp-common.dtsi

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+
};

arch/arm/dts/isp-imx248.dtsi

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* ISP configuration for platforms with IMX248 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+
/* 1280x720 */
15+
preset0 {
16+
apple,config-index = <0>;
17+
apple,input-size = <1296 736>;
18+
apple,output-size = <1280 720>;
19+
apple,crop = <8 8 1280 720>;
20+
};
21+
/* 960x720 (4:3) */
22+
preset1 {
23+
apple,config-index = <0>;
24+
apple,input-size = <1296 736>;
25+
apple,output-size = <960 720>;
26+
apple,crop = <168 8 960 720>;
27+
};
28+
/* 960x540 (16:9) */
29+
preset2 {
30+
apple,config-index = <0>;
31+
apple,input-size = <1296 736>;
32+
apple,output-size = <960 540>;
33+
apple,crop = <8 8 1280 720>;
34+
};
35+
/* 640x480 (4:3) */
36+
preset3 {
37+
apple,config-index = <0>;
38+
apple,input-size = <1296 736>;
39+
apple,output-size = <640 480>;
40+
apple,crop = <168 8 960 720>;
41+
};
42+
/* 640x360 (16:9) */
43+
preset4 {
44+
apple,config-index = <0>;
45+
apple,input-size = <1296 736>;
46+
apple,output-size = <640 360>;
47+
apple,crop = <8 8 1280 720>;
48+
};
49+
/* 320x180 (16:9) */
50+
preset5 {
51+
apple,config-index = <0>;
52+
apple,input-size = <1296 736>;
53+
apple,output-size = <320 180>;
54+
apple,crop = <8 8 1280 720>;
55+
};
56+
};
57+
};

arch/arm/dts/isp-imx364.dtsi

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* ISP configuration for platforms with IMX364 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 = <0>;
17+
apple,input-size = <1920 1080>;
18+
apple,output-size = <1920 1080>;
19+
apple,crop = <0 0 1920 1080>;
20+
};
21+
/* 1440x720 (4:3) */
22+
preset1 {
23+
apple,config-index = <0>;
24+
apple,input-size = <1920 1080>;
25+
apple,output-size = <1440 1080>;
26+
apple,crop = <240 0 1440 1080>;
27+
};
28+
/* 1280x720 (16:9) */
29+
preset2 {
30+
apple,config-index = <0>;
31+
apple,input-size = <1920 1080>;
32+
apple,output-size = <1280 720>;
33+
apple,crop = <0 0 1920 1080>;
34+
};
35+
/* 960x720 (4:3) */
36+
preset3{
37+
apple,config-index = <0>;
38+
apple,input-size = <1920 1080>;
39+
apple,output-size = <960 720>;
40+
apple,crop = <240 0 1440 1080>;
41+
};
42+
/* 960x540 (16:9) */
43+
preset4 {
44+
apple,config-index = <0>;
45+
apple,input-size = <1920 1080>;
46+
apple,output-size = <960 540>;
47+
apple,crop = <0 0 1920 1080>;
48+
};
49+
/* 640x480 (4:3) */
50+
preset5 {
51+
apple,config-index = <0>;
52+
apple,input-size = <1920 1080>;
53+
apple,output-size = <640 480>;
54+
apple,crop = <240 0 1440 1080>;
55+
};
56+
/* 640x360 (16:9) */
57+
preset6 {
58+
apple,config-index = <0>;
59+
apple,input-size = <1920 1080>;
60+
apple,output-size = <640 360>;
61+
apple,crop = <0 0 1920 1080>;
62+
};
63+
/* 320x180 (16:9) */
64+
preset7 {
65+
apple,config-index = <0>;
66+
apple,input-size = <1920 1080>;
67+
apple,output-size = <320 180>;
68+
apple,crop = <0 0 1920 1080>;
69+
};
70+
};
71+
};

arch/arm/dts/spi1-nvram.dtsi

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Common config for Apple's nvram using a SPI nor flash. This is common on all
4+
* M1 and M2 devices. identically set up identically on all M1 and M2 devicesspi1, spinor and nvram config identical on all devices
5+
*
6+
* Copyright The Asahi Linux Contributors
7+
*/
8+
9+
&spi1 {
10+
status = "okay";
11+
12+
flash@0 {
13+
compatible = "jedec,spi-nor";
14+
reg = <0x0>;
15+
spi-max-frequency = <25000000>;
16+
#address-cells = <1>;
17+
#size-cells = <1>;
18+
19+
partitions {
20+
compatible = "fixed-partitions";
21+
#address-cells = <1>;
22+
#size-cells = <1>;
23+
24+
nvram: partition@700000 {
25+
label = "nvram";
26+
/* To be filled by the loader */
27+
reg = <0x0 0x0>;
28+
status = "disabled";
29+
};
30+
};
31+
};
32+
};

arch/arm/dts/t8103-j274.dts

Lines changed: 41 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@
2121
};
2222
};
2323

24+
&dcp {
25+
apple,connector-type = "HDMI-A";
26+
};
27+
28+
&bluetooth0 {
29+
brcm,board-type = "apple,atlantisb";
30+
};
31+
2432
&wifi0 {
2533
brcm,board-type = "apple,atlantisb";
2634
};
@@ -45,85 +53,84 @@
4553

4654
&port01 {
4755
bus-range = <2 2>;
56+
status = "okay";
4857
};
4958

5059
&port02 {
5160
bus-range = <3 3>;
61+
status = "okay";
5262
ethernet0: ethernet@0,0 {
5363
reg = <0x30000 0x0 0x0 0x0 0x0>;
5464
/* To be filled by the loader */
5565
local-mac-address = [00 10 18 00 00 00];
5666
};
5767
};
5868

59-
&i2c1 {
60-
clock-frequency = <50000>;
69+
&pcie0_dart_1 {
70+
status = "okay";
71+
};
72+
73+
&pcie0_dart_2 {
74+
status = "okay";
75+
};
6176

77+
&i2c1 {
6278
speaker_amp: codec@31 {
6379
compatible = "ti,tas5770l", "ti,tas2770";
6480
reg = <0x31>;
65-
reset-gpios = <&pinctrl_ap 181 GPIO_ACTIVE_HIGH>;
81+
shutdown-gpios = <&pinctrl_ap 181 GPIO_ACTIVE_HIGH>;
6682
#sound-dai-cells = <0>;
83+
ti,imon-slot-no = <0>;
84+
ti,vmon-slot-no = <2>;
85+
ti,sdout-zero-fill;
6786
};
6887
};
6988

7089
&i2c2 {
7190
status = "okay";
7291

73-
clock-frequency = <50000>;
74-
7592
jack_codec: codec@48 {
76-
compatible = "cirrus,cs42l83", "cirrus,cs42l42";
93+
compatible = "cirrus,cs42l83";
7794
reg = <0x48>;
7895
reset-gpios = <&pinctrl_nub 11 GPIO_ACTIVE_HIGH>;
7996
interrupt-parent = <&pinctrl_ap>;
8097
interrupts = <183 IRQ_TYPE_LEVEL_LOW>;
8198
#sound-dai-cells = <0>;
8299
cirrus,ts-inv = <1>;
100+
sound-name-prefix = "Jack";
83101
};
84102
};
85103

86104
/ {
87105
sound {
88-
compatible = "simple-audio-card";
89-
simple-audio-card,name = "Mac mini integrated audio";
90-
#address-cells = <1>;
91-
#size-cells = <0>;
92-
93-
simple-audio-card,dai-link@0 {
94-
reg = <0>;
95-
format = "left_j";
96-
tdm-slot-width = <32>;
97-
mclk-fs = <64>;
98-
99-
link0_cpu: cpu {
106+
compatible = "apple,j274-macaudio", "apple,macaudio";
107+
model = "Mac mini J274";
108+
109+
dai-link@0 {
110+
link-name = "Speaker";
111+
112+
cpu {
100113
sound-dai = <&mca 0>;
101-
bitclock-master;
102-
frame-master;
103114
};
104-
105-
link0_codec: codec {
115+
codec {
106116
sound-dai = <&speaker_amp>;
107117
};
108118
};
109119

110-
simple-audio-card,dai-link@1 {
111-
bitclock-inversion;
112-
frame-inversion;
113-
reg = <1>;
114-
format = "i2s";
115-
mclk-fs = <64>;
116-
tdm-slot-width = <32>;
120+
dai-link@1 {
121+
link-name = "Headphone Jack";
117122

118-
link1_cpu: cpu {
123+
cpu {
119124
sound-dai = <&mca 2>;
120-
bitclock-master;
121-
frame-master;
122125
};
123-
124-
link1_codec: codec {
126+
codec {
125127
sound-dai = <&jack_codec>;
126128
};
127129
};
130+
128131
};
129132
};
133+
134+
&gpu {
135+
apple,perf-base-pstate = <3>;
136+
};

0 commit comments

Comments
 (0)