I am using iMX8M dev board with PCM1865 ADC. Kernel version - Linux 4.19.35
I am not able to get the PCM1865 codec under ALSA driver list. Below is my device tree configuration with simple-audio-card.
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>;
sound_master: simple-audio-card,cpu {
sound-dai = <&sai2>;
};
simple-audio-card,codec {
sound-dai = <&pcm1865>;
system-clock-frequency = <12288000>;
};
};
&sai2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai2>;
assigned-clocks = <&clk IMX8MM_CLK_SAI2>;
assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
assigned-clock-rates = <12288000>;
status = "okay";
};
&i2c4 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c4>;
status = "okay";
pcm1865: codec@4a {
#sound-dai-cells = <1>;
compatible = "ti,pcm1865";
reg = <0x4a>;
clock-names = "mclk";
avdd-supply = <&ldo1_reg>;
dvdd-supply = <&ldo1_reg>;
iovdd-supply = <&ldo1_reg>;
status = "okay";
};
};
I am also not sure about the HW wiring required for the ALSA driver. Currently, I have connected I2C (SCL, SDA) lines to iMX8M board only. Separate power is given with common ground.
Is I2S connection (BCLK, LRCK, DOUT also MCLK) required to get the PCM1865 codec detected under ALSA driver list ?