IMX8MM direct SAI connection with ADAU7002

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

IMX8MM direct SAI connection with ADAU7002

Jump to solution
1,064 Views
hello-world123
Contributor II

Hello, I'm currently doing audio things at my IMX8MM board. The followings are my HW connections.

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

I refered almost everthing with the post 'https://community.nxp.com/t5/i-MX-Processors/i-MX8MQ-configuring-adau7002-device-doesn-t-work/m-p/12... but I think there's some difference at pinctrl group.

In HW Connection between i.MX8MM and adau7002, there's just a 3 pin which is Data, Frame Sync, Bit Clock. Even though there is no MCLK, I set MCLK at pinctrl group.

The followings are what I did in my dts.

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";

simple-audio-card,routing =
  "Capture", "PDM_DAT" ,
  "Capture", "IOVDD" ;

// 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 = <&sai3>;
};

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

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

&sai3 {
  pinctrl-names = "default";
  pinctrl-0 = <&pinctrl_sai3>;
  assigned-clocks = <&clk IMX8MM_CLK_SAI3>;
  assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
  assigned-clock-rates = <4800000>;
  status = "okay";
};


pinctrl_sai3: sai3grp {
  fsl,pins = <
    /*MX8MM_IOMUXC_SAI3_RXFS_SAI3_RX_SYNC 0xd6
    MX8MM_IOMUXC_SAI3_RXC_SAI3_RX_BCLK 0xd6
    MX8MM_IOMUXC_SAI3_RXD_SAI3_RX_DATA0 0xd6*/
    MX8MM_IOMUXC_SAI3_MCLK_SAI3_MCLK 0xd6
    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 failed to initialize adau7002 device driver with this message "/sound-adau7002/simple-audio-card,cpu: could not get $sound-dai-cells for /sai@30030000".

From the viewpoint of I.MX8MM, I.MX8MM provides Frame Sync, Bit Clock and receive Data from adau7002, so I used  MX8MM_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC, MX8MM_IOMUXC_SAI3_TXC_SAI3_TX_BCLK for Frame Sync and Bit Clock + MX8MM_IOMUXC_SAI3_RXD_SAI3_RX_DATA0 for received data.

Please tell me which point should I correct.

Thanks.

Labels (1)
0 Kudos
1 Solution
1,053 Views
igorpadykov
NXP Employee
NXP Employee

Hi

 

for simple-audio-card example one can look on

https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mm-evk.d...

Also may be useful Chapter 16 Porting Audio Codecs  i.MX Porting Guide

 

Best regards
igor

View solution in original post

1 Reply
1,054 Views
igorpadykov
NXP Employee
NXP Employee

Hi

 

for simple-audio-card example one can look on

https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mm-evk.d...

Also may be useful Chapter 16 Porting Audio Codecs  i.MX Porting Guide

 

Best regards
igor