[i.MX8MQ ] configuring adau7002 device doesn't work

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

[i.MX8MQ ] configuring adau7002 device doesn't work

ソリューションへジャンプ
2,876件の閲覧回数
jhpark_vine
Contributor III

To use ADAU7002 device as a PDM to i2s converter on i.MX8MQ board, wrote    imx8mq-evk.dts file like below :

we use a  SPH0641LM4H-1 mic as a PDM source . 

sound_adau7002: sound-adau7002 {
compatible = "simple-audio-card";
simple-audio-card,name = "DigitalMics";

simple-audio-card,format = "i2s";

simple-audio-card,widgets =
"Microphone", "Microphone Jack" ;

// Maybe adde widget: PDM
simple-audio-card,routing =
"PDM_DAT" , "DigitalMics" ;

// The SSI2 is the I2S master.
simple-audio-card,bitclock-master = <&dailink_master>;
simple-audio-card,frame-master = <&dailink_master>;

status = "okay";

dailink_master: simple-audio-card,cpu {
sound-dai = <&sai2>;
/* system-clock-frequency = <883200>; */
};

dailink_slave: simple-audio-card,codec {
sound-dai = <&adau7002>;
clocks = <&clk IMX8MQ_CLK_SAI2_ROOT>;
};
};

adau7002: pdm-to-i2s {
#sound-dai-cells = <0>;
#address-cells = <0>;
#size-cells = <0>;
compatible = "adi,adau7002";
status = "okay";
//IOVDD-supply = <&reg_3p3v>;
};

....

&sai2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai2>;
assigned-clocks = <&clk IMX8MQ_CLK_SAI2>;
assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>;
assigned-clock-rates = <24576000>;
status = "okay";
};

above excerpted from  apalis-imx6-support-i2s-output-to-adau7002 

when board kernel boots,  it  displays kernel error messages :

oot@imx8mqevk:~# dmesg | grep -i adau
[ 2.480408] adau7002 pdm-to-i2s: pdm-to-i2s supply IOVDD not found, using dummy regulator
[ 2.496971] asoc-simple-card sound-adau7002: adau7002-hifi <-> 308b0000.sai mapping ok
[ 2.505012] asoc-simple-card sound-adau7002: ASoC: no source widget found for DigitalMics
[ 2.513305] asoc-simple-card sound-adau7002: ASoC: Failed to add route DigitalMics -> direct -> PDM_DAT
root@imx8mqevk:~# [ 35.873269] VSD_3V3: disabling

 

Thanks in advance 

 

 

 

 

 

0 件の賞賛
返信
1 解決策
2,768件の閲覧回数
jhpark_vine
Contributor III

modified  imx8mq-evk.dts , it works now 

 

sound_adau7002: sound-adau7002 {
compatible = "simple-audio-card";
simple-audio-card,name = "adau7002";

simple-audio-card,format = "i2s";

simple-audio-card,widgets =
"Microphone", "Microphone Jack";

// Maybe adde widget: PDM
/*
simple-audio-card,routing =
"PDM_DAT", "Digital Mics" ;
*/
simple-audio-card,routing =
"Capture" , "PDM_DAT" ,
"ADAU AIF", "PDM_DAT" ,
"Capture", "IOVDD" ;
/*
simple-audio-card,routing =
"PDM_DAT", "Microphone Jack" ;
*/

// The SSI2 is the I2S master.
simple-audio-card,bitclock-master = <&dailink_master>;
simple-audio-card,frame-master = <&dailink_master>;

status = "okay";

dailink_master: simple-audio-card,cpu {
sound-dai = <&sai2>;
/*system-clock-frequency = <883200>; */
};

dailink_slave: simple-audio-card,codec {
sound-dai = <&adau7002>;
clocks = <&clk IMX8MQ_CLK_SAI2_ROOT>;
};
};

adau7002: pdm-to-i2s {
#sound-dai-cells = <0>;
#address-cells = <0>;
#size-cells = <0>;
compatible = "adi,adau7002";
status = "okay";
/* IOVDD-supply = <&reg_3p3v>; */
IOVDD-supply = <&vgen5_reg>;
};

 

===  kernel bootng message ===

root@imx8mqevk:~# dmesg | grep -i adau
[ 5.431478] VineTel ### adau7002_component_probe start !!!
[ 5.431485] VineTel ### adau7002_component_probe ### success !!!
[ 5.456647] debugfs: Directory '308b0000.sai' with parent 'adau7002' already present!
[ 5.671118] asoc-simple-card sound-adau7002: adau7002-hifi <-> 308b0000.sai mapping ok
[ 5.705614] asoc-simple-card sound-adau7002: ASoC: no DMI vendor name!
[ 7.877467] #0: adau7002

 

root@imx8mqevk:~# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: adau7002 [adau7002], device 0: 308b0000.sai-adau7002-hifi adau7002-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
root@imx8mqevk:~# 

 

 

 

 

 

 

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
2,228件の閲覧回数
jhpark_vine
Contributor III

My SAI2 Configuration is 

sai2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai2>;
assigned-clocks = <&clk IMX8MQ_CLK_SAI2>;
assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>;
assigned-clock-rates = <24576000>;
status = "okay";
};

