On Mon, 20 Oct 2025, Philippe Mathieu-Daudé wrote:
On 8/10/25 14:25, BALATON Zoltan wrote:
This is needed for newer u-boot-sam460ex versions to pass the DRAM
setup.

Signed-off-by: BALATON Zoltan <[email protected]>
---
  hw/i2c/smbus_eeprom.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/hw/i2c/smbus_eeprom.c b/hw/i2c/smbus_eeprom.c
index 0a1088fbb0..26e211b31a 100644
--- a/hw/i2c/smbus_eeprom.c
+++ b/hw/i2c/smbus_eeprom.c
@@ -288,6 +288,7 @@ uint8_t *spd_data_generate(enum sdram_type type, ram_addr_t ram_size)
      spd[33] = 8;    /* addr/cmd hold time */
      spd[34] = 20;   /* data input setup time */
      spd[35] = 8;    /* data input hold time */
+    spd[36] = (type == DDR2 ? 13 << 2 : 0); /* min. write recovery time */

We are adapting DDR2 values on a method written for SDR/DDR[1].
Better would be to split and correctly document each format,
using proper values.

I plan to add separate function for DDR3 which is different from these (Bernhard had a patch for that which we can adopt but I haven't got to that yet). Maybe a split could be considered then but these formats up to DDR2 are quite similar with a lot of common values and only a few differences to have them in a single function. As a documentation better consult something else, e.g. wikipedia has a good summary.

Anyhow, for this patch:
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>

Thank you,
BALATON Zoltan

Reply via email to