Skip to content

Commit 8749589

Browse files
dolciniShawn Guo
authored andcommitted
arm64: dts: freescale: verdin-imx8mp: dahlia: add sound card
Add WM8904 based analog sound card to Dahlia carrier board. Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Tested-by: Mark Brown <broonie@kernel.org> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
1 parent 43df69f commit 8749589

1 file changed

Lines changed: 53 additions & 3 deletions

File tree

arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,36 @@
33
* Copyright 2022 Toradex
44
*/
55

6-
/* TODO: Audio Codec */
6+
/ {
7+
sound {
8+
compatible = "simple-audio-card";
9+
simple-audio-card,bitclock-master = <&codec_dai>;
10+
simple-audio-card,format = "i2s";
11+
simple-audio-card,frame-master = <&codec_dai>;
12+
simple-audio-card,mclk-fs = <256>;
13+
simple-audio-card,name = "imx8mp-wm8904";
14+
simple-audio-card,routing =
15+
"Headphone Jack", "HPOUTL",
16+
"Headphone Jack", "HPOUTR",
17+
"IN2L", "Line In Jack",
18+
"IN2R", "Line In Jack",
19+
"Headphone Jack", "MICBIAS",
20+
"IN1L", "Headphone Jack";
21+
simple-audio-card,widgets =
22+
"Microphone", "Headphone Jack",
23+
"Headphone", "Headphone Jack",
24+
"Line", "Line In Jack";
25+
26+
codec_dai: simple-audio-card,codec {
27+
clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI1_MCLK1>;
28+
sound-dai = <&wm8904_1a>;
29+
};
30+
31+
simple-audio-card,cpu {
32+
sound-dai = <&sai1>;
33+
};
34+
};
35+
};
736

837
&backlight {
938
power-supply = <&reg_3p3v>;
@@ -64,7 +93,21 @@
6493
&i2c4 {
6594
status = "okay";
6695

67-
/* TODO: Audio Codec */
96+
/* Audio Codec */
97+
wm8904_1a: audio-codec@1a {
98+
compatible = "wlf,wm8904";
99+
reg = <0x1a>;
100+
pinctrl-names = "default";
101+
pinctrl-0 = <&pinctrl_sai1>;
102+
#sound-dai-cells = <0>;
103+
clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI1_MCLK1>;
104+
clock-names = "mclk";
105+
AVDD-supply = <&reg_1p8v>;
106+
CPVDD-supply = <&reg_1p8v>;
107+
DBVDD-supply = <&reg_1p8v>;
108+
DCVDD-supply = <&reg_1p8v>;
109+
MICVDD-supply = <&reg_1p8v>;
110+
};
68111
};
69112

70113
/* Verdin PCIE_1 */
@@ -95,7 +138,14 @@
95138
vin-supply = <&reg_3p3v>;
96139
};
97140

98-
/* TODO: Verdin I2S_1 */
141+
/* Verdin I2S_1 */
142+
&sai1 {
143+
assigned-clocks = <&clk IMX8MP_CLK_SAI1>;
144+
assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
145+
assigned-clock-rates = <24576000>;
146+
fsl,sai-mclk-direction-output;
147+
status = "okay";
148+
};
99149

100150
/* Verdin UART_1 */
101151
&uart1 {

0 commit comments

Comments
 (0)