]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ddr: imx93: Add 625M bypass clock support
authorJacky Bai <ping.bai@nxp.com>
Fri, 28 Apr 2023 04:08:42 +0000 (12:08 +0800)
committerStefano Babic <sbabic@denx.de>
Sun, 21 May 2023 14:54:41 +0000 (16:54 +0200)
Add 625M bypass clock that may be used DRAM 625M
bypass mode support.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
arch/arm/mach-imx/imx9/clock.c
drivers/ddr/imx/phy/ddrphy_utils.c

index 957f80fce2e8a4fc0143fe8dd487538c2bbdfa51..a7ecccaf879948aa603a8ac488d8741dfa0a5c31 100644 (file)
@@ -648,6 +648,9 @@ void dram_pll_init(ulong pll_val)
 void dram_enable_bypass(ulong clk_val)
 {
        switch (clk_val) {
+       case MHZ(625):
+               ccm_clk_root_cfg(DRAM_ALT_CLK_ROOT, SYS_PLL_PFD2, 1);
+               break;
        case MHZ(400):
                ccm_clk_root_cfg(DRAM_ALT_CLK_ROOT, SYS_PLL_PFD1, 2);
                break;
index 6a8b6be42b2aae7e08118b20bfb4cd3cb16ee136..fd8b4113b7bda573e10d7cbc2e042a15fb5bab71 100644 (file)
@@ -148,6 +148,9 @@ void ddrphy_init_set_dfi_clk(unsigned int drate)
                dram_pll_init(MHZ(167));
                dram_disable_bypass();
                break;
+       case 625:
+               dram_enable_bypass(MHZ(625));
+               break;
        case 400:
                dram_enable_bypass(MHZ(400));
                break;