[PATCH 77/92] ram: rk3399: Update lpddr4 vref_mode_ac

Jagan Teki
2019-06-11T14:51:20Z

Update vref_mode_ac for lpddr4 based on VDDQ/3/2=16.8%

Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
Signed-off-by: YouMin Chen <cym-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---
drivers/ram/rockchip/sdram_rk3399.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c
index 618327983a..89348cf296 100644
--- a/drivers/ram/rockchip/sdram_rk3399.c
+++ b/drivers/ram/rockchip/sdram_rk3399.c
@@ -369,7 +369,8 @@ static int phy_io_config(const struct chan_info *chan,
vref_value_dq = (rd_vref - 15300) / 521;
}
vref_mode_ac = 0x6;
- vref_value_ac = 0x1f;
+ /* VDDQ/3/2=16.8% */
+ vref_value_ac = 0x3;
} else if (sdram_params->base.dramtype == LPDDR3) {
if (sdram_params->base.odt == 1) {
vref_mode_dq = 0x5; /* LPDDR3 ODT */
--
2.18.0.321.gffc6fa0e3