Connection to ESAI

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Connection to ESAI

1,022 Views
riyan_khairulin
Contributor I

I'm using a board with i.MX 8QuadMax. I try to connection to radiochip with I2S through ESAI1 interface. I describe it in dts-file:

esai1: esai@59810000 {
compatible = "fsl,imx8qm-esai";
reg = <0x0 0x59810000 0x0 0x10000>;
interrupts = <GIC_SPI 411 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX8QM_AUD_ESAI_1_IPG>,
<&clk IMX8QM_AUD_ESAI_1_EXTAL_IPG>,
<&clk IMX8QM_AUD_ESAI_1_IPG>,
<&clk IMX8QM_CLK_DUMMY>;
clock-names = "core", "extal", "fsys", "spba";
dmas = <&edma3 6 0 1>, <&edma3 7 0 0>;
dma-names = "rx", "tx";
status = "disabled";
power-domains = <&pd_esai1>;
fsl,mode = "i2s-slave";
};

&esai1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_esai1>;
assigned-clocks = <&clk IMX8QM_ACM_ESAI0_MCLK_SEL>,
<&clk IMX8QM_AUD_PLL0_DIV>,
<&clk IMX8QM_AUD_ACM_AUD_PLL_CLK0_DIV>,
<&clk IMX8QM_AUD_ACM_AUD_REC_CLK0_DIV>,
<&clk IMX8QM_AUD_ESAI_0_EXTAL_IPG>;
assigned-clock-parents = <&clk IMX8QM_AUD_ACM_AUD_PLL_CLK0_CLK>;
assigned-clock-rates = <0>, <786432000>, <49152000>, <12288000>, <49152000>;
fsl,txm-rxs;
status = "okay";
};

sound-x28 {
compatible = "simple-audio-card";
simple-audio-card,name = "x28-audio";
simple-audio-card,format="i2s";
simple-audio-card,mclk-fs = <64>;
simple-audio-card,frame-master = <&sound2_ssi>;
simple-audio-card,bitclock-master = <&sound2_ssi>;
simple-audio-card,widgets =
"Microphone", "Mic Jack",
"Line", "Line In",
"Line", "Line Out",
"Headphone", "Headphone Jack";
simple-audio-card,routing =
"DMIC AIF", "DMic";
mux-int-port = <1>;
mux-ext-port = <4>;
sound2_ssi: simple-audio-card,cpu {
sound-dai = <&esai1>;
system-clock-frequency = <3072000>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <32>;
};

sound2codec: simple-audio-card,codec {
sound-dai = <&sound>;
};
};

But kernel can't create audio-device and throw the fault:

OF: /sound-x28/simple-audio-card,cpu: could not get #sound-dai-cells for /esai@59810000
[ 4.125931] asoc-simple-card sound-x28: parse error -22
[ 4.131236] asoc-simple-card: probe of sound-x28 failed with error -22

What can i do wrong?

Thank you!

T

0 Kudos
1 Reply

825 Views
igorpadykov
NXP Employee
NXP Employee

Hi Qwerty

one can try to reuse solution provided on

SAI on i.MX8M Mini 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos