Skip to content

Commit 26f6af4

Browse files
committed
Merge branch 'bits/000-devicetree' into asahi-wip
2 parents 6fedb51 + 2eb134c commit 26f6af4

76 files changed

Lines changed: 14049 additions & 52 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

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: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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_hwmon {
9+
power-PSTR {
10+
apple,key-id = "PSTR";
11+
label = "Total System Power";
12+
};
13+
power-PDTR {
14+
apple,key-id = "PDTR";
15+
label = "AC Input Power";
16+
};
17+
power-PMVR {
18+
apple,key-id = "PMVR";
19+
label = "3.8 V Rail Power";
20+
};
21+
temperature-TH0x {
22+
apple,key-id = "TH0x";
23+
label = "NAND Flash Temperature";
24+
};
25+
voltage-VD0R {
26+
apple,key-id = "VD0R";
27+
label = "AC Input Voltage";
28+
};
29+
current-ID0R {
30+
apple,key-id = "ID0R";
31+
label = "AC Input Current";
32+
};
33+
};
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+
* 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_hwmon {
11+
fan-F0Ac {
12+
label = "Fan 1";
13+
};
14+
fan-F1Ac {
15+
apple,key-id = "F1Ac";
16+
label = "Fan 2";
17+
apple,fan-minimum = "F1Mn";
18+
apple,fan-maximum = "F1Mx";
19+
apple,fan-target = "F1Tg";
20+
apple,fan-mode = "F1Md";
21+
};
22+
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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_hwmon {
9+
fan-F0Ac {
10+
apple,key-id = "F0Ac";
11+
label = "Fan";
12+
apple,fan-minimum = "F0Mn";
13+
apple,fan-maximum = "F0Mx";
14+
apple,fan-target = "F0Tg";
15+
apple,fan-mode = "F0Md";
16+
};
17+
};
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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_hwmon {
9+
power-PHPC {
10+
apple,key-id = "PHPC";
11+
label = "Heatpipe Power";
12+
};
13+
temperature-TB0T {
14+
apple,key-id = "TB0T";
15+
label = "Battery Hotspot";
16+
};
17+
temperature-TCHP {
18+
apple,key-id = "TCHP";
19+
label = "Charge Regulator Temp";
20+
};
21+
temperature-TW0P {
22+
apple,key-id = "TW0P";
23+
label = "WiFi/BT Module Temp";
24+
};
25+
voltage-SBAV {
26+
apple,key-id = "SBAV";
27+
label = "Battery Voltage";
28+
};
29+
voltage-VD0R {
30+
apple,key-id = "VD0R";
31+
label = "Charger Input Voltage";
32+
};
33+
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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_hwmon {
12+
temperature-TW0P {
13+
apple,key-id = "TW0P";
14+
label = "WiFi/BT Module Temp";
15+
};
16+
};
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+
};
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+
};
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+
};

0 commit comments

Comments
 (0)