]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arm64: dts: imx8mq-evk: support more sample rates for wm8524 card
authorShengjiu Wang <shengjiu.wang@nxp.com>
Fri, 15 Aug 2025 10:23:16 +0000 (18:23 +0800)
committerShawn Guo <shawnguo@kernel.org>
Fri, 22 Aug 2025 02:48:53 +0000 (10:48 +0800)
The wm8524 codec is connected to the SAI interface. There are two audio
plls on i.MX8MQ, one pll can be the clock source of 44kHz series rates,
another pll can be clock source of 48kHz series rates.

Previously it only supported 48kHz series rates, with this change the
supported rates will include 44kHz series rates, from 8kHz to 192kHz.

As commit 17cc308b1833 ("ASoC: wm8524: enable constraints when sysclk is
configured.") make wm8524 release the constraint when codec's sysclk is
not configured, so configure the cpu dai's sysclk to support more rates
with the 'clocks' property removed.

Add mclk-fs property for the sysclk ratio, which is required by
calculating the sysclk, 256 is a common ratio for audio.

'system-clock-direction-out' is a required property after
commit 5725bce709db ("ASoC: simple-card-utils: Unify clock direction by
clk_direction") to specify the clock direction.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/imx8mq-evk.dts

index 43e45b0bd0d177d62ed955e1a7a63be768ad4b07..a88bc9034663631b4a428f5edaae5e0d5341cbee 100644 (file)
                simple-audio-card,format = "i2s";
                simple-audio-card,frame-master = <&cpudai>;
                simple-audio-card,bitclock-master = <&cpudai>;
+               simple-audio-card,mclk-fs = <256>;
                simple-audio-card,widgets =
                        "Line", "Left Line Out Jack",
                        "Line", "Right Line Out Jack";
 
                cpudai: simple-audio-card,cpu {
                        sound-dai = <&sai2>;
+                       system-clock-direction-out;
                };
 
                link_codec: simple-audio-card,codec {
                        sound-dai = <&wm8524>;
-                       clocks = <&clk IMX8MQ_CLK_SAI2_ROOT>;
                };
        };
 
        assigned-clocks = <&clk IMX8MQ_AUDIO_PLL1_BYPASS>, <&clk IMX8MQ_CLK_SAI2>;
        assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1>, <&clk IMX8MQ_AUDIO_PLL1_OUT>;
        assigned-clock-rates = <0>, <24576000>;
+       clocks = <&clk IMX8MQ_CLK_SAI2_IPG>, <&clk IMX8MQ_CLK_DUMMY>,
+               <&clk IMX8MQ_CLK_SAI2_ROOT>, <&clk IMX8MQ_CLK_DUMMY>,
+               <&clk IMX8MQ_CLK_DUMMY>, <&clk IMX8MQ_AUDIO_PLL1_OUT>,
+               <&clk IMX8MQ_AUDIO_PLL2_OUT>;
+       clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", "pll11k";
        status = "okay";
 };