All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM64: dts: imx8mm-evk: Assigned clocks for audio plls
@ 2019-10-16 10:36 ` S.j. Wang
  0 siblings, 0 replies; 8+ messages in thread
From: S.j. Wang @ 2019-10-16 10:36 UTC (permalink / raw)
  To: robh+dt, mark.rutland, shawnguo, s.hauer, kernel, festevam,
	dl-linux-imx, Anson Huang, Jacky Bai, Jun Li, Leonard Crestez,
	Daniel Baluta, daniel.lezcano, S.j. Wang, devicetree,
	linux-arm-kernel, linux-kernel

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 <shengjiu.wang@nxp.com>
---
 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 = <&sai3>;
+			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 @@
 						<&clk IMX8MM_CLK_AUDIO_AHB>,
 						<&clk IMX8MM_CLK_IPG_AUDIO_ROOT>,
 						<&clk IMX8MM_SYS_PLL3>,
-						<&clk IMX8MM_VIDEO_PLL1>;
+						<&clk IMX8MM_VIDEO_PLL1>,
+						<&clk IMX8MM_AUDIO_PLL1>,
+						<&clk IMX8MM_AUDIO_PLL2>;
 				assigned-clock-parents = <&clk IMX8MM_SYS_PLL3_OUT>,
 							 <&clk IMX8MM_SYS_PLL1_800M>;
 				assigned-clock-rates = <0>,
 							<400000000>,
 							<400000000>,
 							<750000000>,
-							<594000000>;
+							<594000000>,
+							<393216000>,
+							<361267200>;
 			};
 
 			src: reset-controller@30390000 {
-- 
2.21.0


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

* [PATCH] ARM64: dts: imx8mm-evk: Assigned clocks for audio plls
@ 2019-10-16 10:36 ` S.j. Wang
  0 siblings, 0 replies; 8+ messages in thread
From: S.j. Wang @ 2019-10-16 10:36 UTC (permalink / raw)
  To: robh+dt, mark.rutland, shawnguo, s.hauer, kernel, festevam,
	dl-linux-imx, Anson Huang, Jacky Bai, Jun Li, Leonard Crestez,
	Daniel Baluta, daniel.lezcano, S.j. Wang, devicetree,
	linux-arm-kernel, linux-kernel

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 <shengjiu.wang@nxp.com>
---
 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 = <&sai3>;
+			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 @@
 						<&clk IMX8MM_CLK_AUDIO_AHB>,
 						<&clk IMX8MM_CLK_IPG_AUDIO_ROOT>,
 						<&clk IMX8MM_SYS_PLL3>,
-						<&clk IMX8MM_VIDEO_PLL1>;
+						<&clk IMX8MM_VIDEO_PLL1>,
+						<&clk IMX8MM_AUDIO_PLL1>,
+						<&clk IMX8MM_AUDIO_PLL2>;
 				assigned-clock-parents = <&clk IMX8MM_SYS_PLL3_OUT>,
 							 <&clk IMX8MM_SYS_PLL1_800M>;
 				assigned-clock-rates = <0>,
 							<400000000>,
 							<400000000>,
 							<750000000>,
