Commit 1b6a3824 authored by Yuri Tikhonov's avatar Yuri Tikhonov

RT81519. M2S DDR: disable self-refresh and fix-up tREFI

Signed-off-by: default avatarVadim Aleynikov <vadim_a@emcraft.com>
Signed-off-by: default avatarAlexander Potashev <aspotashev@emcraft.com>
Signed-off-by: default avatarYuri Tikhonov <yur@emcraft.com>
parent 032f514f
......@@ -68,7 +68,7 @@
#define DDR_tCKE 1
#define DDR_tRFC M2S_CLK_MIN(72)
#define DDR_tREFI M2S_CLK32_MAX(15600)
#define DDR_tREFI M2S_CLK32_MAX(7800)
#define DDR_tCKE_pre M2S_CLK1024_MIN(200000)
#define DDR_tCKE_post M2S_CLK1024_MIN(400)
#define DDR_tRCD M2S_CLK_MIN(18)
......@@ -145,8 +145,7 @@ int dram_init (void)
/*
* Setup timings
*/
ddr->ddrc.DYN_REFRESH_1_CR = (DDR_tRFC << REG_DDRC_T_RFC_MIN) |
(1 << REG_DDRC_SELFREF_EN);
ddr->ddrc.DYN_REFRESH_1_CR = DDR_tRFC << REG_DDRC_T_RFC_MIN;
ddr->ddrc.DYN_REFRESH_2_CR = (DDR_tREFI << REG_DDRC_T_RFC_NOM_X32);
ddr->ddrc.CKE_RSTN_CYCLES_1_CR = DDR_tCKE_pre << REG_DDRC_PRE_CKE_X1024;
ddr->ddrc.CKE_RSTN_CYCLES_2_CR = DDR_tCKE_post << REG_DDRC_POST_CKE_X1024;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment