[PATCH v2] arm: imx: imx8mm: correct unrecognized fracpll frequency
> Frequency requested by ddrphy_init_set_dfi_clk from fracpll uses MHZ() > macro, which expands the value provided to the Hz range without taking into > account the precise Hz setting. This causes the frequency of 266 MHz not ot > be found in the imx8mm_fracpll_tbl, since it is entered there with a > precise Hz value. This in turn causes the boot hang in SPL, as proper DDR > fracpll frequency cannot be determined. > Correct the value in imx8mm_fracpll_tbl to match the one expanded by > MHZ(266) macro, rounding it down to MHz range only. > Signed-off-by: Andrey Zhizhikin > Cc: Stefano Babic > Cc: Fabio Estevam > Cc: "NXP i.MX U-Boot Team" > Cc: Peng Fan > Cc: Simon Glass > Cc: Ye Li > Fixes: 825ab6b406 ("driver: ddr: Refine the ddr init driver on imx8m") > Reviewed-by: Fabio Estevam Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de =
Re: [PATCH v2] arm: imx: imx8mm: correct unrecognized fracpll frequency
On Mon, May 3, 2021 at 5:00 AM Andrey Zhizhikin wrote: > > Frequency requested by ddrphy_init_set_dfi_clk from fracpll uses MHZ() > macro, which expands the value provided to the Hz range without taking into > account the precise Hz setting. This causes the frequency of 266 MHz not ot > be found in the imx8mm_fracpll_tbl, since it is entered there with a > precise Hz value. This in turn causes the boot hang in SPL, as proper DDR > fracpll frequency cannot be determined. > > Correct the value in imx8mm_fracpll_tbl to match the one expanded by > MHZ(266) macro, rounding it down to MHz range only. > > Signed-off-by: Andrey Zhizhikin > Cc: Stefano Babic > Cc: Fabio Estevam > Cc: "NXP i.MX U-Boot Team" > Cc: Peng Fan > Cc: Simon Glass > Cc: Ye Li > Fixes: 825ab6b406 ("driver: ddr: Refine the ddr init driver on imx8m") Reviewed-by: Fabio Estevam
[PATCH v2] arm: imx: imx8mm: correct unrecognized fracpll frequency
Frequency requested by ddrphy_init_set_dfi_clk from fracpll uses MHZ() macro, which expands the value provided to the Hz range without taking into account the precise Hz setting. This causes the frequency of 266 MHz not ot be found in the imx8mm_fracpll_tbl, since it is entered there with a precise Hz value. This in turn causes the boot hang in SPL, as proper DDR fracpll frequency cannot be determined. Correct the value in imx8mm_fracpll_tbl to match the one expanded by MHZ(266) macro, rounding it down to MHz range only. Signed-off-by: Andrey Zhizhikin Cc: Stefano Babic Cc: Fabio Estevam Cc: "NXP i.MX U-Boot Team" Cc: Peng Fan Cc: Simon Glass Cc: Ye Li Fixes: 825ab6b406 ("driver: ddr: Refine the ddr init driver on imx8m") --- Changes in v2: - Remove debug message clarifications, they are addressed in a separate patch arch/arm/mach-imx/imx8m/clock_imx8mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mm.c b/arch/arm/mach-imx/imx8m/clock_imx8mm.c index 029d06f27f..7d0f564a24 100644 --- a/arch/arm/mach-imx/imx8m/clock_imx8mm.c +++ b/arch/arm/mach-imx/imx8m/clock_imx8mm.c @@ -54,7 +54,7 @@ static struct imx_int_pll_rate_table imx8mm_fracpll_tbl[] = { PLL_1443X_RATE(6U, 300, 3, 2, 0), PLL_1443X_RATE(59400U, 99, 1, 2, 0), PLL_1443X_RATE(4U, 300, 9, 1, 0), - PLL_1443X_RATE(26667U, 400, 9, 2, 0), + PLL_1443X_RATE(26600U, 400, 9, 2, 0), PLL_1443X_RATE(16700U, 334, 3, 4, 0), PLL_1443X_RATE(1U, 300, 9, 3, 0), }; -- 2.25.1