Hi All,
We are using imx7D for our prototype board and trying to interface with TLV320DAC3100.
We have connected SAI1 to the codec. I want to generate MCLK from SAI1. When the kernel boots, I can see the clock on the MCLK pin for 2 seconds, and then it turns off. Can somebody please verify if my device tree is right, and if not, how to correct it?
&sai1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai1>;
assigned-clocks = <&clks IMX7D_SAI1_ROOT_SRC>,
<&clks IMX7D_SAI1_ROOT_CLK>;
assigned-clock-parents = <&clks IMX7D_PLL_AUDIO_POST_DIV>;
assigned-clock-rates = <0>, <24576000>;
fsl,sai-mclk-direction-output;
fsl,sai-synchronous-rx;
status = "okay";
};
pinctrl_sai1: sai1grp {
fsl,pins = <
MX7D_PAD_SAI1_MCLK__SAI1_MCLK 0x1f
MX7D_PAD_ENET1_RX_CLK__SAI1_TX_BCLK 0x1f
MX7D_PAD_ENET1_CRS__SAI1_TX_SYNC 0x1f
MX7D_PAD_ENET1_COL__SAI1_TX_DATA0 0x30
>;
};
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "Audio Output";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&sound_codec>;
simple-audio-card,frame-master = <&sound_codec>;
simple-audio-card,widgets =
"Headphone", "Headphone Jack",
"Speaker", "speakerOut";
simple-audio-card,routing =
"Headphone Jack", "HPL",
"Headphone Jack", "HPR",
"speakerOut", "SPK";
simple-audio-card,cpu {
sound-dai = <&sai1>;
};
sound_codec: simple-audio-card,codec {
sound-dai = <&codec1>;
clocks = <&clks IMX7D_SAI1_ROOT_SRC>;
};
};
codec1: codec@18 {
compatible = "ti,tlv320dac3100";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_codec1>;
reg = <0x18>;
#sound-dai-cells = <0>;
HPVDD-supply = <&audio_3v3>;
SPRVDD-supply = <&audio_3v3>;
SPLVDD-supply = <&audio_3v3>;
AVDD-supply = <&audio_3v3>;
IOVDD-supply = <&audio_3v3>;
DVDD-supply = <&audio_3v3>;
gpio-reset = <&gpio6 12 GPIO_ACTIVE_HIGH>;
status = "okay";
};
Hi @joanxie
The first link is not working, and the second link discussed SAI1 in slave mode.
I want to make SAI1 work in master mode.
Could you please help me to make SAI1 work in master mode for IMX7D?
Thanks,
Asma