]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ram: rk3399: Get lpddr4 tsel_rd_en from io settings
authorJagan Teki <jagan@amarulasolutions.com>
Tue, 16 Jul 2019 11:57:25 +0000 (17:27 +0530)
committerKever Yang <kever.yang@rock-chips.com>
Sat, 20 Jul 2019 15:59:44 +0000 (23:59 +0800)
For base.odt 1 the lpddr4 tsel_rd_en value is depending
on IO settings of rd_odt_en.

Add support for it.

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 7ef7707a03c4e4325a0275723d216960f8c26b8e..7dd3a44bfb0b244a842e12c1fa9b1ee156ce8a31 100644 (file)
@@ -645,10 +645,14 @@ static void set_ds_odt(const struct chan_info *chan,
                tsel_ckcs_select_n = PHY_DRV_ODT_34_3;
        }
 
-       if (params->base.odt == 1)
+       if (params->base.odt == 1) {
                tsel_rd_en = 1;
-       else
+
+               if (params->base.dramtype == LPDDR4)
+                       tsel_rd_en = io->rd_odt_en;
+       } else {
                tsel_rd_en = 0;
+       }
 
        tsel_wr_en = 0;
        tsel_idle_en = 0;