linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] arm: dts: imx7: Use audio_mclk_post_div instead audio_mclk_root_clk
@ 2022-01-27 14:10 Abel Vesa
  2022-01-27 14:10 ` [PATCH 2/2] clk: imx: Remove audio_mclk_root_clk Abel Vesa
  2022-02-11  4:22 ` [PATCH 1/2] arm: dts: imx7: Use audio_mclk_post_div instead audio_mclk_root_clk Shawn Guo
  0 siblings, 2 replies; 5+ messages in thread
From: Abel Vesa @ 2022-01-27 14:10 UTC (permalink / raw)
  To: Stephen Boyd, Rob Herring, Shawn Guo, Sascha Hauer, Mike Turquette
  Cc: Pengutronix Kernel Team, Peng Fan, Fabio Estevam, NXP Linux Team,
	Frank Li, devicetree, linux-arm-kernel,
	Linux Kernel Mailing List, linux-clk

The audio_mclk_root_clk was added as a gate with the CCGR121 (0x4790),
but according to the reference manual, there is no such gate. Moreover,
the consumer driver of the mentioned clock might gate it and leave
the ECSPI2 (the true owner of that gate) hanging. So lets use the
audio_mclk_post_div, which is the parent.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
---
 arch/arm/boot/dts/imx7-colibri.dtsi     | 4 ++--
 arch/arm/boot/dts/imx7-mba7.dtsi        | 2 +-
 arch/arm/boot/dts/imx7d-nitrogen7.dts   | 2 +-
 arch/arm/boot/dts/imx7d-pico-hobbit.dts | 4 ++--
 arch/arm/boot/dts/imx7d-pico-pi.dts     | 4 ++--
 arch/arm/boot/dts/imx7d-sdb.dts         | 4 ++--
 arch/arm/boot/dts/imx7s-warp.dts        | 4 ++--
 7 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/arm/boot/dts/imx7-colibri.dtsi b/arch/arm/boot/dts/imx7-colibri.dtsi
index 62b771c1d5a9..f1c60b0cb143 100644
--- a/arch/arm/boot/dts/imx7-colibri.dtsi
+++ b/arch/arm/boot/dts/imx7-colibri.dtsi
@@ -40,7 +40,7 @@ simple-audio-card,cpu {
 
 		dailink_master: simple-audio-card,codec {
 			sound-dai = <&codec>;
-			clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
+			clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
 		};
 	};
 };
