devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: imx8mp-beacon-kit: Fix Stereo Audio on WM8962
@ 2024-07-14 17:20 Adam Ford
  2024-07-30 13:04 ` Adam Ford
  2024-08-12  3:36 ` Shawn Guo
  0 siblings, 2 replies; 3+ messages in thread
From: Adam Ford @ 2024-07-14 17:20 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: aford, Adam Ford, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Lucas Stach, devicetree, imx, linux-kernel

The L/R clock needs to be controlled by the SAI3 instead of the
CODEC to properly achieve stereo sound. Doing this allows removes
the need for unnecessary clock manipulation to try to get the
CODEC's clock in sync with the SAI3 clock, since the CODEC can cope
with a wide variety of clock inputs.

Fixes: 161af16c18f3 ("arm64: dts: imx8mp-beacon-kit: Fix audio_pll2 clock")
Fixes: 69e2f37a6ddc ("arm64: dts: imx8mp-beacon-kit: Enable WM8962 Audio CODEC")
Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts
index 1871c10f5c12..de5b64fa479a 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts
@@ -222,13 +222,12 @@ sound-wm8962 {
 
 		simple-audio-card,cpu {
 			sound-dai = <&sai3>;
+			frame-master;
+			bitclock-master;
 		};
 
 		simple-audio-card,codec {
 			sound-dai = <&wm8962>;
-			clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO1>;
-			frame-master;
-			bitclock-master;
 		};
 	};
 };
@@ -544,10 +543,9 @@ &pcie_phy {
 &sai3 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_sai3>;
-	assigned-clocks = <&clk IMX8MP_CLK_SAI3>,
-			  <&clk IMX8MP_AUDIO_PLL2> ;
-	assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL2_OUT>;
-	assigned-clock-rates = <12288000>, <361267200>;
+	assigned-clocks = <&clk IMX8MP_CLK_SAI3>;
+	assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
+	assigned-clock-rates = <12288000>;
 	fsl,sai-mclk-direction-output;
 	status = "okay";
 };
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: dts: imx8mp-beacon-kit: Fix Stereo Audio on WM8962
  2024-07-14 17:20 [PATCH] arm64: dts: imx8mp-beacon-kit: Fix Stereo Audio on WM8962 Adam Ford
@ 2024-07-30 13:04 ` Adam Ford
  2024-08-12  3:36 ` Shawn Guo
  1 sibling, 0 replies; 3+ messages in thread
From: Adam Ford @ 2024-07-30 13:04 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: aford, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Lucas Stach,
	devicetree, imx, linux-kernel

On Sun, Jul 14, 2024 at 12:20 PM Adam Ford <aford173@gmail.com> wrote:
>
> The L/R clock needs to be controlled by the SAI3 instead of the
> CODEC to properly achieve stereo sound. Doing this allows removes
> the need for unnecessary clock manipulation to try to get the
> CODEC's clock in sync with the SAI3 clock, since the CODEC can cope
> with a wide variety of clock inputs.

Shawn,

Any chance this could get reviewed and/or applied?

thanks,

adam

>
> Fixes: 161af16c18f3 ("arm64: dts: imx8mp-beacon-kit: Fix audio_pll2 clock")
> Fixes: 69e2f37a6ddc ("arm64: dts: imx8mp-beacon-kit: Enable WM8962 Audio CODEC")
> Signed-off-by: Adam Ford <aford173@gmail.com>
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts
> index 1871c10f5c12..de5b64fa479a 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts
> @@ -222,13 +222,12 @@ sound-wm8962 {
>
>                 simple-audio-card,cpu {
>                         sound-dai = <&sai3>;
> +                       frame-master;
> +                       bitclock-master;
>                 };
>
>                 simple-audio-card,codec {
>                         sound-dai = <&wm8962>;
> -                       clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO1>;
> -                       frame-master;
> -                       bitclock-master;
>                 };
>         };
>  };
> @@ -544,10 +543,9 @@ &pcie_phy {
>  &sai3 {
>         pinctrl-names = "default";
>         pinctrl-0 = <&pinctrl_sai3>;
> -       assigned-clocks = <&clk IMX8MP_CLK_SAI3>,
> -                         <&clk IMX8MP_AUDIO_PLL2> ;
> -       assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL2_OUT>;
> -       assigned-clock-rates = <12288000>, <361267200>;
> +       assigned-clocks = <&clk IMX8MP_CLK_SAI3>;
> +       assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
> +       assigned-clock-rates = <12288000>;
>         fsl,sai-mclk-direction-output;
>         status = "okay";
>  };
> --
> 2.43.0
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: dts: imx8mp-beacon-kit: Fix Stereo Audio on WM8962
  2024-07-14 17:20 [PATCH] arm64: dts: imx8mp-beacon-kit: Fix Stereo Audio on WM8962 Adam Ford
  2024-07-30 13:04 ` Adam Ford
@ 2024-08-12  3:36 ` Shawn Guo
  1 sibling, 0 replies; 3+ messages in thread
From: Shawn Guo @ 2024-08-12  3:36 UTC (permalink / raw)
  To: Adam Ford
  Cc: linux-arm-kernel, aford, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Lucas Stach, devicetree, imx, linux-kernel

On Sun, Jul 14, 2024 at 12:20:17PM -0500, Adam Ford wrote:
> The L/R clock needs to be controlled by the SAI3 instead of the
> CODEC to properly achieve stereo sound. Doing this allows removes
> the need for unnecessary clock manipulation to try to get the
> CODEC's clock in sync with the SAI3 clock, since the CODEC can cope
> with a wide variety of clock inputs.
> 
> Fixes: 161af16c18f3 ("arm64: dts: imx8mp-beacon-kit: Fix audio_pll2 clock")
> Fixes: 69e2f37a6ddc ("arm64: dts: imx8mp-beacon-kit: Enable WM8962 Audio CODEC")
> Signed-off-by: Adam Ford <aford173@gmail.com>

Applied, thanks!


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-12  3:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-14 17:20 [PATCH] arm64: dts: imx8mp-beacon-kit: Fix Stereo Audio on WM8962 Adam Ford
2024-07-30 13:04 ` Adam Ford
2024-08-12  3:36 ` Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).