]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
clk: rockchip: rk3399: Set 50MHz ddr clock
authorJagan Teki <jagan@amarulasolutions.com>
Tue, 16 Jul 2019 11:57:35 +0000 (17:27 +0530)
committerKever Yang <kever.yang@rock-chips.com>
Sat, 20 Jul 2019 16:00:22 +0000 (00:00 +0800)
Add support for setting 50MHz ddr clock.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>
drivers/clk/rockchip/clk_rk3399.c

index 69a887f70cf17e886db1da251e80d334c958a032..2c001661e1e7c9578d2781ba17724ea6b0f468df 100644 (file)
@@ -827,6 +827,10 @@ static ulong rk3399_ddr_set_clk(struct rk3399_cru *cru,
 
        /*  clk_ddrc == DPLL = 24MHz / refdiv * fbdiv / postdiv1 / postdiv2 */
        switch (set_rate) {
+       case 50 * MHz:
+               dpll_cfg = (struct pll_div)
+               {.refdiv = 1, .fbdiv = 12, .postdiv1 = 3, .postdiv2 = 2};
+               break;
        case 200 * MHz:
                dpll_cfg = (struct pll_div)
                {.refdiv = 1, .fbdiv = 50, .postdiv1 = 6, .postdiv2 = 1};