Skip to content

Commit 557be50

Browse files
MrVanabelvesa
authored andcommitted
clk: imx: fracn-gppll: correct PLL initialization flow
Per i.MX93 Reference Mannual 22.4 Initialization information 1. Program appropriate value of DIV[ODIV], DIV[RDIV] and DIV[MFI] as per Integer mode. 2. Wait for 5 μs. 3. Program the following field in CTRL register. Set CTRL[POWERUP] to 1'b1 to enable PLL block. 4. Poll PLL_STATUS[PLL_LOCK] register, and wait till PLL_STATUS[PLL_LOCK] is 1'b1 and pll_lock output signal is 1'b1. 5. Set CTRL[CLKMUX_EN] to 1'b1 to enable PLL output clock. So move the CLKMUX_EN operation after PLL locked. Fixes: 1b26cb8 ("clk: imx: support fracn gppll") Co-developed-by: Jacky Bai <[email protected]> Signed-off-by: Jacky Bai <[email protected]> Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Abel Vesa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Abel Vesa <[email protected]>
1 parent 5ee063f commit 557be50

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/clk/imx/clk-fracn-gppll.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,13 +303,13 @@ static int clk_fracn_gppll_prepare(struct clk_hw *hw)
303303
val |= POWERUP_MASK;
304304
writel_relaxed(val, pll->base + PLL_CTRL);
305305

306-
val |= CLKMUX_EN;
307-
writel_relaxed(val, pll->base + PLL_CTRL);
308-
309306
ret = clk_fracn_gppll_wait_lock(pll);
310307
if (ret)
311308
return ret;
312309

310+
val |= CLKMUX_EN;
311+
writel_relaxed(val, pll->base + PLL_CTRL);
312+
313313
val &= ~CLKMUX_BYPASS;
314314
writel_relaxed(val, pll->base + PLL_CTRL);
315315

0 commit comments

Comments
 (0)