i2c/smbus_eeprom: Add minimum write recovery time for DDR2
PATCH 1/1 i2c/smbus_eeprom: Add minimum write recovery time for DDR2
This is needed for newer u-boot-sam460ex versions to pass the DRAM setup.
--- hw/i2c/smbus_eeprom.c | 1 + 1 file changed, 1 insertion(+)
hw/i2c/smbus_eeprom.c +1 -0
@@ -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 */ /* checksum */ for (i =0 ; i <63 ; i++) {
Signature · 1 line
2.41.3
Quoted 4 lines · BALATON Zoltan
This is needed for newer u-boot-sam460ex versions to pass the DRAM setup.
Signed-off-by BALATON Zoltan <[email protected]>
Ping? Will somebody review and merge this?
Regards,
BALATON Zoltan
Quoted 17 lines
---
hw/i2c/smbus_eeprom.c| 1 +1 file changed, 1 insertion(+)hw/i2c/smbus_eeprom.c +1
-0@@ -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 */ /* checksum */ for (i =0 ; i <63 ; i++) {
Quoted 13 lines · BALATON Zoltan
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(+)hw/i2c/smbus_eeprom.c +0
-0
hw/i2c/smbus_eeprom.c uint8_t *spd_data_generate(enum sdram_type type, ram_addr_t ram_size) · line 291
Quoted 4 lines
hw/i2c/smbus_eeprom.c +1
-0@@ -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.
Anyhow, for this patch:
Quoted 9 lines · Philippe Mathieu-Daudé
Quoted 8 lines · BALATON Zoltan
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(+)
Quoted 14 lines
hw/i2c/smbus_eeprom.c uint8_t *spd_data_generate(enum sdram_type type, · line 292
Quoted 10 lines
hw/i2c/smbus_eeprom.c +1
-0@@ -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.
Quoted 2 lines
Anyhow, for this patch:
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Thank you,
BALATON Zoltan
Quoted 7 lines · BALATON Zoltan
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(+)
Patch queued, thanks.