pinctrl_sai2: sai2grp {
/*
fsl,pins = <
MX8MQ_IOMUXC_SAI2_TXFS_SAI2_TX_SYNC 0xd6
MX8MQ_IOMUXC_SAI2_TXC_SAI2_TX_BCLK 0xd6
MX8MQ_IOMUXC_SAI2_MCLK_SAI2_MCLK 0xd6
MX8MQ_IOMUXC_SAI2_TXD0_SAI2_TX_DATA0 0xd6
>;
*/
fsl,pins = <
MX8MQ_IOMUXC_SAI2_RXD0_SAI2_RX_DATA0 0x000000C7
MX8MQ_IOMUXC_SAI2_TXC_SAI2_TX_BCLK 0x000000C7
MX8MQ_IOMUXC_SAI2_TXFS_SAI2_TX_SYNC 0x000018c7
>;
};

 

we don't need SAI MCLK pin In HW connection . 

Maybe there can be  SMT(Surface Maunt Technology )  problem . 

Thanks && BR. 

2,872件の閲覧回数
igorpadykov
NXP Employee
NXP Employee
0 件の賞賛
返信
2,857件の閲覧回数
jhpark_vine
Contributor III

My development hw setup : IMX8M QuadEVK Interfaced to ADAU7002 ( PDM  to I2S ) that  has a  SPH0641LM4H-1  (PDM MIC ) as  a sound source :  

.i.MX8M  <---> I2S <---> ADAU70002 <----> PDM   <---> SPH0641LM4H-1 

 

so don't need "sound_adau7002: sound-adau7002" configuration which is a simple sound device ? 

I finished kernel driver configuration for ADAU7002 and Pin-muxing with ADAU7002 via SAI2 bus .

some ADAU7002 routing configuration problem occurs.. 

// Maybe adde widget: PDM
simple-audio-card,routing =   
"PDM_DAT" , "DigitalMics" ;

[ 2.513305] asoc-simple-card sound-adau7002: ASoC: Failed to add route DigitalMics -> direct -> PDM_DAT 

  

0 件の賞賛
返信
2,769件の閲覧回数
jhpark_vine
Contributor III

modified  imx8mq-evk.dts , it works now 

 

sound_adau7002: sound-adau7002 {
compatible = "simple-audio-card";
simple-audio-card,name = "adau7002";

simple-audio-card,format = "i2s";

simple-audio-card,widgets =
"Microphone", "Microphone Jack";

// Maybe adde widget: PDM
/*
simple-audio-card,routing =
"PDM_DAT", "Digital Mics" ;
*/
simple-audio-card,routing =
"Capture" , "PDM_DAT" ,
"ADAU AIF", "PDM_DAT" ,
"Capture", "IOVDD" ;
/*
simple-audio-card,routing =
"PDM_DAT", "Microphone Jack" ;
*/

// The SSI2 is the I2S master.
simple-audio-card,bitclock-master = <&dailink_master>;
simple-audio-card,frame-master = <&dailink_master>;

status = "okay";

dailink_master: simple-audio-card,cpu {
sound-dai = <&sai2>;
/*system-clock-frequency = <883200>; */
};

dailink_slave: simple-audio-card,codec {
sound-dai = <&adau7002>;
clocks = <&clk IMX8MQ_CLK_SAI2_ROOT>;
};
};

adau7002: pdm-to-i2s {
#sound-dai-cells = <0>;
#address-cells = <0>;
#size-cells = <0>;
compatible = "adi,adau7002";
status = "okay";
/* IOVDD-supply = <&reg_3p3v>; */
IOVDD-supply = <&vgen5_reg>;
};

 

===  kernel bootng message ===

root@imx8mqevk:~# dmesg | grep -i adau
[ 5.431478] VineTel ### adau7002_component_probe start !!!
[ 5.431485] VineTel ### adau7002_component_probe ### success !!!
[ 5.456647] debugfs: Directory '308b0000.sai' with parent 'adau7002' already present!
[ 5.671118] asoc-simple-card sound-adau7002: adau7002-hifi <-> 308b0000.sai mapping ok
[ 5.705614] asoc-simple-card sound-adau7002: ASoC: no DMI vendor name!
[ 7.877467] #0: adau7002

 

root@imx8mqevk:~# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: adau7002 [adau7002], device 0: 308b0000.sai-adau7002-hifi adau7002-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
root@imx8mqevk:~# 

 

 

 

 

 

 

0 件の賞賛
返信
2,263件の閲覧回数
hello-world123
Contributor II

Hello, I'm doing similar work about adau7002 things and I have a question.

 

My HW connection is below which almost similar like yours.

i.MX8MM <----> adau7002(PDM to I2S) <----> ICS-41351(PDM MIC)

 

And I failed to initialize adau7002 device driver with this message "/sound-adau7002/simple-audio-card,cpu: could not get $sound-dai-cells for /sai@30030000".

In your device-tree dtsi, Can you tell me about SAI2 pinctrl sai2 settings?

Actually, there is just 3 connections which In my HW connection(Rx Data, Frame Sync, Bit Clock) so I modified my SAI pinctrl group like below but it's not working.

pinctrl_sai3: sai3grp {
  fsl,pins = <
    MX8MM_IOMUXC_SAI3_RXD_SAI3_RX_DATA0 0xd6
    MX8MM_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC 0xd6
    MX8MM_IOMUXC_SAI3_TXC_SAI3_TX_BCLK 0xd6
    >;
};

I did like above settings because we didn't connect anything at SAI MCLK pin In HW connection. Even we didn't put any MCLK in HW, Should I have to set MCLK at pinctrl grp?

It would be really helpful if you reply this question. 

Thanks.

0 件の賞賛
返信