[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAA+D8AM_3zK5Gp0_OWzc9B-qJU9CNYvDynMH5_a-o8+4ShE6Mw@mail.gmail.com>
Date: Fri, 18 Jul 2025 16:06:30 +0800
From: Shengjiu Wang <shengjiu.wang@...il.com>
To: Frank Li <Frank.li@....com>
Cc: Shengjiu Wang <shengjiu.wang@....com>, robh@...nel.org, krzk+dt@...nel.org,
conor+dt@...nel.org, shawnguo@...nel.org, s.hauer@...gutronix.de,
kernel@...gutronix.de, festevam@...il.com, devicetree@...r.kernel.org,
imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] arm64: dts: imx8mm-evk: support more sample rates for
wm8524 card
On Thu, Jul 17, 2025 at 3:17 AM Frank Li <Frank.li@....com> wrote:
>
> On Wed, Jul 16, 2025 at 02:11:12PM +0800, Shengjiu Wang wrote:
> > The wm8524 codec is connected to the SAI interface. There are two audio
> > plls on i.MX8MM, one pll can be the clock source of 44kHz series rates,
> > another pll can be clock source of 48kHz series rates.
> >
> > Add mclk-fs property for the clock ratio, remove 'clocks' property for
> > codec that doesn't need to handle clock enablement, add
> > 'system-clock-direction-out' for clock is from cpu dai.
>
> Can you provide the reason why need such change?
As commit
17cc308b1833 ASoC: wm8524: enable constraints when sysclk is configured.
make wm8524 release the constraint when codec's sysclk is not configured
so we can configure the cpu dai's sysclk to support more rates. previously it
only support 48k series rates, now it can support 44k series rates.
will add these info is commit message.
>
> >
> > Signed-off-by: Shengjiu Wang <shengjiu.wang@....com>
> > ---
> > arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi | 17 +++++++++++++----
> > 1 file changed, 13 insertions(+), 4 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi
> > index 622caaa78eaf..ff7ca2075230 100644
> > --- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi
> > @@ -147,6 +147,7 @@ sound-wm8524 {
> > simple-audio-card,format = "i2s";
> > simple-audio-card,frame-master = <&cpudai>;
> > simple-audio-card,bitclock-master = <&cpudai>;
> > + simple-audio-card,mclk-fs = <256>;
>
> what's measn 256? Do you need mention in commit message?
mclk-fs is the ratio to calculate the sysclk, sysclk = mclk-fs * sample rate.
256 is a common ratio for audio.
will add these info in commit message.
best regards
Shengjiu Wang
>
> Frank
> > simple-audio-card,widgets =
> > "Line", "Left Line Out Jack",
> > "Line", "Right Line Out Jack";
> > @@ -158,11 +159,11 @@ cpudai: simple-audio-card,cpu {
> > sound-dai = <&sai3>;
> > dai-tdm-slot-num = <2>;
> > dai-tdm-slot-width = <32>;
> > + system-clock-direction-out;
> > };
> >
> > simple-audio-card,codec {
> > sound-dai = <&wm8524>;
> > - clocks = <&clk IMX8MM_CLK_SAI3_ROOT>;
> > };
> > };
> >
> > @@ -570,9 +571,17 @@ &sai2 {
> > &sai3 {
> > pinctrl-names = "default";
> > pinctrl-0 = <&pinctrl_sai3>;
> > - assigned-clocks = <&clk IMX8MM_CLK_SAI3>;
> > - assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
> > - assigned-clock-rates = <24576000>;
> > + assigned-clocks = <&clk IMX8MM_AUDIO_PLL1>,
> > + <&clk IMX8MM_AUDIO_PLL2>,
> > + <&clk IMX8MM_CLK_SAI3>;
> > + assigned-clock-parents = <0>, <0>, <&clk IMX8MM_AUDIO_PLL1_OUT>;
> > + assigned-clock-rates = <393216000>, <361267200>, <24576000>;
> > + fsl,sai-mclk-direction-output;
> > + clocks = <&clk IMX8MM_CLK_SAI3_IPG>, <&clk IMX8MM_CLK_DUMMY>,
> > + <&clk IMX8MM_CLK_SAI3_ROOT>, <&clk IMX8MM_CLK_DUMMY>,
> > + <&clk IMX8MM_CLK_DUMMY>, <&clk IMX8MM_AUDIO_PLL1_OUT>,
> > + <&clk IMX8MM_AUDIO_PLL2_OUT>;
> > + clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", "pll11k";
> > status = "okay";
> > };
> >
> > --
> > 2.34.1
> >
Powered by blists - more mailing lists