IMX8MP SGTL5000

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

IMX8MP SGTL5000

1,543 Views
VoVan
Contributor III

Hello.

I used sgtl5000 on imx8mm(I2C3 SAI3) board. Everything works great. I'm trying to use sgtl5000 on the imx8mp board - there is no device on the I2C bus, because there is no clock MCLK (IMX8MP_CLK_SAI3). Why is SAI clock not generated when calling the function from sgtl5000.c driver:
ret = clk_prepare_enable(sgtl5000->mclk);
On the imx8mm board - this SAI clock works. How to make it work on imx8mp?

Part of my dts:

sound-sgtl5000 {
compatible = "simple-audio-card";
simple-audio-card,name = "sgtl5000-audio";
simple-audio-card,format = "i2s";

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

simple-audio-card,codec {
sound-dai = <&sgtl5000_codec 0>;
clocks = <&clk IMX8MP_CLK_SAI3>;
};
};

&sai3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai3>;
#sound-dai-cells = <0>;
assigned-clocks = <&clk IMX8MP_CLK_SAI3>;
assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
assigned-clock-rates = <24000000>;
fsl,rxmasterflag = <1>;
fsl,sai-asynchronous;
status = "okay";
};

pinctrl_sai3: sai3grp {
fsl,pins = <
MX8MP_IOMUXC_SAI3_TXFS__AUDIOMIX_SAI3_TX_SYNC 0xd6
MX8MP_IOMUXC_SAI3_TXC__AUDIOMIX_SAI3_TX_BCLK 0xd6
MX8MP_IOMUXC_SAI3_RXD__AUDIOMIX_SAI3_RX_DATA00 0xd6
MX8MP_IOMUXC_SAI3_TXD__AUDIOMIX_SAI3_TX_DATA00 0xd6
MX8MP_IOMUXC_SAI3_MCLK__AUDIOMIX_SAI3_MCLK 0xd6
>;
};

&i2c3 { sgtl5000_codec: sgtl5000@a {
compatible = "fsl,sgtl5000";
reg = <0xa>;
#sound-dai-cells = <0>;
clocks = <&clk IMX8MP_CLK_SAI3>;
clock-names = "mclk";
VDDA-supply = <&reg_3p3v>;
VDDIO-supply = <&reg_3p3v>;
VDDD-supply = <&reg_1p8v>;
status = "okay";
};};

 

0 Kudos
Reply
0 Replies