iMX8M MINI TDM interface through PCM1865 codec

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

iMX8M MINI TDM interface through PCM1865 codec

1,378 Views
malays
Contributor I

I am working with iMX8M MINI dev board for TDM interface with PCM1865 codec to receive 4ch audio.

I am looking for some device tree reference for 4CH TDM audio interface. Below is my device tree snippet,

 

sound-pcm1865 {
compatible = "simple-audio-card";
simple-audio-card,name = "pcm1865-audio";
simple-audio-card,widgets =
"Line", "Line In Jack 1",
"Line", "Line In Jack 2",
"Line", "Line In Jack 3",
"Line", "Line In Jack 4";
simple-audio-card,routing =
"Line In Jack 1", "VINL1",
"Line In Jack 1", "VINR1",
"Line In Jack 2", "VINL2",
"Line In Jack 2", "VINR2",
"Line In Jack 3", "VINL3",
"Line In Jack 3", "VINR3",
"Line In Jack 4", "VINL4",
"Line In Jack 4", "VINR4";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&sound_master>;
simple-audio-card,frame-master = <&sound_master>;
simple-audio-card,mclk-fs = <256>;

sound_master: simple-audio-card,cpu {
sound-dai = <&sai2>;
system-clock-frequency = <3072000>;
dai-tdm-slot-num = <8>; -----------------------// taken online reference
dai-tdm-slot-width = <32>;
};

simple-audio-card,codec {
sound-dai = <&pcm1865>;
system-clock-frequency = <3072000>;
};
};

pinctrl_sai2: sai2grp {
fsl,pins = <
MX8MM_IOMUXC_SAI2_RXD0_SAI2_RX_DATA0 0xd6
MX8MM_IOMUXC_SAI2_TXFS_SAI2_TX_SYNC 0xd6
MX8MM_IOMUXC_SAI2_TXC_SAI2_TX_BCLK 0xd6
>;
};

&sai2 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai2>;
assigned-clocks = <&clk IMX8MM_CLK_SAI2>;
assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
assigned-clock-rates = <3072000>;
status = "okay";
};

 

pcm1865: pcm1865@4a {
#sound-dai-cells = <0>;
compatible = "ti,pcm1865";
reg = <0x4a>;
clocks = <&clk IMX8MM_CLK_SAI2_ROOT>;
avdd-supply = <&ldo1_reg>;
dvdd-supply = <&ldo1_reg>;
iovdd-supply = <&ldo1_reg>;
status = "okay";
};

 

Is the above configuration correct to get 4CH TDM interface through PCM1865 codec.?

Looking for your inputs.

Labels (1)
0 Kudos
Reply
0 Replies