TLV320AIC3100: tlv320aic31xx-codec 1-0018: Could not reset device: -6

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

TLV320AIC3100: tlv320aic31xx-codec 1-0018: Could not reset device: -6

158 Views
ajita02
Contributor IV

Hi all,

I am using "tlv320aic3100" in our project. I am using "IMX8MM" with linux kernel 5.4.70. I am able to probe codec driver. Below is my dmesg logs.

 

[    4.267295] asoc-simple-card sound-tlv320aic: tlv320aic31xx-hifi <-> 30030000.sai mapping ok
[    4.275771] asoc-simple-card sound-tlv320aic: ASoC: no DMI vendor name!
[    4.286372] tlv320aic31xx-codec 1-0018: Could not reset device: -6

My dts file is as follows.

 sound-tlv320aic {
    compatible = "simple-audio-card";
    simple-audio-card,name = "tlv320aic-audio";
    simple-audio-card,format = "i2s";
    simple-audio-card,frame-master = <&cpudaitlv>;
    simple-audio-card,bitclock-master = <&cpudaitlv>;
    simple-audio-card,widgets =
        "Microphone", "Microphone Jack",
        "Line", "Line In Jack",
        "Line", "Line Out Jack",
        "Headphone", "Headphone Jack",
        "Speaker", "Speaker Jack";
    simple-audio-card,routing =
        "Headphone Jack", "HPL",
        "Headphone Jack", "HPR",
        "MIC1LM","Microphone Jack",
        "MIC1RP","Microphone Jack",
        "MIC1LP","Microphone Jack",
        "Speaker Jack", "SPK";

    cpudaitlv: simple-audio-card,cpu {
      sound-dai = <&sai3>;
      clocks = <&clk IMX8MM_CLK_SAI3_ROOT>;
      dai-tdm-slot-num = <2>;
      dai-tdm-slot-width = <32>; 
    };

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

&i2c2 {
    clock-frequency = <400000>;
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_i2c2>;
    status = "okay";

  tlv320aic: tlv320aic@18 {
    #sound-dai-cells = <0>;
    compatible = "ti,tlv320aic3100";
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_gpio_wlf>;
    ti,reset-gpio = <&gpio3 0 GPIO_ACTIVE_LOW>;
    reg=<0x18>;
    ai31xx-micbias-vg = <MICBIAS_2_0V>;
    status = "okay";
  };
};

&sai3 {
    #sound-dai-cells = <0>;
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_sai3>;
    assigned-clocks = <&clk IMX8MM_CLK_SAI3>;
    assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL2_OUT>;
    assigned-clock-rates = <11289600>;
    status = "okay";
};

pinctrl_gpio_wlf: gpiowlfgrp {
        fsl,pins = <
            MX8MM_IOMUXC_NAND_ALE_GPIO3_IO0     0xd6
        >;
};

I am using PLL2 for SAI3 root clock with frequency of "11289600". I have also added PLL parameters for current frequency in "tlv320aic31xx.c" as follows:

{11289600,  44100,  8, 0,   128,   8,  2,   128,   8,  2},

Can you help me to resolve reset error?

3 Replies

74 Views
ajita02
Contributor IV

I am able to detect and write using i2c commands. I was going through tlv320dac3100 . It has init sequence written through which DAC is configured using I2C commands. By using this I can play audio on tlv320aic3100. It confirms that IC is in working state and need to configure before using it. Can you give me similar init sequence for ADC? I want to enable mic functionality. Can you share me init sequence for AIC?

Thanks,

Ajita

0 Kudos
Reply

63 Views
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello @ajita02 

 

Could you please clarify is you were able to solve your reset issue?

If not, could you please check your GPIO reset pin?

The driver takes the GPIO as priority to reset the codec, you can see it here.

 

Best regards,

Salas.

0 Kudos
Reply

133 Views
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello @ajita02 

 

I hope you are doing very well.

 

Could you please verify that you can read the codec from the I2C bus with i2cdetect tool on linux?

Also, please check if the reset gpio is working.

 

Best regards,

Salas.

0 Kudos
Reply