Re: [PATCH] ARM64: dts: imx8mm-evk: Assigned clocks for audio plls
On Wed, Oct 16, 2019 at 3:36 AM S.j. Wang wrote: > > Assign clocks and clock-rates for audio plls, that audio > drivers can utilize them. > > Add dai-tdm-slot-num and dai-tdm-slot-width for sound-wm8524, > that sai driver can generate correct bit clock. > > Fixes: 13f3b9fdef6c ("arm64: dts: imx8mm-evk: Enable audio codec wm8524") > Signed-off-by: Shengjiu Wang > --- > arch/arm64/boot/dts/freescale/imx8mm-evk.dts | 2 ++ > arch/arm64/boot/dts/freescale/imx8mm.dtsi| 8 ++-- > 2 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts > b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts > index f7a15f3904c2..13137451b438 100644 > --- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts > +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts > @@ -62,6 +62,8 @@ > > cpudai: simple-audio-card,cpu { > sound-dai = <>; > + dai-tdm-slot-num = <2>; > + dai-tdm-slot-width = <32>; > }; > Shengjiu, Can you explain the why dai-tdm-slot-width here is 32? I noticed when I assigned that for an imx8mm board I'm working on (that uses a tlv320aic3x codec) I ended up with the clock being off by a factor of 2 (audio playback was 2x too slow). Best Regards, Tim
Re: [PATCH] ARM64: dts: imx8mm-evk: Assigned clocks for audio plls
On Wed, 2019-10-16 at 10:36 +, S.j. Wang wrote: > Assign clocks and clock-rates for audio plls, that audio > drivers can utilize them. > > Add dai-tdm-slot-num and dai-tdm-slot-width for sound-wm8524, > that sai driver can generate correct bit clock. > > Fixes: 13f3b9fdef6c ("arm64: dts: imx8mm-evk: Enable audio codec > wm8524") > Signed-off-by: Shengjiu Wang Reviewed-by: Daniel Baluta > --- > arch/arm64/boot/dts/freescale/imx8mm-evk.dts | 2 ++ > arch/arm64/boot/dts/freescale/imx8mm.dtsi| 8 ++-- > 2 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts > b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts > index f7a15f3904c2..13137451b438 100644 > --- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts > +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts > @@ -62,6 +62,8 @@ > > cpudai: simple-audio-card,cpu { > sound-dai = <>; > + dai-tdm-slot-num = <2>; > + dai-tdm-slot-width = <32>; > }; > > simple-audio-card,codec { > diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi > b/arch/arm64/boot/dts/freescale/imx8mm.dtsi > index 5f9d0da196e1..2139c0a9c495 100644 > --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi > +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi > @@ -479,14 +479,18 @@ > < > IMX8MM_CLK_AUDIO_AHB>, > < > IMX8MM_CLK_IPG_AUDIO_ROOT>, > < IMX8MM_SYS_PLL3>, > - < > IMX8MM_VIDEO_PLL1>; > + < > IMX8MM_VIDEO_PLL1>, > + < > IMX8MM_AUDIO_PLL1>, > + < > IMX8MM_AUDIO_PLL2>; > assigned-clock-parents = < > IMX8MM_SYS_PLL3_OUT>, >< > IMX8MM_SYS_PLL1_800M>; > assigned-clock-rates = <0>, > <4>, > <4>, > <75000>, > - <59400>; > + <59400>, > + <393216000>, > + <361267200>; > }; > > src: reset-controller@3039 {
[PATCH] ARM64: dts: imx8mm-evk: Assigned clocks for audio plls
Assign clocks and clock-rates for audio plls, that audio drivers can utilize them. Add dai-tdm-slot-num and dai-tdm-slot-width for sound-wm8524, that sai driver can generate correct bit clock. Fixes: 13f3b9fdef6c ("arm64: dts: imx8mm-evk: Enable audio codec wm8524") Signed-off-by: Shengjiu Wang --- arch/arm64/boot/dts/freescale/imx8mm-evk.dts | 2 ++ arch/arm64/boot/dts/freescale/imx8mm.dtsi| 8 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts index f7a15f3904c2..13137451b438 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts @@ -62,6 +62,8 @@ cpudai: simple-audio-card,cpu { sound-dai = <>; + dai-tdm-slot-num = <2>; + dai-tdm-slot-width = <32>; }; simple-audio-card,codec { diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi index 5f9d0da196e1..2139c0a9c495 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi @@ -479,14 +479,18 @@ < IMX8MM_CLK_AUDIO_AHB>, < IMX8MM_CLK_IPG_AUDIO_ROOT>, < IMX8MM_SYS_PLL3>, - < IMX8MM_VIDEO_PLL1>; + < IMX8MM_VIDEO_PLL1>, + < IMX8MM_AUDIO_PLL1>, + < IMX8MM_AUDIO_PLL2>; assigned-clock-parents = < IMX8MM_SYS_PLL3_OUT>, < IMX8MM_SYS_PLL1_800M>; assigned-clock-rates = <0>, <4>, <4>, <75000>, - <59400>; + <59400>, + <393216000>, + <361267200>; }; src: reset-controller@3039 { -- 2.21.0