[U-Boot] [PATCH 2/6] ARM: imx: vining2000: Enable DDR DRAM calibration

Marek Vasut marex at denx.de
Tue Nov 26 08:39:09 UTC 2019


Enable DRAM calibration in SPL to improve behavior of the board
in edge conditions of the thermal envelope of the board and make
it even more stable.

Signed-off-by: Marek Vasut <marex at denx.de>
Cc: Fabio Estevam <fabio.estevam at nxp.com>
Cc: Silvio Fricke <silvio.fricke at softing.com>
Cc: Stefano Babic <sbabic at denx.de>
---
 board/softing/vining_2000/vining_2000.c | 5 +++++
 configs/vining_2000_defconfig           | 1 +
 2 files changed, 6 insertions(+)

diff --git a/board/softing/vining_2000/vining_2000.c b/board/softing/vining_2000/vining_2000.c
index 086de1eaf5..a745119577 100644
--- a/board/softing/vining_2000/vining_2000.c
+++ b/board/softing/vining_2000/vining_2000.c
@@ -586,6 +586,11 @@ static void vining2000_spl_dram_init(void)
 
 	mx6sx_dram_iocfg(mem_ddr.width, &mx6_ddr_ioregs, &mx6_grp_ioregs);
 	mx6_dram_cfg(&sysinfo, &mx6_mmcd_calib, &mem_ddr);
+
+	/* Perform DDR DRAM calibration */
+	udelay(100);
+	mmdc_do_write_level_calibration(&sysinfo);
+	mmdc_do_dqs_calibration(&sysinfo);
 }
 
 void board_init_f(ulong dummy)
diff --git a/configs/vining_2000_defconfig b/configs/vining_2000_defconfig
index 4f9f538189..512c15baf8 100644
--- a/configs/vining_2000_defconfig
+++ b/configs/vining_2000_defconfig
@@ -5,6 +5,7 @@ CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SYS_MALLOC_F_LEN=0x4000
+CONFIG_MX6_DDRCAL=y
 CONFIG_TARGET_SOFTING_VINING_2000=y
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
-- 
2.24.0



More information about the U-Boot mailing list