Skip to content

Commit dd621dd

Browse files
jannaumarcan
authored andcommitted
arm64: dts: apple: Add devicetree for Macbook Air (15-inch, M2, 2023)
Signed-off-by: Janne Grunau <j@jannau.net>
1 parent 9b17a67 commit dd621dd

2 files changed

Lines changed: 240 additions & 0 deletions

File tree

arch/arm64/boot/dts/apple/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ dtb-$(CONFIG_ARCH_APPLE) += t6001-j316c.dtb
1111
dtb-$(CONFIG_ARCH_APPLE) += t6001-j375c.dtb
1212
dtb-$(CONFIG_ARCH_APPLE) += t6002-j375d.dtb
1313
dtb-$(CONFIG_ARCH_APPLE) += t8112-j413.dtb
14+
dtb-$(CONFIG_ARCH_APPLE) += t8112-j415.dtb
1415
dtb-$(CONFIG_ARCH_APPLE) += t8112-j473.dtb
1516
dtb-$(CONFIG_ARCH_APPLE) += t8112-j493.dtb
1617
dtb-$(CONFIG_ARCH_APPLE) += t6020-j414s.dtb
Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple MacBook Air (15-inchl, M2, 2023)
4+
*
5+
* target-type: J415
6+
*
7+
* Copyright The Asahi Linux Contributors
8+
*/
9+
10+
/dts-v1/;
11+
12+
#include "t8112.dtsi"
13+
#include "t8112-jxxx.dtsi"
14+
#include <dt-bindings/leds/common.h>
15+
16+
/ {
17+
compatible = "apple,j415", "apple,t8112", "apple,arm-platform";
18+
model = "Apple MacBook Air (15-inch, M2, 2023)";
19+
20+
aliases {
21+
bluetooth0 = &bluetooth0;
22+
wifi0 = &wifi0;
23+
keyboard = &keyboard;
24+
};
25+
26+
led-controller {
27+
compatible = "pwm-leds";
28+
led-0 {
29+
pwms = <&fpwm1 0 40000>;
30+
label = "kbd_backlight";
31+
function = LED_FUNCTION_KBD_BACKLIGHT;
32+
color = <LED_COLOR_ID_WHITE>;
33+
max-brightness = <255>;
34+
default-state = "keep";
35+
};
36+
};
37+
};
38+
39+
&dcp {
40+
panel: panel {
41+
compatible = "apple,panel-j415", "apple,panel";
42+
width-mm = <327>;
43+
height-mm = <211>;
44+
adj-height-mm = <204>;
45+
apple,max-brightness = <500>;
46+
};
47+
};
48+
49+
/*
50+
* Force the bus number assignments so that we can declare some of the
51+
* on-board devices and properties that are populated by the bootloader
52+
* (such as MAC addresses).
53+
*/
54+
&port00 {
55+
bus-range = <1 1>;
56+
pwren-gpios = <&smc_gpio 13 GPIO_ACTIVE_HIGH>;
57+
wifi0: wifi@0,0 {
58+
compatible = "pci14e4,4433";
59+
reg = <0x10000 0x0 0x0 0x0 0x0>;
60+
/* To be filled by the loader */
61+
local-mac-address = [00 10 18 00 00 10];
62+
apple,antenna-sku = "XX";
63+
brcm,board-type = "apple,snake";
64+
};
65+
66+
bluetooth0: bluetooth@0,1 {
67+
compatible = "pci14e4,5f71";
68+
reg = <0x10100 0x0 0x0 0x0 0x0>;
69+
/* To be filled by the loader */
70+
local-bd-address = [00 00 00 00 00 00];
71+
brcm,board-type = "apple,snake";
72+
};
73+
};
74+
75+
/*
76+
* Provide labels for the USB type C ports.
77+
*/
78+
79+
&typec0 {
80+
label = "USB-C Left-back";
81+
};
82+
83+
&typec1 {
84+
label = "USB-C Left-front";
85+
};
86+
87+
&i2c0 {
88+
/* MagSafe port */
89+
hpm5: usb-pd@3a {
90+
compatible = "apple,cd321x";
91+
reg = <0x3a>;
92+
interrupt-parent = <&pinctrl_ap>;
93+
interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
94+
interrupt-names = "irq";
95+
};
96+
};
97+
98+
&i2c1 {
99+
speaker_left_woof1: codec@38 {
100+
compatible = "ti,sn012776", "ti,tas2764";
101+
reg = <0x38>;
102+
shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>;
103+
#sound-dai-cells = <0>;
104+
sound-name-prefix = "Left Woofer 1";
105+
};
106+
107+
speaker_left_tweet: codec@39 {
108+
compatible = "ti,sn012776", "ti,tas2764";
109+
reg = <0x39>;
110+
shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>;
111+
#sound-dai-cells = <0>;
112+
sound-name-prefix = "Left Tweeter";
113+
};
114+
115+
speaker_left_woof2: codec@3a {
116+
compatible = "ti,sn012776", "ti,tas2764";
117+
reg = <0x3a>;
118+
shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>;
119+
#sound-dai-cells = <0>;
120+
sound-name-prefix = "Left Woofer 2";
121+
};
122+
};
123+
124+
&i2c3 {
125+
speaker_right_woof1: codec@3b {
126+
compatible = "ti,sn012776", "ti,tas2764";
127+
reg = <0x3b>;
128+
shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>;
129+
#sound-dai-cells = <0>;
130+
sound-name-prefix = "Right Woofer 1";
131+
};
132+
133+
speaker_right_tweet: codec@3c {
134+
compatible = "ti,sn012776", "ti,tas2764";
135+
reg = <0x3c>;
136+
shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>;
137+
#sound-dai-cells = <0>;
138+
sound-name-prefix = "Right Tweeter";
139+
};
140+
141+
speaker_right_woof2: codec@3d {
142+
compatible = "ti,sn012776", "ti,tas2764";
143+
reg = <0x3d>;
144+
shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>;
145+
#sound-dai-cells = <0>;
146+
sound-name-prefix = "Right Woofer 2";
147+
};
148+
149+
jack_codec: codec@4b {
150+
compatible = "cirrus,cs42l84";
151+
reg = <0x4b>;
152+
reset-gpios = <&pinctrl_nub 12 GPIO_ACTIVE_HIGH>;
153+
#sound-dai-cells = <0>;
154+
interrupts-extended = <&pinctrl_ap 149 IRQ_TYPE_LEVEL_LOW>;
155+
sound-name-prefix = "Jack";
156+
};
157+
};
158+
159+
&fpwm1 {
160+
status = "okay";
161+
};
162+
163+
/ {
164+
sound {
165+
compatible = "apple,j415-macaudio", "apple,macaudio";
166+
model = "MacBook Air J415";
167+
168+
dai-link@0 {
169+
link-name = "Speakers";
170+
171+
/*
172+
* DANGER ZONE: You can blow your speakers!
173+
*
174+
* The drivers are not ready, and unless you are careful
175+
* to attenuate the audio stream, you run the risk of
176+
* blowing your speakers.
177+
*/
178+
status = "disabled";
179+
180+
cpu {
181+
sound-dai = <&mca 0>, <&mca 1>;
182+
};
183+
codec {
184+
sound-dai = <&speaker_left_woof1>,
185+
<&speaker_left_tweet>,
186+
<&speaker_left_woof2>,
187+
<&speaker_right_woof1>,
188+
<&speaker_right_tweet>,
189+
<&speaker_right_woof2>;
190+
};
191+
};
192+
193+
dai-link@1 {
194+
link-name = "Headphone Jack";
195+
196+
cpu {
197+
sound-dai = <&mca 2>;
198+
};
199+
codec {
200+
sound-dai = <&jack_codec>;
201+
};
202+
};
203+
};
204+
};
205+
206+
&mtp {
207+
status = "okay";
208+
};
209+
&mtp_mbox {
210+
status = "okay";
211+
};
212+
&mtp_dart {
213+
status = "okay";
214+
};
215+
&mtp_dockchannel {
216+
status = "okay";
217+
};
218+
&mtp_hid {
219+
apple,afe-reset-gpios = <&smc_gpio 8 GPIO_ACTIVE_LOW>;
220+
apple,stm-reset-gpios = <&smc_gpio 24 GPIO_ACTIVE_LOW>;
221+
222+
multi-touch {
223+
firmware-name = "apple/tpmtfw-j415.bin";
224+
};
225+
226+
keyboard: keyboard {
227+
hid-country-code = <0>;
228+
apple,keyboard-layout-id = <0>;
229+
};
230+
231+
stm {
232+
};
233+
234+
actuator {
235+
};
236+
237+
tp_accel {
238+
};
239+
};

0 commit comments

Comments
 (0)