Comment 2 for bug 837235

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

The main difference with latest SPL is that it's trying to calculate the timings instead of using a predefined table. Unfortunately with ES2.0 it seems the EMIF initialization is broken, as all readl calls are just returning 0x0, like:

U-Boot code: 80100000 -> 8013AC20 BSS: -> 8017C314
CPU : OMAP4430
Board: OMAP4 Panda
I2C: ready
>>sdram_init()
in_sdram = 0
>>do_sdram_init() 4c000000
get_mr: EMIF2 cs 0 mr 00000000 val 0x0
get_mr: EMIF2 cs 0 mr 00000004 val 0x0
get_mr: EMIF2 cs 0 mr 00000005 val 0x0
lpddr2 sdram is not present, returning NULL
get_mr: EMIF2 cs 1 mr 80000000 val 0x0
get_mr: EMIF2 cs 1 mr 80000004 val 0x0
get_mr: EMIF2 cs 1 mr 80000005 val 0x0
lpddr2 sdram is not present, returning NULL
>>do_sdram_init() 4d000000

This is what I get when running the same binaries against a ES2.1 based panda:

U-Boot code: 80100000 -> 8013ABEC BSS: -> 8017C2D4
CPU : OMAP4430
Board: OMAP4 Panda
I2C: ready
>>sdram_init()
in_sdram = 1
>>do_sdram_init() 4c000000
get_mr: EMIF2 cs 0 mr 00000000 val 0x18
get_mr: EMIF2 cs 0 mr 00000004 val 0x3
get_mr: EMIF2 cs 0 mr 00000005 val 0x3
get_mr: EMIF2 cs 0 mr 00000006 val 0x0
get_mr: EMIF2 cs 0 mr 00000007 val 0x0
get_mr: EMIF2 cs 0 mr 00000008 val 0x14
EMIF2 CS0 Elpida LPDDR2-S4 256 MB
get_mr: EMIF2 cs 1 mr 80000000 val 0x18
get_mr: EMIF2 cs 1 mr 80000004 val 0x3
get_mr: EMIF2 cs 1 mr 80000005 val 0x3
get_mr: EMIF2 cs 1 mr 80000006 val 0x0
get_mr: EMIF2 cs 1 mr 80000007 val 0x0
get_mr: EMIF2 cs 1 mr 80000008 val 0x14
EMIF2 CS1 Elpida LPDDR2-S4 256 MB
emif: timings table: 400000000
emif: addressing table index 5
...

As a workaround you can just define CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS at include/configs/omap4_panda.h and it should work just fine.

The binaries if you just want to get your system working again: http://people.linaro.org/~rsalveti/837235/