Skip to content

Commit 60181ff

Browse files
WhatAmISupposedToPutHerejannau
authored andcommitted
dts: apple: t[603x,8122]: Add speaker/jack nodes
Signed-off-by: Sasha Finkelstein <k@chaosmail.tech>
1 parent a30ab93 commit 60181ff

14 files changed

Lines changed: 626 additions & 4 deletions

arch/arm64/boot/dts/apple/t6030-j514s.dts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,8 @@
3232
&bluetooth0 {
3333
brcm,board-type = "apple,texa";
3434
};
35+
36+
&sound {
37+
compatible = "apple,j514-macaudio", "apple,j314-macaudio", "apple,macaudio";
38+
model = "MacBook Pro J514";
39+
};

arch/arm64/boot/dts/apple/t6030-j516s.dts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,8 @@
3232
&bluetooth0 {
3333
brcm,board-type = "apple,jura";
3434
};
35+
36+
&sound {
37+
compatible = "apple,j516-macaudio", "apple,j316-macaudio", "apple,macaudio";
38+
model = "MacBook Pro J516";
39+
};

arch/arm64/boot/dts/apple/t6031-j514c.dts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,8 @@
2828
&bluetooth0 {
2929
brcm,board-type = "apple,texa";
3030
};
31+
32+
&sound {
33+
compatible = "apple,j514-macaudio", "apple,j314-macaudio", "apple,macaudio";
34+
model = "MacBook Pro J514";
35+
};

arch/arm64/boot/dts/apple/t6031-j516c.dts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,8 @@
2828
&bluetooth0 {
2929
brcm,board-type = "apple,jura";
3030
};
31+
32+
&sound {
33+
compatible = "apple,j516-macaudio", "apple,j316-macaudio", "apple,macaudio";
34+
model = "MacBook Pro J516";
35+
};

arch/arm64/boot/dts/apple/t6032-j575d.dts

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,67 @@
4545
status = "okay";
4646
};
4747

48+
/* Audio */
49+
&i2c1 {
50+
status = "okay";
51+
52+
speaker: codec@38 {
53+
compatible = "ti,sn012776", "ti,tas2764";
54+
reg = <0x38>;
55+
shutdown-gpios = <&pinctrl_ap 28 GPIO_ACTIVE_HIGH>;
56+
#sound-dai-cells = <0>;
57+
interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>;
58+
ti,imon-slot-no = <0>;
59+
ti,vmon-slot-no = <2>;
60+
};
61+
};
62+
63+
&i2c2 {
64+
status = "okay";
65+
66+
jack_codec: codec@4b {
67+
compatible = "cirrus,cs42l84";
68+
reg = <0x4b>;
69+
reset-gpios = <&pinctrl_nub 58 GPIO_ACTIVE_HIGH>;
70+
#sound-dai-cells = <0>;
71+
interrupts-extended = <&pinctrl_ap 30 IRQ_TYPE_LEVEL_LOW>;
72+
sound-name-prefix = "Jack";
73+
};
74+
};
4875

4976
&nco_clkref {
5077
clock-frequency = <900000000>;
5178
};
5279

80+
/ {
81+
sound: sound {
82+
compatible = "apple,j575-macaudio", "apple,j375-macaudio", "apple,macaudio";
83+
model = "Mac Studio J575";
84+
85+
dai-link@0 {
86+
link-name = "Speaker";
87+
88+
cpu {
89+
sound-dai = <&mca 0>;
90+
};
91+
codec {
92+
sound-dai = <&speaker>;
93+
};
94+
};
95+
96+
dai-link@1 {
97+
link-name = "Headphone Jack";
98+
99+
cpu {
100+
sound-dai = <&mca 2>;
101+
};
102+
codec {
103+
sound-dai = <&jack_codec>;
104+
};
105+
};
106+
};
107+
};
108+
53109
#include "spi1-nvram.dtsi"
54110
#include "hwmon-common.dtsi"
55111
#include "hwmon-fan-dual.dtsi"

arch/arm64/boot/dts/apple/t6034-j514m.dts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,8 @@
2828
&bluetooth0 {
2929
brcm,board-type = "apple,texa";
3030
};
31+
32+
&sound {
33+
compatible = "apple,j514-macaudio", "apple,j314-macaudio", "apple,macaudio";
34+
model = "MacBook Pro J514";
35+
};

