AnsweredAssumed Answered

imx6ulevk platform sgtl5000 Driver porting problem

Question asked by ferdi ferdi on Dec 3, 2015
Latest reply on Oct 12, 2016 by Sourabh Das

My DTS configuration is as follows:

clocks {

            codec_osc: codec_osc {

                #clock-cells = <0>;

                compatible = "fixed-clock";

                clock-frequency = <12000000>;

        };

    };

vgen4_reg: vgen4 {

            regulator-min-microvolt = <1800000>;

            regulator-max-microvolt = <3300000>;

            regulator-always-on;

        };

 

        reg_3p3v: 3p3v {

            compatible = "regulator-fixed";

            regulator-name = "3P3V";

            regulator-min-microvolt = <3300000>;

            regulator-max-microvolt = <3300000>;

            regulator-always-on;

        };

sound-sgtl5000 {

                compatible = "fsl,imx6ul-arm2-sgtl5000",

                           "fsl,imx-audio-sgtl5000";

                model = "imx6ul-arm2-sgtl5000";

        cpu-dai = <&sai2>;

        audio-codec = <&codec>;

                audio-routing =

                        "LINE_IN", "Line In Jack",

                        "Headphone Jack", "HP_OUT";

        };

 

 

&i2c1 {

codec: sgtl5000@0a {

        compatible = "fsl,sgtl5000";

        reg = <0x0a>;

        clocks = <&codec_osc>;

        VDDA-supply = <&vgen4_reg>;

        VDDIO-supply = <&reg_3p3v>;

    };

}

 

&sai2 {

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_sai2>;

 

    assigned-clocks = <&clks IMX6UL_CLK_SAI2_SEL>,

              <&clks IMX6UL_CLK_SAI2>;

    assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;

    assigned-clock-rates = <0>, <12288000>;

 

    status = "okay";

};

 

Why every time you start to make an error, leading to sgtl5000 registration failed, The error function occurs in the read I2C function,Functions are as follows:

 

/* read chip information */

    ret = regmap_read(sgtl5000->regmap, SGTL5000_CHIP_ID, &reg);

    if (ret)

   goto disable_clk;

 

I2C on the other devices work properly, what is the cause of the failure of the sgtl5000 registration? Thank you!

Outcomes