Skip to content

Commit b94b437

Browse files
jailuthranmenon
authored andcommitted
arm64: dts: ti: Enable audio on SK-AM62(-LP)
Add nodes for audio codec and sound card, enable the audio serializer (McASP1) under use from SK-AM62 E2 [1] onwards and update pinmux. Keep all audio related nodes in the common dtsi as they are exactly the same between SK-AM62 and SK-AM62-LP [2]. Link: https://www.ti.com/lit/zip/sprr448 [1] Link: https://www.ti.com/lit/zip/sprr471 [2] Signed-off-by: Jai Luthra <j-luthra@ti.com> Reviewed-by: Jayesh Choudhary <j-choudhary@ti.com> Link: https://lore.kernel.org/r/20230313-mcasp_upstream-v10-2-94332149657a@ti.com Signed-off-by: Nishanth Menon <nm@ti.com>
1 parent d4b0379 commit b94b437

3 files changed

Lines changed: 95 additions & 0 deletions

File tree

arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,7 @@
225225
};
226226
};
227227
};
228+
229+
&tlv320aic3106 {
230+
DVDD-supply = <&buck2_reg>;
231+
};

arch/arm64/boot/dts/ti/k3-am625-sk.dts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,17 @@
8787
states = <1800000 0x0>,
8888
<3300000 0x1>;
8989
};
90+
91+
vcc_1v8: regulator-5 {
92+
/* output of TPS6282518DMQ */
93+
compatible = "regulator-fixed";
94+
regulator-name = "vcc_1v8";
95+
regulator-min-microvolt = <1800000>;
96+
regulator-max-microvolt = <1800000>;
97+
vin-supply = <&vcc_3v3_sys>;
98+
regulator-always-on;
99+
regulator-boot-on;
100+
};
90101
};
91102

92103
&main_pmx0 {
@@ -256,3 +267,7 @@
256267
};
257268
};
258269
};
270+
271+
&tlv320aic3106 {
272+
DVDD-supply = <&vcc_1v8>;
273+
};

arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,41 @@
8181
default-state = "off";
8282
};
8383
};
84+
85+
tlv320_mclk: clk-0 {
86+
#clock-cells = <0>;
87+
compatible = "fixed-clock";
88+
clock-frequency = <12288000>;
89+
};
90+
91+
codec_audio: sound {
92+
compatible = "simple-audio-card";
93+
simple-audio-card,name = "AM62x-SKEVM";
94+
simple-audio-card,widgets =
95+
"Headphone", "Headphone Jack",
96+
"Line", "Line In",
97+
"Microphone", "Microphone Jack";
98+
simple-audio-card,routing =
99+
"Headphone Jack", "HPLOUT",
100+
"Headphone Jack", "HPROUT",
101+
"LINE1L", "Line In",
102+
"LINE1R", "Line In",
103+
"MIC3R", "Microphone Jack",
104+
"Microphone Jack", "Mic Bias";
105+
simple-audio-card,format = "dsp_b";
106+
simple-audio-card,bitclock-master = <&sound_master>;
107+
simple-audio-card,frame-master = <&sound_master>;
108+
simple-audio-card,bitclock-inversion;
109+
110+
simple-audio-card,cpu {
111+
sound-dai = <&mcasp1>;
112+
};
113+
114+
sound_master: simple-audio-card,codec {
115+
sound-dai = <&tlv320aic3106>;
116+
clocks = <&tlv320_mclk>;
117+
};
118+
};
84119
};
85120

86121
&main_pmx0 {
@@ -175,6 +210,15 @@
175210
AM62X_IOPAD(0x0258, PIN_OUTPUT, 0) /* (F18/E16) USB1_DRVVBUS */
176211
>;
177212
};
213+
214+
main_mcasp1_pins_default: main-mcasp1-pins-default {
215+
pinctrl-single,pins = <
216+
AM62X_IOPAD(0x090, PIN_INPUT, 2) /* (M24) GPMC0_BE0N_CLE.MCASP1_ACLKX */
217+
AM62X_IOPAD(0x098, PIN_INPUT, 2) /* (U23) GPMC0_WAIT0.MCASP1_AFSX */
218+
AM62X_IOPAD(0x08c, PIN_OUTPUT, 2) /* (L25) GPMC0_WEN.MCASP1_AXR0 */
219+
AM62X_IOPAD(0x084, PIN_INPUT, 2) /* (L23) GPMC0_ADVN_ALE.MCASP1_AXR2 */
220+
>;
221+
};
178222
};
179223

180224
&wkup_uart0 {
@@ -205,6 +249,18 @@
205249
pinctrl-names = "default";
206250
pinctrl-0 = <&main_i2c1_pins_default>;
207251
clock-frequency = <400000>;
252+
253+
tlv320aic3106: audio-codec@1b {
254+
#sound-dai-cells = <0>;
255+
compatible = "ti,tlv320aic3106";
256+
reg = <0x1b>;
257+
ai3x-micbias-vg = <1>; /* 2.0V */
258+
259+
/* Regulators */
260+
AVDD-supply = <&vcc_3v3_sys>;
261+
IOVDD-supply = <&vcc_3v3_sys>;
262+
DRVDD-supply = <&vcc_3v3_sys>;
263+
};
208264
};
209265

210266
&sdhci0 {
@@ -273,3 +329,23 @@
273329
pinctrl-names = "default";
274330
pinctrl-0 = <&main_usb1_pins_default>;
275331
};
332+
333+
&mcasp1 {
334+
status = "okay";
335+
#sound-dai-cells = <0>;
336+
337+
pinctrl-names = "default";
338+
pinctrl-0 = <&main_mcasp1_pins_default>;
339+
340+
op-mode = <0>; /* MCASP_IIS_MODE */
341+
tdm-slots = <2>;
342+
343+
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
344+
1 0 2 0
345+
0 0 0 0
346+
0 0 0 0
347+
0 0 0 0
348+
>;
349+
tx-num-evt = <32>;
350+
rx-num-evt = <32>;
351+
};

0 commit comments

Comments
 (0)