Skip to content

Commit b8e4498

Browse files
dolciniShawn Guo
authored andcommitted
arm64: dts: freescale: verdin-imx8mp: dev: add sound card
Add NAU8822 based analog sound card to Development carrier board. Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
1 parent 8749589 commit b8e4498

1 file changed

Lines changed: 51 additions & 4 deletions

File tree

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

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
*/
55

66
/ {
7-
/* TODO: Audio Codec */
8-
97
reg_eth2phy: regulator-eth2phy {
108
compatible = "regulator-fixed";
119
enable-active-high;
@@ -17,6 +15,41 @@
1715
startup-delay-us = <200000>;
1816
vin-supply = <&reg_3p3v>;
1917
};
18+
19+
sound {
20+
compatible = "simple-audio-card";
21+
simple-audio-card,bitclock-master = <&codec_dai>;
22+
simple-audio-card,format = "i2s";
23+
simple-audio-card,frame-master = <&codec_dai>;
24+
simple-audio-card,mclk-fs = <256>;
25+
simple-audio-card,name = "imx8mp-nau8822";
26+
simple-audio-card,routing =
27+
"Headphones", "LHP",
28+
"Headphones", "RHP",
29+
"Speaker", "LSPK",
30+
"Speaker", "RSPK",
31+
"Line Out", "AUXOUT1",
32+
"Line Out", "AUXOUT2",
33+
"LAUX", "Line In",
34+
"RAUX", "Line In",
35+
"LMICP", "Mic In",
36+
"RMICP", "Mic In";
37+
simple-audio-card,widgets =
38+
"Headphones", "Headphones",
39+
"Line Out", "Line Out",
40+
"Speaker", "Speaker",
41+
"Microphone", "Mic In",
42+
"Line", "Line In";
43+
44+
codec_dai: simple-audio-card,codec {
45+
clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI1_MCLK1>;
46+
sound-dai = <&nau8822_1a>;
47+
};
48+
49+
simple-audio-card,cpu {
50+
sound-dai = <&sai1>;
51+
};
52+
};
2053
};
2154

2255
&backlight {
@@ -88,7 +121,14 @@
88121
&i2c4 {
89122
status = "okay";
90123

91-
/* TODO: Audio Codec */
124+
/* Audio Codec */
125+
nau8822_1a: audio-codec@1a {
126+
compatible = "nuvoton,nau8822";
127+
reg = <0x1a>;
128+
pinctrl-names = "default";
129+
pinctrl-0 = <&pinctrl_sai1>;
130+
#sound-dai-cells = <0>;
131+
};
92132
};
93133

94134
/* Verdin PCIE_1 */
@@ -119,7 +159,14 @@
119159
vin-supply = <&reg_3p3v>;
120160
};
121161

122-
/* TODO: Verdin I2C_1 with Audio Codec */
162+
/* Verdin I2S_1 */
163+
&sai1 {
164+
assigned-clocks = <&clk IMX8MP_CLK_SAI1>;
165+
assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
166+
assigned-clock-rates = <24576000>;
167+
fsl,sai-mclk-direction-output;
168+
status = "okay";
169+
};
123170

124171
/* Verdin UART_1, connector X50 through RS485 transceiver */
125172
&uart1 {

0 commit comments

Comments
 (0)