arch/arm64/boot/dts/apple/t6034-j516m.dts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,8 @@
2828
&bluetooth0 {
2929
brcm,board-type = "apple,jura";
3030
};
31+
32+
&sound {
33+
compatible = "apple,j516-macaudio", "apple,j316-macaudio", "apple,macaudio";
34+
model = "MacBook Pro J516";
35+
};

arch/arm64/boot/dts/apple/t603x-j514-j516.dtsi

Lines changed: 137 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@
6868
status = "okay";
6969
};
7070

71-
&nco_clkref {
72-
clock-frequency = <900000000>;
73-
};
74-
7571
&mtp {
7672
status = "okay";
7773
};
@@ -110,6 +106,110 @@
110106
};
111107
};
112108

109+
/ {
110+
speaker_sdz: fixed-regulator-sn012776-sdz {
111+
compatible = "regulator-fixed";
112+
regulator-name = "sn012776-sdz";
113+
startup-delay-us = <5000>;
114+
gpios = <&pinctrl_ap 28 GPIO_ACTIVE_HIGH>;
115+
enable-active-high;
116+
};
117+
};
118+
119+
&i2c1 {
120+
status = "okay";
121+
122+
speaker_left_tweet: codec@3a {
123+
compatible = "ti,sn012776", "ti,tas2764";
124+
reg = <0x3a>;
125+
SDZ-supply = <&speaker_sdz>;
126+
#sound-dai-cells = <0>;
127+
sound-name-prefix = "Left Tweeter";
128+
interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>;
129+
ti,imon-slot-no = <8>;
130+
ti,vmon-slot-no = <10>;
131+
};
132+
133+
speaker_left_woof1: codec@38 {
134+
compatible = "ti,sn012776", "ti,tas2764";
135+
reg = <0x38>;
136+
SDZ-supply = <&speaker_sdz>;
137+
#sound-dai-cells = <0>;
138+
sound-name-prefix = "Left Woofer 1";
139+
interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>;
140+
ti,imon-slot-no = <0>;
141+
ti,vmon-slot-no = <2>;
142+
ti,sdout-force-zero-mask = <0xf0f0f0>;
143+
};
144+
145+
speaker_left_woof2: codec@39 {
146+
compatible = "ti,sn012776", "ti,tas2764";
147+
reg = <0x39>;
148+
SDZ-supply = <&speaker_sdz>;
149+
#sound-dai-cells = <0>;
150+
sound-name-prefix = "Left Woofer 2";
151+
interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>;
152+
ti,imon-slot-no = <16>;
153+
ti,vmon-slot-no = <18>;
154+
};
155+
};
156+
157+
&i2c2 {
158+
status = "okay";
159+
160+
jack_codec: codec@4b {
161+
compatible = "cirrus,cs42l84";
162+
reg = <0x4b>;
163+
reset-gpios = <&pinctrl_nub 58 GPIO_ACTIVE_HIGH>;
164+
#sound-dai-cells = <0>;
165+
interrupts-extended = <&pinctrl_ap 30 IRQ_TYPE_LEVEL_LOW>;
166+
sound-name-prefix = "Jack";
167+
};
168+
};
169+
170+
&i2c3 {
171+
status = "okay";
172+
173+
speaker_right_tweet: codec@3d {
174+
compatible = "ti,sn012776", "ti,tas2764";
175+
reg = <0x3d>;
176+
SDZ-supply = <&speaker_sdz>;
177+
#sound-dai-cells = <0>;
178+
sound-name-prefix = "Right Tweeter";
179+
interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>;
180+
ti,imon-slot-no = <12>;
181+
ti,vmon-slot-no = <14>;
182+
};
183+
184+
speaker_right_woof1: codec@3b {
185+
compatible = "ti,sn012776", "ti,tas2764";
186+
reg = <0x3b>;
187+
SDZ-supply = <&speaker_sdz>;
188+
#sound-dai-cells = <0>;
189+
sound-name-prefix = "Right Woofer 1";
190+
interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>;
191+
ti,imon-slot-no = <4>;
192+
ti,vmon-slot-no = <6>;
193+
ti,sdout-force-zero-mask = <0x0f0f0f>;
194+
};
195+
196+
speaker_right_woof2: codec@3c {
197+
compatible = "ti,sn012776", "ti,tas2764";
198+
reg = <0x3c>;
199+
SDZ-supply = <&speaker_sdz>;
200+
#sound-dai-cells = <0>;
201+
sound-name-prefix = "Right Woofer 2";
202+
interrupts-extended = <&pinctrl_ap 29 IRQ_TYPE_LEVEL_LOW>;
203+
ti,imon-slot-no = <20>;
204+
ti,vmon-slot-no = <22>;
205+
};
206+
};
207+
208+
&nco_clkref {
209+
clock-frequency = <900000000>;
210+
};
211+
212+
113213
/* PCIe devices */
114214