-							<594000000>;
+							<594000000>,
+							<393216000>,
+							<361267200>;
 			};
 
 			src: reset-controller@30390000 {
-- 
2.21.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM64: dts: imx8mm-evk: Assigned clocks for audio plls
  2019-10-16 10:36 ` S.j. Wang
@ 2019-10-16 11:14   ` Daniel Baluta
  -1 siblings, 0 replies; 8+ messages in thread
From: Daniel Baluta @ 2019-10-16 11:14 UTC (permalink / raw)
  To: dl-linux-imx, linux-kernel, robh+dt, devicetree, daniel.lezcano,
	festevam, Jacky Bai, Jun Li, mark.rutland, shawnguo,
	linux-arm-kernel, S.j. Wang, Anson Huang, Leonard Crestez,
	kernel, s.hauer

On Wed, 2019-10-16 at 10:36 +0000, 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 <shengjiu.wang@nxp.com>

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>

> ---
>  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 = <&sai3>;
> +			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 @@
>  						<&clk
> IMX8MM_CLK_AUDIO_AHB>,
>  						<&clk
> IMX8MM_CLK_IPG_AUDIO_ROOT>,
>  						<&clk IMX8MM_SYS_PLL3>,
> -						<&clk
> IMX8MM_VIDEO_PLL1>;
> +						<&clk
> IMX8MM_VIDEO_PLL1>,
> +						<&clk
> IMX8MM_AUDIO_PLL1>,
> +						<&clk
> IMX8MM_AUDIO_PLL2>;
>  				assigned-clock-parents = <&clk
> IMX8MM_SYS_PLL3_OUT>,
>  							 <&clk
> IMX8MM_SYS_PLL1_800M>;
>  				assigned-clock-rates = <0>,
>  							<400000000>,
>  							<400000000>,
>  							<750000000>,
> -							<594000000>;
> +							<594000000>,
> +							<393216000>,
> +							<361267200>;
>  			};
>  
>  			src: reset-controller@30390000 {

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

* Re: [PATCH] ARM64: dts: imx8mm-evk: Assigned clocks for audio plls
@ 2019-10-16 11:14   ` Daniel Baluta
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Baluta @ 2019-10-16 11:14 UTC (permalink / raw)
  To: dl-linux-imx, linux-kernel, robh+dt, devicetree, daniel.lezcano,
	festevam, Jacky Bai, Jun Li, mark.rutland, shawnguo,
	linux-arm-kernel, S.j. Wang, Anson Huang, Leonard Crestez,
	kernel, s.hauer

On Wed, 2019-10-16 at 10:36 +0000, 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 <shengjiu.wang@nxp.com>

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>

> ---
>  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 = <&sai3>;
> +			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 @@
>  						<&clk
> IMX8MM_CLK_AUDIO_AHB>,
>  						<&clk
> IMX8MM_CLK_IPG_AUDIO_ROOT>,
>  						<&clk IMX8MM_SYS_PLL3>,
> -						<&clk
> IMX8MM_VIDEO_PLL1>;
> +						<&clk
> IMX8MM_VIDEO_PLL1>,
> +						<&clk
> IMX8MM_AUDIO_PLL1>,
> +						<&clk
> IMX8MM_AUDIO_PLL2>;
>  				assigned-clock-parents = <&clk
> IMX8MM_SYS_PLL3_OUT>,
>  							 <&clk
> IMX8MM_SYS_PLL1_800M>;
>  				assigned-clock-rates = <0>,
>  							<400000000>,
>  							<400000000>,
>  							<750000000>,
> -							<594000000>;
> +							<594000000>,
> +							<393216000>,
> +							<361267200>;
>  			};
>  
>  			src: reset-controller@30390000 {
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM64: dts: imx8mm-evk: Assigned clocks for audio plls
  2019-10-16 10:36 ` S.j. Wang
@ 2019-10-26 12:46   ` Shawn Guo
  -1 siblings, 0 replies; 8+ messages in thread
From: Shawn Guo @ 2019-10-26 12:46 UTC (permalink / raw)
  To: S.j. Wang
  Cc: robh+dt, mark.rutland, s.hauer, kernel, festevam, dl-linux-imx,
	Anson Huang, Jacky Bai, Jun Li, Leonard Crestez, Daniel Baluta,
	daniel.lezcano, devicetree, linux-arm-kernel, linux-kernel

On Wed, Oct 16, 2019 at 10:36:05AM +0000, 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 <shengjiu.wang@nxp.com>

As a practise, we use prefix 'ARM: ...' for arch/arm/ and 'arm64: ...'
for arch/arm64/ patches.

I fixed up the prefix and applied the patch.

Shawn

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

* Re: [PATCH] ARM64: dts: imx8mm-evk: Assigned clocks for audio plls
@ 2019-10-26 12:46   ` Shawn Guo
  0 siblings, 0 replies; 8+ messages in thread
From: Shawn Guo @ 2019-10-26 12:46 UTC (permalink / raw)
  To: S.j. Wang
  Cc: mark.rutland, devicetree, Jacky Bai, Anson Huang, Daniel Baluta,
	s.hauer, daniel.lezcano, linux-kernel, robh+dt, dl-linux-imx,
	kernel, Leonard Crestez, festevam, linux-arm-kernel, Jun Li

On Wed, Oct 16, 2019 at 10:36:05AM +0000, 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 <shengjiu.wang@nxp.com>

As a practise, we use prefix 'ARM: ...' for arch/arm/ and 'arm64: ...'
for arch/arm64/ patches.

I fixed up the prefix and applied the patch.

Shawn

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM64: dts: imx8mm-evk: Assigned clocks for audio plls
  2019-10-16 10:36 ` S.j. Wang
@ 2020-05-19 20:29   ` Tim Harvey
  -1 siblings, 0 replies; 8+ messages in thread
From: Tim Harvey @ 2020-05-19 20:29 UTC (permalink / raw)
  To: S.j. Wang
  Cc: robh+dt, mark.rutland, shawnguo, s.hauer, kernel, festevam,
	dl-linux-imx, Anson Huang, Jacky Bai, Jun Li, Leonard Crestez,
	Daniel Baluta, daniel.lezcano, devicetree, linux-arm-kernel,
	linux-kernel

On Wed, Oct 16, 2019 at 3:36 AM S.j. Wang <shengjiu.wang@nxp.com> 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 <shengjiu.wang@nxp.com>
> ---
>  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 = <&sai3>;
> +                       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

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

* Re: [PATCH] ARM64: dts: imx8mm-evk: Assigned clocks for audio plls
@ 2020-05-19 20:29   ` Tim Harvey
  0 siblings, 0 replies; 8+ messages in thread
From: Tim Harvey @ 2020-05-19 20:29 UTC (permalink / raw)
  To: S.j. Wang
  Cc: mark.rutland, devicetree, Jacky Bai, Anson Huang, shawnguo,
	s.hauer, daniel.lezcano, linux-kernel, Daniel Baluta, robh+dt,
	dl-linux-imx, kernel, Leonard Crestez, festevam,
	linux-arm-kernel, Jun Li

On Wed, Oct 16, 2019 at 3:36 AM S.j. Wang <shengjiu.wang@nxp.com> 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 <shengjiu.wang@nxp.com>
> ---
>  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 = <&sai3>;
> +                       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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-05-19 20:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-16 10:36 [PATCH] ARM64: dts: imx8mm-evk: Assigned clocks for audio plls S.j. Wang
2019-10-16 10:36 ` S.j. Wang
2019-10-16 11:14 ` Daniel Baluta
2019-10-16 11:14   ` Daniel Baluta
2019-10-26 12:46 ` Shawn Guo
2019-10-26 12:46   ` Shawn Guo
2020-05-19 20:29 ` Tim Harvey
2020-05-19 20:29   ` Tim Harvey

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.