Skip to content
  • Tony Lindgren's avatar
    LC15: Increase T_RFC to fix 4GB kernel memory errors · 2b143578
    Tony Lindgren authored
    
    
    With u-boot related memory errors out of the way fixed with patch
    "LC15: Fix flakey ddr3 detection with ref_ctrl and ref_ctrl_final",
    we can now narrow down the kernel related errors easily.
    
    Playing with timing changes I narrowed down the kernel hangs to register
    sdram_tim3 where we need to increase the time for T_RFC. This is for
    "Minimum number of DDR clock cycles from Refresh or Load Mode to Refresh
    or Activate, minus one" according to omap5432 TRM.
    
    Maxing out the value for bits 12:4 made the new 4GB pyra's C02 and C03
    boot reliably. And then looking at the timings again, the T_RFC value
    should be 187 - 1 (0xBA) and not 139 - 1 (0x8A). Note the Upper case
    B vs 8 :)
    
    Value 187 - 1 (0xBA) matches Samsung K4B8G1646D-MYK0 datasheet
    "[ Table 34 ] Timing used for IDD and IDDQ Measured - Loop Patterns"
    for DDR3-1066 8Gb memory. We are currently using 4Gb value 139 - 1
    (0x8A).
    
    It is possible that this was caused by B vs 8 typo initially and then
    was not noticed because of the u-boot memory errors and getting confused
    with the memory datasheet for 4Gb vs 4GB while we have four 8Gb memory
    chips.
    
    However I also noticed that value 187 - 1 (0xBA) still won't work
    reliably with new board C05. And new C21 and my older revision board
    C50 still did not work at all. However, using value of 191 - 1 (0xBE)
    makes all of them boot reliably for me. So let's use value 191 - 1
    (0xBE) for now, and adjust it if needed based on testing with more
    pyras.
    
    Note that we still can have pyra hang running two instances of
    memtester 1500M for about 10 minutes on bare CPU boards with no heat
    sink connected. The boards now boot reliably after that though,
    so presumably the pyra heat sink will solve this issue.
    
    Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
    2b143578