arm: dts: imx7: Use audio_mclk_post_div instead audio_mclk_root_clk
PATCH 1/2 arm: dts: imx7: Use audio_mclk_post_div instead 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. 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.
--- 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(-)
arch/arm/boot/dts/imx7-colibri.dtsi +2 -2
@@ -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 = <®_module_3v3_avdd>;
arch/arm/boot/dts/imx7-mba7.dtsi +1 -1
@@ -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 = <®_audio_3v3>; iov-supply = <®_audio_3v3>;
arch/arm/boot/dts/imx7d-nitrogen7.dts +1 -1
@@ -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; };
arch/arm/boot/dts/imx7d-pico-hobbit.dts +2 -2
@@ -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 = <®_2p5v>; VDDIO-supply = <®_vref_1v8>; };
arch/arm/boot/dts/imx7d-pico-pi.dts +2 -2
@@ -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 = <®_2p5v>; VDDIO-supply = <®_vref_1v8>; };
arch/arm/boot/dts/imx7d-sdb.dts +2 -2
@@ -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>; };
arch/arm/boot/dts/imx7s-warp.dts +2 -2
@@ -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>;
Signature · 1 line
2.31.1
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.
--- drivers/clk/imx/clk-imx7d.c | 1 - 1 file changed, 1 deletion(-)
drivers/clk/imx/clk-imx7d.c +0 -1
@@ -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 );
Signature · 1 line
2.31.1
RE: [PATCH 2/2] clk: imx: Remove audio_mclk_root_clk
Quoted 9 lines
Subject: [PATCH 2/2] clk: imx: Remove
audio_mclk_root_clkThe
audio_mclk_root_clkwas 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 <[email protected]>Signed-off-by Abel Vesa <[email protected]>
Quoted 28 lines
--- drivers/clk/imx/clk-imx7d.c | 1 - 1 file changed, 1 deletion(-)drivers/clk/imx/clk-imx7d.c index renamed from drivers/clk/imx/clk-imx7d.c +0
-0
c4e0f1c07192..3f6fd7ef2a68100644drivers/clk/imx/clk-imx7d.c +0
-0@@ -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);drivers/clk/imx/clk-imx7d.c +0
-1- 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
Abel Vesa
AppliedRe: [PATCH 2/2] clk: imx: Remove audio_mclk_root_clk
In reply to Abel VesaQuoted 7 lines · Abel Vesa
The
audio_mclk_root_clkwas 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 <[email protected]>Signed-off-by Abel Vesa <[email protected]>
Applied.
Quoted 19 lines
--- drivers/clk/imx/clk-imx7d.c | 1 - 1 file changed, 1 deletion(-)drivers/clk/imx/clk-imx7d.c +0
-1@@ -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 );Signature · 1 line
2.31.1
Shawn Guo
AppliedQuoted 7 lines · Abel Vesa
The
audio_mclk_root_clkwas 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 theaudio_mclk_post_div, which is the parent.Signed-off-by Abel Vesa <[email protected]>
Applied, thanks!