MLK-17586-4 ARM: dts: improve usdhc root clock rate
authorHaibo Chen <haibo.chen@nxp.com>
Sun, 11 Feb 2018 11:07:22 +0000 (19:07 +0800)
committerHaibo Chen <haibo.chen@nxp.com>
Thu, 12 Apr 2018 10:45:58 +0000 (18:45 +0800)
commit6f425c324c77efd636466c696075b5b3cf142fcc
tree6058beb08b56fa84550d621d833137bb789afc7b
parent74c2f5bdfc7813605766b090ecfb83cea04f0f5c
MLK-17586-4 ARM: dts: improve usdhc root clock rate

Confirm with IC, HS400 MAX clock Freq for Instance 0 is 198Mhz
and for Instance 1 is 192MHz, so set the usdhc parent clock at
396MHz, due to current APLL is config to 529.2MHz, use the formula
APLL_PFD clock = APLL * 18 / i, the nearest clock is 381.024MHz when
the i is 25, so the usdhc root clock is 190.512MHz.

But eMMC HS400 can't pass stress test at 190.512MHz, will meet CRC
error sometimes, only when down to 176.4MHz can pass the stress test.

This patch make the usdhc0 and usdhc1 root clock both source from
IMX7ULP_CLK_APLL_PFD1, and set this APLL_PFD1 clcok rate at 352.8MHz,
and set the USDHC0 root clock at 352.8MHz, and set the USDHC1 root
clock at 176.4MHz.

Also remove the clk_prepare_enable() and clk_disable_unprepare() for
APLL_PFD2, bacause U-Boot already gate off APLL_PFD1, not need to do
this again.

Acked-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
arch/arm/boot/dts/imx7ulp.dtsi
drivers/clk/imx/clk-imx7ulp.c