From f84f57d651eaf80f85e0bfa8c37f723be603ef1d Mon Sep 17 00:00:00 2001 From: Greg Davill Date: Sat, 25 Jan 2020 13:11:39 +1030 Subject: [PATCH] soc/software/bios/sdram: On ECP5 strobe dly_sel after read leveling --- litex/soc/software/bios/sdram.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/litex/soc/software/bios/sdram.c b/litex/soc/software/bios/sdram.c index f7d8458c8..15d5e1e9f 100644 --- a/litex/soc/software/bios/sdram.c +++ b/litex/soc/software/bios/sdram.c @@ -943,6 +943,13 @@ int sdrlevel(void) printf("\n"); } +#ifdef ECP5DDRPHY + /* Toggle all dly_sel lines. + * Which toggles all DQSBUFM.PAUSE lines, this ensures they're using the correct delays. */ + ddrphy_dly_sel_write(0xFF); + ddrphy_dly_sel_write(0); +#endif + return 1; } #endif