clk: imx7d: Fix the powerdown bit location of PLL DDR
authorFabio Estevam <fabio.estevam@nxp.com>
Mon, 15 May 2017 11:55:05 +0000 (08:55 -0300)
committerStephen Boyd <sboyd@codeaurora.org>
Thu, 1 Jun 2017 07:25:38 +0000 (00:25 -0700)
According to the MX7D Reference Manual the powerdown bit of
CCM_ANALOG_PLL_DDRn register is bit 20, so fix it accordingly.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/imx/clk-imx7d.c
drivers/clk/imx/clk-pllv3.c
drivers/clk/imx/clk.h

index 93b03640da9bef56d02dd513bf3d203e1eebd845..8fa1841b15df3d0868e20263478e418a7856b8c2 100644 (file)
@@ -424,7 +424,7 @@ static void __init imx7d_clocks_init(struct device_node *ccm_node)
        clks[IMX7D_PLL_VIDEO_MAIN_SRC] = imx_clk_mux("pll_video_main_src", base + 0x130, 14, 2, pll_bypass_src_sel, ARRAY_SIZE(pll_bypass_src_sel));
 
        clks[IMX7D_PLL_ARM_MAIN]  = imx_clk_pllv3(IMX_PLLV3_SYS, "pll_arm_main", "osc", base + 0x60, 0x7f);
-       clks[IMX7D_PLL_DRAM_MAIN] = imx_clk_pllv3(IMX_PLLV3_AV, "pll_dram_main", "osc", base + 0x70, 0x7f);
+       clks[IMX7D_PLL_DRAM_MAIN] = imx_clk_pllv3(IMX_PLLV3_DDR_IMX7, "pll_dram_main", "osc", base + 0x70, 0x7f);
        clks[IMX7D_PLL_SYS_MAIN]  = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll_sys_main", "osc", base + 0xb0, 0x1);
        clks[IMX7D_PLL_ENET_MAIN] = imx_clk_pllv3(IMX_PLLV3_ENET_IMX7, "pll_enet_main", "osc", base + 0xe0, 0x0);
        clks[IMX7D_PLL_AUDIO_MAIN] = imx_clk_pllv3(IMX_PLLV3_AV, "pll_audio_main", "osc", base + 0xf0, 0x7f);
index f1099167ba3138732cf277e19912dfcf4f263f6c..0039b169364ec9d70b3bfac9f067af11c02d9643 100644 (file)
@@ -27,6 +27,7 @@
 #define BM_PLL_POWER           (0x1 << 12)
 #define BM_PLL_LOCK            (0x1 << 31)
 #define IMX7_ENET_PLL_POWER    (0x1 << 5)
+#define IMX7_DDR_PLL_POWER     (0x1 << 20)
 
 /**
  * struct clk_pllv3 - IMX PLL clock version 3
@@ -451,6 +452,10 @@ struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name,
                pll->ref_clock = 500000000;
                ops = &clk_pllv3_enet_ops;
                break;
+       case IMX_PLLV3_DDR_IMX7:
+               pll->power_bit = IMX7_ENET_PLL_POWER;
+               ops = &clk_pllv3_av_ops;
+               break;
        default:
                ops = &clk_pllv3_ops;
        }
index e1f5e425db732b9fd5230bb34d26fa42311cb634..d54f0720afbaa7f274e30b966ca6f92bae10c391 100644 (file)
@@ -35,6 +35,7 @@ enum imx_pllv3_type {
        IMX_PLLV3_ENET,
        IMX_PLLV3_ENET_IMX7,
        IMX_PLLV3_SYS_VF610,
+       IMX_PLLV3_DDR_IMX7,
 };
 
 struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name,