115215
/*
@@ -154,6 +254,39 @@
154254
status = "okay";
155255
};
156256

257+
/ {
258+
sound: sound {
259+
/* compatible is set per machine */
260+
261+
dai-link@0 {
262+
link-name = "Speakers";
263+
264+
cpu {
265+
sound-dai = <&mca 0>, <&mca 1>;
266+
};
267+
codec {
268+
sound-dai = <&speaker_left_woof1>,
269+
<&speaker_left_tweet>,
270+
<&speaker_left_woof2>,
271+
<&speaker_right_woof1>,
272+
<&speaker_right_tweet>,
273+
<&speaker_right_woof2>;
274+
};
275+
};
276+
277+
dai-link@1 {
278+
link-name = "Headphone Jack";
279+
280+
cpu {
281+
sound-dai = <&mca 2>;
282+
};
283+
codec {
284+
sound-dai = <&jack_codec>;
285+
};
286+
};
287+
};
288+
};
289+
157290
#include "spi1-nvram.dtsi"
158291
#include "hwmon-common.dtsi"
159292
#include "hwmon-fan-dual.dtsi"

arch/arm64/boot/dts/apple/t8122-j433.dts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,35 @@
4444
status = "okay";
4545
};
4646

47+
&i2c1 {
48+
jack_codec: codec@4b {
49+
compatible = "cirrus,cs42l84";
50+
reg = <0x4b>;
51+
reset-gpios = <&pinctrl_nub 17 GPIO_ACTIVE_HIGH>;
52+
interrupt-parent = <&pinctrl_ap>;
53+
interrupts = <173 IRQ_TYPE_LEVEL_LOW>;
54+
#sound-dai-cells = <0>;
55+
cirrus,ts-inv = <1>;
56+
sound-name-prefix = "Jack";
57+
};
58+
};
59+
60+
/ {
61+
sound {
62+
compatible = "apple,j433-macaudio", "apple,macaudio";
63+
model = "iMac J433";
64+
65+
dai-link@1 {
66+
link-name = "Headphone Jack";
67+
68+
cpu {
69+
sound-dai = <&mca 2>;
70+
};
71+
codec {
72+
sound-dai = <&jack_codec>;
73+
};
74+
};
75+
};
76+
};
77+
4778
#include "hwmon-fan-dual.dtsi"

arch/arm64/boot/dts/apple/t8122-j434.dts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,35 @@
5050
status = "okay";
5151
};
5252

53+
&i2c1 {
54+
jack_codec: codec@4b {
55+
compatible = "cirrus,cs42l84";
56+
reg = <0x4b>;
57+
reset-gpios = <&pinctrl_nub 17 GPIO_ACTIVE_HIGH>;
58+
interrupt-parent = <&pinctrl_ap>;
59+
interrupts = <173 IRQ_TYPE_LEVEL_LOW>;
60+
#sound-dai-cells = <0>;
61+
cirrus,ts-inv = <1>;
62+
sound-name-prefix = "Jack";
63+
};
64+
};
65+
66+
/ {
67+
sound {
68+
compatible = "apple,j434-macaudio", "apple,macaudio";
69+
model = "iMac J434";
70+
71+
dai-link@1 {
72+
link-name = "Headphone Jack";
73+
74+
cpu {
75+
sound-dai = <&mca 2>;
76+
};
77+
codec {
78+
sound-dai = <&jack_codec>;
79+
};
80+
};
81+
};
82+
};
83+
5384
#include "hwmon-fan-dual.dtsi"

0 commit comments

Comments
 (0)