]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ram: rk3399: Configure PHY_898, PHY_919 for lpddr4
authorJagan Teki <jagan@amarulasolutions.com>
Tue, 16 Jul 2019 11:57:14 +0000 (17:27 +0530)
committerKever Yang <kever.yang@rock-chips.com>
Sat, 20 Jul 2019 15:59:44 +0000 (23:59 +0800)
PHY_898, PHY_919 would require to configure PHY LP4 boot
pll control and ca for lpddr4.

So, configure the same in pctl_cfg for LPDDR4.

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/ram/rockchip/sdram_rk3399.c

index 8b2c6b3cdbdaf04a6aaf1ac4a08b226bf562fb46..aaf786a03e070fba683313d92a82b2f02168d7a2 100644 (file)
@@ -574,6 +574,11 @@ static int pctl_cfg(struct dram_info *dram, const struct chan_info *chan,
        writel(params->phy_regs.denali_phy[911], &denali_phy[911]);
        writel(params->phy_regs.denali_phy[912], &denali_phy[912]);
 
+       if (IS_ENABLED(CONFIG_RAM_RK3399_LPDDR4)) {
+               writel(params->phy_regs.denali_phy[898], &denali_phy[898]);
+               writel(params->phy_regs.denali_phy[919], &denali_phy[919]);
+       }
+
        dram->pwrup_srefresh_exit[channel] = readl(&denali_ctl[68]) &
                                             PWRUP_SREFRESH_EXIT;
        clrbits_le32(&denali_ctl[68], PWRUP_SREFRESH_EXIT);