All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] marvell: problems reading ddr spd
@ 2015-09-01 12:21 Stas Sergeev
  0 siblings, 0 replies; only message in thread
From: Stas Sergeev @ 2015-09-01 12:21 UTC (permalink / raw)
  To: u-boot

Hello.

It seems u-boot uses wrong i2c address to read SPD on armada-xp.
Namely,
http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/ddr/marvell/axp/ddr3_axp.h;h=d9e33f7c6e25602726d7c8fa077439037862d511;hb=HEAD
  39 #define BUS_WIDTH_ECC_TWSI_ADDR         0x4E
  40 #else
  41 #define BUS_WIDTH_ECC_TWSI_ADDR         0x4F
  42 #endif

Both 0x4e and 0x4f addresses do not exist, so ECC was never detected.
We changed to 0x56 - usual SPD address. Then is started to work with
some memory chips and hang with others. It appears ddr3_check_config()
reads wrong SPD bytes, applies wrong masks etc. Disabling AUTO_DETECTION_SUPPORT
was also troublesome, because of this piece:
http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/ddr/marvell/axp/ddr3_init.c;h=11b85916b72836cf47be922b4995f9adca23a91c;hb=HEAD
 438 #if defined(ECC_SUPPORT) && defined(AUTO_DETECTION_SUPPORT)
 439         ecc = DRAM_ECC;
 440 #endif
 441
 442 #if defined(ECC_SUPPORT) && defined(AUTO_DETECTION_SUPPORT)
 443         ecc = 0;
 444         if (ddr3_check_config(BUS_WIDTH_ECC_TWSI_ADDR, CONFIG_ECC))
 445                 ecc = 1;
 446 #endif

Am I right that on line 438 the inversion operator (!) is missing?

At the end we got it to work, but with too many changes, which
makes me to suspect there is some misunderstanding on my side.
Can someone please hint me how that code should work and what
is the address 0x4e? Why it doesn't exist for us?

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-01 12:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-01 12:21 [U-Boot] marvell: problems reading ddr spd Stas Sergeev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.