How to use WM8940 on i.MX8MP

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to use WM8940 on i.MX8MP

321 次查看
eclipse5685
Contributor I
I don't know how to run WM8940 on i.MX8MP.
 
I changed the wiring so that the I2C3 and SAI3 that were connected to the WM8960 on the i.MX8MP-EVK are connected to the WM8940,
 and I'm using simple-audio-card and wm8940 as the drivers.
 
The following settings have been made.
・Device Tree
sound-wm8940 {
compatible = "simple-audio-card";
simple-audio-card,name = "wm8940-audio";
simple-audio-card,format = "i2s";
simple-audio-card,frame-master = <&cpudai>;
simple-audio-card,bitclock-master = <&cpudai>;
simple-audio-card,widgets =
"Speaker", "Ext Spk",
"Microphone", "Mic Jack";
simple-audio-card,routing =
"Ext Spk", "MONOOUT",
"Ext Spk", "SPKOUTN",
"Ext Spk", "SPKOUTP",
"MICN", "Mic Jack",
"MICP", "Mic Jack";
status = "okay";
 
cpudai: simple-audio-card,cpu {
sound-dai = <&sai3>;
};
 
link_codec: simple-audio-card,codec {
sound-dai = <&wm8940>;
clocks = <&clk IMX8MP_CLK_SAI3_ROOT>;
};
};
 
&i2c3 {
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3>;
status = "okay";
 
wm8940: wm8940@1a {
#sound-dai-cells = <0>;
compatible = "wlf,wm8940";
reg = <0x1a>;
status = "okay";
};
 
}
 
&sai3 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai3>;
assigned-clocks = <&clk IMX8MP_CLK_SAI3>;
assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
assigned-clock-rates = <12288000>;
clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIO_BLK_CTRL_SAI3_IPG>, <&clk IMX8MP_CLK_DUMMY>,
<&audio_blk_ctrl IMX8MP_CLK_AUDIO_BLK_CTRL_SAI3_MCLK1>, <&clk IMX8MP_CLK_DUMMY>,
<&clk IMX8MP_CLK_DUMMY>;
clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3";
fsl,sai-mclk-direction-output;
status = "okay";
};
 
・Kernel Config
CONFIG_SND_SOC_WM8940=m
 
0 项奖励
回复
1 回复

293 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

The WM8940 audio CODEC is not supported by default on our BSP. To use this CODEC to your system, may you need to add a third-party driver provided by manufacturer and configure your device tree.

Unfortunately, there is no a guide to port this specific CODEC to the BSP. The references we have are the i.MX porting guide and EVK device tree (WM8940).

Maybe this documentation could be helpful.

Best regards.

0 项奖励
回复