* [PATCH 1/4] clk: imx: Add 1039.5MHz frequency support for imx9 pll
@ 2023-09-12 13:16 Peng Fan (OSS)
2023-09-12 13:16 ` [PATCH 2/4] clk: imx8mp: fix clock tree update of TF-A managed clocks Peng Fan (OSS)
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Peng Fan (OSS) @ 2023-09-12 13:16 UTC (permalink / raw)
To: abelvesa, mturquette, sboyd, shawnguo, s.hauer, kernel, festevam
Cc: linux-imx, linux-clk, linux-arm-kernel, linux-kernel, Jacky Bai,
Peng Fan
From: Jacky Bai <ping.bai@nxp.com>
For video pll, it may need to 1039.5MHz clock to fulfill
the LVDS display 148.5MHz * 7 requirement. So add 1039.5MHz
frequency config support for i.MX9 video PLL.
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/clk/imx/clk-fracn-gppll.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/imx/clk-fracn-gppll.c b/drivers/clk/imx/clk-fracn-gppll.c
index 44462ab50e51..96105ee4d9ef 100644
--- a/drivers/clk/imx/clk-fracn-gppll.c
+++ b/drivers/clk/imx/clk-fracn-gppll.c
@@ -78,6 +78,7 @@ struct clk_fracn_gppll {
* The Fvco should be in range 2.5Ghz to 5Ghz
*/
static const struct imx_fracn_gppll_rate_table fracn_tbl[] = {
+ PLL_FRACN_GP(1039500000U, 173, 25, 100, 1, 4),
PLL_FRACN_GP(650000000U, 162, 50, 100, 0, 6),
PLL_FRACN_GP(594000000U, 198, 0, 1, 0, 8),
PLL_FRACN_GP(560000000U, 140, 0, 1, 0, 6),
--
2.37.1
_______________________________________________
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] 5+ messages in thread
* [PATCH 2/4] clk: imx8mp: fix clock tree update of TF-A managed clocks
2023-09-12 13:16 [PATCH 1/4] clk: imx: Add 1039.5MHz frequency support for imx9 pll Peng Fan (OSS)
@ 2023-09-12 13:16 ` Peng Fan (OSS)
2023-09-12 13:16 ` [PATCH 3/4] clk: imx: composite-7ulp: Add some delay before deassert the reset Peng Fan (OSS)
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Peng Fan (OSS) @ 2023-09-12 13:16 UTC (permalink / raw)
To: abelvesa, mturquette, sboyd, shawnguo, s.hauer, kernel, festevam
Cc: linux-imx, linux-clk, linux-arm-kernel, linux-kernel, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
Similar to commit d36207b848a6
("clk: imx8m: fix clock tree update of TF-A managed clocks"),
i.MX8MP supports TF-A based DDR frequency scaling.
Since commit 936c383673b9 ("clk: imx: fix composite peripheral flags"),
these TF-A managed muxes have SET_PARENT_GATE set, which results
in clk_set_parent failing with -EBUSY. so use fw managed api to fix
the issue as i.MX8MM/N
Fixes: 936c383673b9 ("clk: imx: fix composite peripheral flags")
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
_______________________________________________
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] 5+ messages in thread
* [PATCH 3/4] clk: imx: composite-7ulp: Add some delay before deassert the reset
2023-09-12 13:16 [PATCH 1/4] clk: imx: Add 1039.5MHz frequency support for imx9 pll Peng Fan (OSS)
2023-09-12 13:16 ` [PATCH 2/4] clk: imx8mp: fix clock tree update of TF-A managed clocks Peng Fan (OSS)
@ 2023-09-12 13:16 ` Peng Fan (OSS)
2023-09-12 13:16 ` [PATCH 4/4] clk: imx: update the pllv4 mult table Peng Fan (OSS)
2023-10-04 7:55 ` [PATCH 1/4] clk: imx: Add 1039.5MHz frequency support for imx9 pll Abel Vesa
3 siblings, 0 replies; 5+ messages in thread
From: Peng Fan (OSS) @ 2023-09-12 13:16 UTC (permalink / raw)
To: abelvesa, mturquette, sboyd, shawnguo, s.hauer, kernel, festevam
Cc: linux-imx, linux-clk, linux-arm-kernel, linux-kernel, Jacky Bai,
Peng Fan
From: Jacky Bai <ping.bai@nxp.com>
Some of the PCCs on i.MX8ULP have a sw_rst bit to control
the peripheral reset through SW method. For peripherals like GPU
that need sync reset, some delay is necessary befere & after release
the reset to make sure the HW is reset into known status. So add
some delay before & after release reset.
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/clk/imx/clk-composite-7ulp.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/clk/imx/clk-composite-7ulp.c b/drivers/clk/imx/clk-composite-7ulp.c
index e208ddc51133..715a60f81bce 100644
--- a/drivers/clk/imx/clk-composite-7ulp.c
+++ b/drivers/clk/imx/clk-composite-7ulp.c
@@ -7,6 +7,7 @@
#include <linux/bits.h>
#include <linux/clk-provider.h>
+#include <linux/delay.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/slab.h>
@@ -35,6 +36,9 @@ static int pcc_gate_enable(struct clk_hw *hw)
if (ret)
return ret;
+ /* wait before release reset */
+ udelay(1);
+
spin_lock_irqsave(gate->lock, flags);
/*
* release the sw reset for peripherals associated with
@@ -46,6 +50,9 @@ static int pcc_gate_enable(struct clk_hw *hw)
spin_unlock_irqrestore(gate->lock, flags);
+ /* wait sync reset done */
+ udelay(1);
+
return 0;
}
--
2.37.1
_______________________________________________
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] 5+ messages in thread
* [PATCH 4/4] clk: imx: update the pllv4 mult table
2023-09-12 13:16 [PATCH 1/4] clk: imx: Add 1039.5MHz frequency support for imx9 pll Peng Fan (OSS)
2023-09-12 13:16 ` [PATCH 2/4] clk: imx8mp: fix clock tree update of TF-A managed clocks Peng Fan (OSS)
2023-09-12 13:16 ` [PATCH 3/4] clk: imx: composite-7ulp: Add some delay before deassert the reset Peng Fan (OSS)
@ 2023-09-12 13:16 ` Peng Fan (OSS)
2023-10-04 7:55 ` [PATCH 1/4] clk: imx: Add 1039.5MHz frequency support for imx9 pll Abel Vesa
3 siblings, 0 replies; 5+ messages in thread
From: Peng Fan (OSS) @ 2023-09-12 13:16 UTC (permalink / raw)
To: abelvesa, mturquette, sboyd, shawnguo, s.hauer, kernel, festevam
Cc: linux-imx, linux-clk, linux-arm-kernel, linux-kernel, Jacky Bai,
Ye Li, Peng Fan
From: Jacky Bai <ping.bai@nxp.com>
On i.MX8ULP, the ARM PLL can run at 960MHz, so need to
update the mult table to make sure the ARM PLL can
get a correct PLL frequency as we expected.
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/clk/imx/clk-pllv4.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/imx/clk-pllv4.c b/drivers/clk/imx/clk-pllv4.c
index 9b136c951762..7ea26e15f245 100644
--- a/drivers/clk/imx/clk-pllv4.c
+++ b/drivers/clk/imx/clk-pllv4.c
@@ -48,7 +48,7 @@ struct clk_pllv4 {
};
/* Valid PLL MULT Table */
-static const int pllv4_mult_table[] = {33, 27, 22, 20, 17, 16};
+static const int pllv4_mult_table[] = {40, 33, 27, 22, 20, 17, 16};
/* Valid PLL MULT range, (max, min) */
static const int pllv4_mult_range[] = {54, 27};
--
2.37.1
_______________________________________________
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] 5+ messages in thread
* Re: [PATCH 1/4] clk: imx: Add 1039.5MHz frequency support for imx9 pll
2023-09-12 13:16 [PATCH 1/4] clk: imx: Add 1039.5MHz frequency support for imx9 pll Peng Fan (OSS)
` (2 preceding siblings ...)
2023-09-12 13:16 ` [PATCH 4/4] clk: imx: update the pllv4 mult table Peng Fan (OSS)
@ 2023-10-04 7:55 ` Abel Vesa
3 siblings, 0 replies; 5+ messages in thread
From: Abel Vesa @ 2023-10-04 7:55 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: abelvesa, mturquette, sboyd, shawnguo, s.hauer, kernel, festevam,
linux-imx, linux-clk, linux-arm-kernel, linux-kernel, Jacky Bai,
Peng Fan
On 23-09-12 21:16:46, Peng Fan (OSS) wrote:
> From: Jacky Bai <ping.bai@nxp.com>
>
> For video pll, it may need to 1039.5MHz clock to fulfill
> the LVDS display 148.5MHz * 7 requirement. So add 1039.5MHz
> frequency config support for i.MX9 video PLL.
Whole series LGTM.
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
>
> Signed-off-by: Jacky Bai <ping.bai@nxp.com>
> Acked-by: Peng Fan <peng.fan@nxp.com>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> drivers/clk/imx/clk-fracn-gppll.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/clk/imx/clk-fracn-gppll.c b/drivers/clk/imx/clk-fracn-gppll.c
> index 44462ab50e51..96105ee4d9ef 100644
> --- a/drivers/clk/imx/clk-fracn-gppll.c
> +++ b/drivers/clk/imx/clk-fracn-gppll.c
> @@ -78,6 +78,7 @@ struct clk_fracn_gppll {
> * The Fvco should be in range 2.5Ghz to 5Ghz
> */
> static const struct imx_fracn_gppll_rate_table fracn_tbl[] = {
> + PLL_FRACN_GP(1039500000U, 173, 25, 100, 1, 4),
> PLL_FRACN_GP(650000000U, 162, 50, 100, 0, 6),
> PLL_FRACN_GP(594000000U, 198, 0, 1, 0, 8),
> PLL_FRACN_GP(560000000U, 140, 0, 1, 0, 6),
> --
> 2.37.1
>
_______________________________________________
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] 5+ messages in thread
end of thread, other threads:[~2023-10-04 7:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-12 13:16 [PATCH 1/4] clk: imx: Add 1039.5MHz frequency support for imx9 pll Peng Fan (OSS)
2023-09-12 13:16 ` [PATCH 2/4] clk: imx8mp: fix clock tree update of TF-A managed clocks Peng Fan (OSS)
2023-09-12 13:16 ` [PATCH 3/4] clk: imx: composite-7ulp: Add some delay before deassert the reset Peng Fan (OSS)
2023-09-12 13:16 ` [PATCH 4/4] clk: imx: update the pllv4 mult table Peng Fan (OSS)
2023-10-04 7:55 ` [PATCH 1/4] clk: imx: Add 1039.5MHz frequency support for imx9 pll Abel Vesa
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).