Hello does any one know how to setup wm8960 codec (Raspi HAT) with 24MHz oscillator as SAI1 master.
Clock driver is wm8960; so no mlck out of iMX8 is needed;
There is now dts document how to setup SAI for iMX8; there are some iMX8 with DSP and others have only SAI (no DSP).
I do not need the DSP.
How to assign clock and PLL of SAI1 ?
i2S Slave i2S Master
iMX8 WM8960
CLK <- CLK
FS <- FS
RX <- TX : 2xMIC L/R
TX -> RX : 2xSpeaker L/R
sound {
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&dailink0_master>;
simple-audio-card,frame-master = <&dailink0_master>;
simple-audio-card,widgets =
"Microphone", "Microphone Jack",
"Headphone", "Headphone Jack",
"Speaker", "Speaker Ext",
"Line", "Line In Jack";
simple-audio-card,routing =
"MIC_IN", "Microphone Jack",
"Microphone Jack", "Mic Bias",
"LINE_IN", "Line In Jack",
"Headphone Jack", "HP_OUT",
"Speaker Ext", "LINE_OUT";
simple-audio-card,cpu {
sound-dai = <&sai1>;
frame-master;
bitclock-master;
};
dailink0_master: simple-audio-card,codec {
sound-dai = <&wm8960>;
frame-master;
bitclock-master;
system-clock-frequency = <24000000>;
};
};
};
&amix {
status = "okay";
};
&sai1 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai1>;
clock-names = "ipg", "ocram", "core",
"sai1_bus", "sai1_mclk0", "sai1_mclk1", "sai1_mclk2", "sai1_mclk3";
clocks = <&clk_dummy>, <&clk_dummy>, <&clk_dummy>,
<&sai1_lpcg 1>, <&clk_dummy>, <&sai1_lpcg 0>,
<&clk_dummy>, <&clk_dummy>;
assigned-clocks = <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_PLL>,
<&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_SLV_BUS>,
<&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_MST_BUS>,
<&sai1_lpcg 0>; /* FIXME: should be sai1, original code is 0 */
//assigned-clocks = <&clk IMX8MQ_CLK_SAI3>;
//assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>;
//assigned-clock-rates = <24576000>;
//assigned-clocks = <&clk IMX8MQ_CLK_DUMMY>;
assigned-clock-parents = <&aud_pll_div0_lpcg 0>;
assigned-clock-rates = <0>, <786432000>, <49152000>, <12288000>, <49152000>;
status = "okay";
};