From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
To: abelvesa@kernel.org, mturquette@baylibre.com, sboyd@kernel.org,
shawnguo@kernel.org, s.hauer@pengutronix.de,
kernel@pengutronix.de, festevam@gmail.com
Cc: imx@lists.linux.dev, linux-clk@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Zhipeng Wang <zhipeng.wang_1@nxp.com>,
Ahmad Fatoum <a.fatoum@pengutronix.de>,
Peng Fan <peng.fan@nxp.com>
Subject: [PATCH V3 06/15] clk: imx: imx8mp: fix clock tree update of TF-A managed clocks
Date: Fri, 7 Jun 2024 21:33:38 +0800 [thread overview]
Message-ID: <20240607133347.3291040-7-peng.fan@oss.nxp.com> (raw)
In-Reply-To: <20240607133347.3291040-1-peng.fan@oss.nxp.com>
From: Zhipeng Wang <zhipeng.wang_1@nxp.com>
On the i.MX8M*, the TF-A exposes a SiP (Silicon Provider) service
for DDR frequency scaling. The imx8m-ddrc-devfreq driver calls the
SiP and then does clk_set_parent on the DDR muxes to synchronize
the clock tree.
since commit 936c383673b9 ("clk: imx: fix composite peripheral flags"),
these TF-A managed muxes have SET_PARENT_GATE set, which results
in imx8m-ddrc-devfreq's clk_set_parent after SiP failing with -EBUSY:
clk_set_parent(dram_apb_src, sys1_pll_40m);(busfreq-imx8mq.c)
commit 926bf91248dd
("clk: imx8m: fix clock tree update of TF-A managed clocks") adds this
method and enables 8mm, 8mn and 8mq. i.MX8MP also needs it.
This is safe to do, because updating the Linux clock tree to reflect
reality will always be glitch-free.
Another reason to this patch is that powersave image BT music
requires dram to be 400MTS, so clk_set_parent(dram_alt_src,
sys1_pll_800m); is required. Without this patch, it will not succeed.
Fixes: 936c383673b9 ("clk: imx: fix composite peripheral flags")
Signed-off-by: Zhipeng Wang <zhipeng.wang_1@nxp.com>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/clk/imx/clk-imx8mp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c
index 670aa2bab301..e561ff7b135f 100644
--- a/drivers/clk/imx/clk-imx8mp.c
+++ b/drivers/clk/imx/clk-imx8mp.c
@@ -551,8 +551,8 @@ static int imx8mp_clocks_probe(struct platform_device *pdev)
hws[IMX8MP_CLK_IPG_ROOT] = imx_clk_hw_divider2("ipg_root", "ahb_root", ccm_base + 0x9080, 0, 1);
- hws[IMX8MP_CLK_DRAM_ALT] = imx8m_clk_hw_composite("dram_alt", imx8mp_dram_alt_sels, ccm_base + 0xa000);
- hws[IMX8MP_CLK_DRAM_APB] = imx8m_clk_hw_composite_critical("dram_apb", imx8mp_dram_apb_sels, ccm_base + 0xa080);
+ hws[IMX8MP_CLK_DRAM_ALT] = imx8m_clk_hw_fw_managed_composite("dram_alt", imx8mp_dram_alt_sels, ccm_base + 0xa000);
+ hws[IMX8MP_CLK_DRAM_APB] = imx8m_clk_hw_fw_managed_composite_critical("dram_apb", imx8mp_dram_apb_sels, ccm_base + 0xa080);
hws[IMX8MP_CLK_VPU_G1] = imx8m_clk_hw_composite("vpu_g1", imx8mp_vpu_g1_sels, ccm_base + 0xa100);
hws[IMX8MP_CLK_VPU_G2] = imx8m_clk_hw_composite("vpu_g2", imx8mp_vpu_g2_sels, ccm_base + 0xa180);
hws[IMX8MP_CLK_CAN1] = imx8m_clk_hw_composite("can1", imx8mp_can1_sels, ccm_base + 0xa200);
--
2.37.1
next prev parent reply other threads:[~2024-06-07 13:25 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-07 13:33 [PATCH V3 00/15] clk: imx: misc update/fix Peng Fan (OSS)
2024-06-07 13:33 ` [PATCH V3 01/15] clk: imx: composite-8m: Enable gate clk with mcore_booted Peng Fan (OSS)
2024-06-07 13:33 ` [PATCH V3 02/15] clk: imx: composite-93: keep root clock on when mcore enabled Peng Fan (OSS)
2024-06-07 13:33 ` [PATCH V3 03/15] clk: imx: composite-7ulp: Check the PCC present bit Peng Fan (OSS)
2024-06-07 13:33 ` [PATCH V3 04/15] clk: imx: fracn-gppll: fix fractional part of PLL getting lost Peng Fan (OSS)
2024-06-07 13:33 ` [PATCH V3 05/15] clk: imx: imx8mp-audiomix: remove sdma root clock Peng Fan (OSS)
2024-07-14 17:02 ` Adam Ford
2024-07-15 1:11 ` Peng Fan
2024-07-16 0:02 ` Adam Ford
2024-07-16 1:24 ` Peng Fan
2024-07-16 1:50 ` Adam Ford
2024-07-17 12:21 ` Peng Fan
2024-06-07 13:33 ` Peng Fan (OSS) [this message]
2024-06-07 13:33 ` [PATCH V3 07/15] clk: imx: Remove CLK_SET_PARENT_GATE for DRAM mux for i.MX7D Peng Fan (OSS)
2024-06-07 13:33 ` [PATCH V3 08/15] clk: imx: add CLK_SET_RATE_PARENT for lcdif_pixel_src " Peng Fan (OSS)
2024-06-07 13:33 ` [PATCH V3 09/15] clk: imx: imx8mn: add sai7_ipg_clk clock settings Peng Fan (OSS)
2024-06-07 13:33 ` [PATCH V3 10/15] clk: imx: imx8mm: Change the 'nand_usdhc_bus' clock to non-critical one Peng Fan (OSS)
2024-06-07 13:33 ` [PATCH V3 11/15] clk: imx: imx8qxp: Add LVDS bypass clocks Peng Fan (OSS)
2024-06-07 13:33 ` [PATCH V3 12/15] clk: imx: imx8qxp: Add clock muxes for MIPI and PHY ref clocks Peng Fan (OSS)
2024-06-07 13:33 ` [PATCH V3 13/15] clk: imx: imx8qxp: Register dc0_bypass0_clk before disp clk Peng Fan (OSS)
2024-06-07 13:33 ` [PATCH V3 14/15] clk: imx: imx8qxp: Parent should be initialized earlier than the clock Peng Fan (OSS)
2024-06-07 13:33 ` [PATCH V3 15/15] clk: imx: fracn-gppll: update rate table Peng Fan (OSS)
2024-06-18 12:16 ` [PATCH V3 00/15] clk: imx: misc update/fix Peng Fan
2024-06-21 4:35 ` Abel Vesa
2024-06-21 6:24 ` Abel Vesa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240607133347.3291040-7-peng.fan@oss.nxp.com \
--to=peng.fan@oss.nxp.com \
--cc=a.fatoum@pengutronix.de \
--cc=abelvesa@kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=peng.fan@nxp.com \
--cc=s.hauer@pengutronix.de \
--cc=sboyd@kernel.org \
--cc=shawnguo@kernel.org \
--cc=zhipeng.wang_1@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox