Hi,
here is my working DT for Kernel 6.6.52:
/ {
codec: max98357a@0{
compatible = "maxim,max98357a";
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&sdmode_en>;
sdmode-gpios = <&gpio4 28 GPIO_ACTIVE_HIGH>;
status = "okay";
};
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "SAI3 MAX98357A";
simple-audio-card,format = "i2s";
simple-audio-card,widgets = "Speaker","Speakers";
simple-audio-card,routing = "Speakers","Speaker";
simple-audio-card,bitclock-master = <&cpu_dai>;
simple-audio-card,frame-master = <&cpu_dai>;
cpu_dai: simple-audio-card,cpu {
sound-dai = <&sai3>;
clocks = <&clk IMX8MP_CLK_SAI3>;
clock-names = "mclk";
//system-clock-frequency = <&clk IMX8MP_CLK_AUDIOMIX_SAI3_MCLK1>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <32>;
};
codec_dai: simple-audio-card,codec {
sound-dai = <&codec>;
//clocks = <&clk IMX8MP_CLK_SAI3>;
};
};
};
&sai3{
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai3>;
#sound-dai-cells = <0>;
clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI3_IPG>,
<&clk IMX8MP_CLK_DUMMY>,
<&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI3_MCLK1>,
<&clk IMX8MP_CLK_DUMMY>,
<&clk IMX8MP_CLK_DUMMY>,
<&clk IMX8MP_AUDIO_PLL1_OUT>,
<&clk IMX8MP_AUDIO_PLL2_OUT>;
clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", "pll11k";
assigned-clocks = <&clk IMX8MP_CLK_SAI3>,
<&clk IMX8MP_AUDIO_PLL1>,
<&clk IMX8MP_AUDIO_PLL2>;
assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL2_OUT>,
<&clk IMX8MP_AUDIO_PLL1_OUT>;
// Try common MCLK rates that divide well to 48 kHz multiples
// Option A: 24.576 MHz (very common for MAX98357A + 48 kHz)
assigned-clock-rates = <24576000>, // PLL2 for 48 kHz
<22579200>; // PLL1 for 44.1 kHz
// Option B (if 44.1 kHz needed later): use PLL1 + 22579200
//assigned-clock-rates = <22579200>;
fsl,sai-asynchronous;
fsl,sai-mclk-direction-output;
status = "okay";
};After moving to kernel 6.18.20 SAI3 is not probing and I got no sound-card.
The boot log shows:
platform sound: deferred probe pending: asoc-simple-card: parse error
What changes in the DT syntax from kernel 6.6.52 to 6.18.x? I didn't find anything relevant. How can I investigate the parse error?
Hello,
Could you please share your dmesg log?
Best regards.