@@ -293,7 +293,7 @@ codec: sgtl5000@a {
 		compatible = "fsl,sgtl5000";
 		#sound-dai-cells = <0>;
 		reg = <0x0a>;
-		clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
+		clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_sai1_mclk>;
 		VDDA-supply = <&reg_module_3v3_avdd>;
diff --git a/arch/arm/boot/dts/imx7-mba7.dtsi b/arch/arm/boot/dts/imx7-mba7.dtsi
index 49086c6b6a0a..3df6dff7734a 100644
--- a/arch/arm/boot/dts/imx7-mba7.dtsi
+++ b/arch/arm/boot/dts/imx7-mba7.dtsi
@@ -302,7 +302,7 @@ &i2c2 {
 	tlv320aic32x4: audio-codec@18 {
 		compatible = "ti,tlv320aic32x4";
 		reg = <0x18>;
-		clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
+		clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
 		clock-names = "mclk";
 		ldoin-supply = <&reg_audio_3v3>;
 		iov-supply = <&reg_audio_3v3>;
diff --git a/arch/arm/boot/dts/imx7d-nitrogen7.dts b/arch/arm/boot/dts/imx7d-nitrogen7.dts
index e0751e6ba3c0..a31de900139d 100644
--- a/arch/arm/boot/dts/imx7d-nitrogen7.dts
+++ b/arch/arm/boot/dts/imx7d-nitrogen7.dts
@@ -288,7 +288,7 @@ &i2c4 {
 	codec: wm8960@1a {
 		compatible = "wlf,wm8960";
 		reg = <0x1a>;
-		clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
+		clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
 		clock-names = "mclk";
 		wlf,shared-lrclk;
 	};
diff --git a/arch/arm/boot/dts/imx7d-pico-hobbit.dts b/arch/arm/boot/dts/imx7d-pico-hobbit.dts
index 7b2198a9372c..d917dc4f2f22 100644
--- a/arch/arm/boot/dts/imx7d-pico-hobbit.dts
+++ b/arch/arm/boot/dts/imx7d-pico-hobbit.dts
@@ -31,7 +31,7 @@ simple-audio-card,cpu {
 
 		dailink_master: simple-audio-card,codec {
 			sound-dai = <&sgtl5000>;
-			clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
+			clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
 		};
 	};
 };
@@ -41,7 +41,7 @@ sgtl5000: codec@a {
 		#sound-dai-cells = <0>;
 		reg = <0x0a>;
 		compatible = "fsl,sgtl5000";
-		clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
+		clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
 		VDDA-supply = <&reg_2p5v>;
 		VDDIO-supply = <&reg_vref_1v8>;
 	};
diff --git a/arch/arm/boot/dts/imx7d-pico-pi.dts b/arch/arm/boot/dts/imx7d-pico-pi.dts
index 70bea95c06d8..f263e391e24c 100644
--- a/arch/arm/boot/dts/imx7d-pico-pi.dts
+++ b/arch/arm/boot/dts/imx7d-pico-pi.dts
@@ -31,7 +31,7 @@ simple-audio-card,cpu {
 
 		dailink_master: simple-audio-card,codec {
 			sound-dai = <&sgtl5000>;
-			clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
+			clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
 		};
 	};
 };
@@ -41,7 +41,7 @@ sgtl5000: codec@a {
 		#sound-dai-cells = <0>;
 		reg = <0x0a>;
 		compatible = "fsl,sgtl5000";
-		clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
+		clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
 		VDDA-supply = <&reg_2p5v>;
 		VDDIO-supply = <&reg_vref_1v8>;
 	};
diff --git a/arch/arm/boot/dts/imx7d-sdb.dts b/arch/arm/boot/dts/imx7d-sdb.dts
index 7813ef960f6e..f053f5122741 100644
--- a/arch/arm/boot/dts/imx7d-sdb.dts
+++ b/arch/arm/boot/dts/imx7d-sdb.dts
@@ -385,14 +385,14 @@ &i2c4 {
 	codec: wm8960@1a {
 		compatible = "wlf,wm8960";
 		reg = <0x1a>;
-		clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
+		clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
 		clock-names = "mclk";
 		wlf,shared-lrclk;
 		wlf,hp-cfg = <2 2 3>;
 		wlf,gpio-cfg = <1 3>;
 		assigned-clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_SRC>,
 				  <&clks IMX7D_PLL_AUDIO_POST_DIV>,
-				  <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
+				  <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
 		assigned-clock-parents = <&clks IMX7D_PLL_AUDIO_POST_DIV>;
 		assigned-clock-rates = <0>, <884736000>, <12288000>;
 	};
diff --git a/arch/arm/boot/dts/imx7s-warp.dts b/arch/arm/boot/dts/imx7s-warp.dts
index 4f1edef06c92..e8734d218b9d 100644
--- a/arch/arm/boot/dts/imx7s-warp.dts
+++ b/arch/arm/boot/dts/imx7s-warp.dts
@@ -75,7 +75,7 @@ simple-audio-card,cpu {
 
 		dailink_master: simple-audio-card,codec {
 			sound-dai = <&codec>;
-			clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
+			clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
 		};
 	};
 };
@@ -232,7 +232,7 @@ codec: sgtl5000@a {
 		#sound-dai-cells = <0>;
 		reg = <0x0a>;
 		compatible = "fsl,sgtl5000";
-		clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
+		clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_DIV>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_sai1_mclk>;
 		VDDA-supply = <&vgen4_reg>;
-- 
2.31.1


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

* [PATCH 2/2] clk: imx: Remove audio_mclk_root_clk
  2022-01-27 14:10 [PATCH 1/2] arm: dts: imx7: Use audio_mclk_post_div instead audio_mclk_root_clk Abel Vesa
@ 2022-01-27 14:10 ` Abel Vesa
  2022-02-22  1:12   ` Peng Fan
  2022-02-22  8:12   ` Abel Vesa
  2022-02-11  4:22 ` [PATCH 1/2] arm: dts: imx7: Use audio_mclk_post_div instead audio_mclk_root_clk Shawn Guo
  1 sibling, 2 replies; 5+ messages in thread
From: Abel Vesa @ 2022-01-27 14:10 UTC (permalink / raw)
  To: Stephen Boyd, Rob Herring, Shawn Guo, Sascha Hauer, Mike Turquette
  Cc: Pengutronix Kernel Team, Peng Fan, Fabio Estevam, NXP Linux Team,
	Frank Li, devicetree, linux-arm-kernel,
	Linux Kernel Mailing List, linux-clk, David Wolfe

The audio_mclk_root_clk was added as a gate with the CCGR121 (0x4790),
but according to the reference manual, there is no such gate. The
CCGR121 belongs to ECSPI2 and it is not shared.

Fixes: 8f6d8094b215b57 ("ARM: imx: add imx7d clk tree support")
Reported-by: David Wolfe <david.wolfe@nxp.com>
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
---
 drivers/clk/imx/clk-imx7d.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/clk/imx/clk-imx7d.c b/drivers/clk/imx/clk-imx7d.c
index c4e0f1c07192..3f6fd7ef2a68 100644
--- a/drivers/clk/imx/clk-imx7d.c
+++ b/drivers/clk/imx/clk-imx7d.c
@@ -849,7 +849,6 @@ static void __init imx7d_clocks_init(struct device_node *ccm_node)
 	hws[IMX7D_WDOG4_ROOT_CLK] = imx_clk_hw_gate4("wdog4_root_clk", "wdog_post_div", base + 0x49f0, 0);
 	hws[IMX7D_KPP_ROOT_CLK] = imx_clk_hw_gate4("kpp_root_clk", "ipg_root_clk", base + 0x4aa0, 0);
 	hws[IMX7D_CSI_MCLK_ROOT_CLK] = imx_clk_hw_gate4("csi_mclk_root_clk", "csi_mclk_post_div", base + 0x4490, 0);
-	hws[IMX7D_AUDIO_MCLK_ROOT_CLK] = imx_clk_hw_gate4("audio_mclk_root_clk", "audio_mclk_post_div", base + 0x4790, 0);
 	hws[IMX7D_WRCLK_ROOT_CLK] = imx_clk_hw_gate4("wrclk_root_clk", "wrclk_post_div", base + 0x47a0, 0);
 	hws[IMX7D_USB_CTRL_CLK] = imx_clk_hw_gate4("usb_ctrl_clk", "ahb_root_clk", base + 0x4680, 0);
 	hws[IMX7D_USB_PHY1_CLK] = imx_clk_hw_gate4("usb_phy1_clk", "pll_usb1_main_clk", base + 0x46a0, 0);
-- 
2.31.1


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

* Re: [PATCH 1/2] arm: dts: imx7: Use audio_mclk_post_div instead audio_mclk_root_clk
  2022-01-27 14:10 [PATCH 1/2] arm: dts: imx7: Use audio_mclk_post_div instead audio_mclk_root_clk Abel Vesa
  2022-01-27 14:10 ` [PATCH 2/2] clk: imx: Remove audio_mclk_root_clk Abel Vesa
@ 2022-02-11  4:22 ` Shawn Guo
  1 sibling, 0 replies; 5+ messages in thread
From: Shawn Guo @ 2022-02-11  4:22 UTC (permalink / raw)
  To: Abel Vesa
  Cc: Stephen Boyd, Rob Herring, Sascha Hauer, Mike Turquette,
	Pengutronix Kernel Team, Peng Fan, Fabio Estevam, NXP Linux Team,
	Frank Li, devicetree, linux-arm-kernel,
	Linux Kernel Mailing List, linux-clk

On Thu, Jan 27, 2022 at 04:10:51PM +0200, Abel Vesa wrote:
> The audio_mclk_root_clk was added as a gate with the CCGR121 (0x4790),
> but according to the reference manual, there is no such gate. Moreover,
> the consumer driver of the mentioned clock might gate it and leave
> the ECSPI2 (the true owner of that gate) hanging. So lets use the
> audio_mclk_post_div, which is the parent.
> 
> Signed-off-by: Abel Vesa <abel.vesa@nxp.com>

Applied, thanks!

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

* RE: [PATCH 2/2] clk: imx: Remove audio_mclk_root_clk
  2022-01-27 14:10 ` [PATCH 2/2] clk: imx: Remove audio_mclk_root_clk Abel Vesa
@ 2022-02-22  1:12   ` Peng Fan
  2022-02-22  8:12   ` Abel Vesa
  1 sibling, 0 replies; 5+ messages in thread
From: Peng Fan @ 2022-02-22  1:12 UTC (permalink / raw)
  To: Abel Vesa, Stephen Boyd, Rob Herring, Shawn Guo, Sascha Hauer,
	Mike Turquette
  Cc: Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx, Frank Li,
	devicetree, linux-arm-kernel, Linux Kernel Mailing List,
	linux-clk, David Wolfe

> Subject: [PATCH 2/2] clk: imx: Remove audio_mclk_root_clk
> 
> The audio_mclk_root_clk was added as a gate with the CCGR121 (0x4790),
> but according to the reference manual, there is no such gate. The
> CCGR121 belongs to ECSPI2 and it is not shared.
> 
> Fixes: 8f6d8094b215b57 ("ARM: imx: add imx7d clk tree support")
> Reported-by: David Wolfe <david.wolfe@nxp.com>
> Signed-off-by: Abel Vesa <abel.vesa@nxp.com>

Reviewed-by: Peng Fan <peng.fan@nxp.com>

> ---
>  drivers/clk/imx/clk-imx7d.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/clk/imx/clk-imx7d.c b/drivers/clk/imx/clk-imx7d.c index
> c4e0f1c07192..3f6fd7ef2a68 100644
> --- a/drivers/clk/imx/clk-imx7d.c
> +++ b/drivers/clk/imx/clk-imx7d.c
> @@ -849,7 +849,6 @@ static void __init imx7d_clocks_init(struct
> device_node *ccm_node)
>  	hws[IMX7D_WDOG4_ROOT_CLK] =
> imx_clk_hw_gate4("wdog4_root_clk", "wdog_post_div", base + 0x49f0, 0);
>  	hws[IMX7D_KPP_ROOT_CLK] = imx_clk_hw_gate4("kpp_root_clk",
> "ipg_root_clk", base + 0x4aa0, 0);
>  	hws[IMX7D_CSI_MCLK_ROOT_CLK] =
> imx_clk_hw_gate4("csi_mclk_root_clk", "csi_mclk_post_div", base + 0x4490,
> 0);
> -	hws[IMX7D_AUDIO_MCLK_ROOT_CLK] =
> imx_clk_hw_gate4("audio_mclk_root_clk", "audio_mclk_post_div", base +
> 0x4790, 0);
>  	hws[IMX7D_WRCLK_ROOT_CLK] = imx_clk_hw_gate4("wrclk_root_clk",
> "wrclk_post_div", base + 0x47a0, 0);
>  	hws[IMX7D_USB_CTRL_CLK] = imx_clk_hw_gate4("usb_ctrl_clk",
> "ahb_root_clk", base + 0x4680, 0);
>  	hws[IMX7D_USB_PHY1_CLK] = imx_clk_hw_gate4("usb_phy1_clk",
> "pll_usb1_main_clk", base + 0x46a0, 0);
> --
> 2.31.1


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

* Re: [PATCH 2/2] clk: imx: Remove audio_mclk_root_clk
  2022-01-27 14:10 ` [PATCH 2/2] clk: imx: Remove audio_mclk_root_clk Abel Vesa
  2022-02-22  1:12   ` Peng Fan
@ 2022-02-22  8:12   ` Abel Vesa
  1 sibling, 0 replies; 5+ messages in thread
From: Abel Vesa @ 2022-02-22  8:12 UTC (permalink / raw)
  To: Stephen Boyd, Rob Herring, Shawn Guo, Sascha Hauer, Mike Turquette
  Cc: Pengutronix Kernel Team, Peng Fan, Fabio Estevam, NXP Linux Team,
	Frank Li, devicetree, linux-arm-kernel,
	Linux Kernel Mailing List, linux-clk, David Wolfe

On 22-01-27 16:10:52, Abel Vesa wrote:
> The audio_mclk_root_clk was added as a gate with the CCGR121 (0x4790),
> but according to the reference manual, there is no such gate. The
> CCGR121 belongs to ECSPI2 and it is not shared.
> 
> Fixes: 8f6d8094b215b57 ("ARM: imx: add imx7d clk tree support")
> Reported-by: David Wolfe <david.wolfe@nxp.com>
> Signed-off-by: Abel Vesa <abel.vesa@nxp.com>

Applied.

> ---
>  drivers/clk/imx/clk-imx7d.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/clk/imx/clk-imx7d.c b/drivers/clk/imx/clk-imx7d.c
> index c4e0f1c07192..3f6fd7ef2a68 100644
> --- a/drivers/clk/imx/clk-imx7d.c
> +++ b/drivers/clk/imx/clk-imx7d.c
> @@ -849,7 +849,6 @@ static void __init imx7d_clocks_init(struct device_node *ccm_node)
>  	hws[IMX7D_WDOG4_ROOT_CLK] = imx_clk_hw_gate4("wdog4_root_clk", "wdog_post_div", base + 0x49f0, 0);
>  	hws[IMX7D_KPP_ROOT_CLK] = imx_clk_hw_gate4("kpp_root_clk", "ipg_root_clk", base + 0x4aa0, 0);
>  	hws[IMX7D_CSI_MCLK_ROOT_CLK] = imx_clk_hw_gate4("csi_mclk_root_clk", "csi_mclk_post_div", base + 0x4490, 0);
> -	hws[IMX7D_AUDIO_MCLK_ROOT_CLK] = imx_clk_hw_gate4("audio_mclk_root_clk", "audio_mclk_post_div", base + 0x4790, 0);
>  	hws[IMX7D_WRCLK_ROOT_CLK] = imx_clk_hw_gate4("wrclk_root_clk", "wrclk_post_div", base + 0x47a0, 0);
>  	hws[IMX7D_USB_CTRL_CLK] = imx_clk_hw_gate4("usb_ctrl_clk", "ahb_root_clk", base + 0x4680, 0);
>  	hws[IMX7D_USB_PHY1_CLK] = imx_clk_hw_gate4("usb_phy1_clk", "pll_usb1_main_clk", base + 0x46a0, 0);
> -- 
> 2.31.1
>

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

end of thread, other threads:[~2022-02-22  8:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27 14:10 [PATCH 1/2] arm: dts: imx7: Use audio_mclk_post_div instead audio_mclk_root_clk Abel Vesa
2022-01-27 14:10 ` [PATCH 2/2] clk: imx: Remove audio_mclk_root_clk Abel Vesa
2022-02-22  1:12   ` Peng Fan
2022-02-22  8:12   ` Abel Vesa
2022-02-11  4:22 ` [PATCH 1/2] arm: dts: imx7: Use audio_mclk_post_div instead audio_mclk_root_clk 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).