All of lore.kernel.org
 help / color / mirror / Atom feed
* Question/issues about i.MX6 DDR configuration
@ 2021-12-02 16:14 Francesco Dolcini
  2021-12-02 20:14 ` Fabio Estevam
  2022-03-17  8:37 ` Francesco Dolcini
  0 siblings, 2 replies; 9+ messages in thread
From: Francesco Dolcini @ 2021-12-02 16:14 UTC (permalink / raw)
  To: Stefano Babic, Fabio Estevam, uboot-imx, u-boot, Tim Harvey
  Cc: Marcel Ziswiler

Hello Fabio, Tim and all,
in the last few weeks I have been debugging some sporadic i.MX6 board
boot failures (2020.07 U-Boot, if that matters) and we have some loose
indication that they could be RAM related. The effect is that SPL is not
able to load U-Boot from the eMMC to DDR and dqs|write_level calibration
is failing.

We do write the memory configuration in a pretty simple way, SPL is just
iterating thought a list of register address/value, in a very similar
way to what was done using the DCD table. Today most of the boards
however use a more programmatic approach as introduced by Tim in 2014 [1].

Contrary to that, however, Fabio moved away from this new approach to
just raw registers writing for the sabre board [2][3].

I'm a little bit puzzled at the moment, according to the iMX6 reference
manual[4], 44.4.2 MMDC initialization, a specific sequence is required
to be followed and this is implemented by the `mx6_dram_cfg()`[5]
function, but according to what Fabio wrote the raw initialization of
registers was just more reliable for mx6sabresd. Fabio, what was the
reason?

I would expect that using `mx6_dram_cfg()` is the correct approach and I
would expect issue if doing in a different way from what is described in
the reference manual. Regarding that I found also this note in the
manual interesting:

"A Precharge All command must be issued prior to the
MRW command to ensure robust DDR initialization. This
command is required to be issued to both chip selects if two
chip selects are utilized in the system."

In my tests adding 1ms delay after each MMDC register write seems to
have a positive effect and this is going into the direction that using
`mx6_dram_cfg()` is the way to go.

Any suggestion? Do I miss something?

Francesco

[1] https://lore.kernel.org/all/1401750807-5975-7-git-send-email-tharvey@gateworks.com/
[2] https://lore.kernel.org/all/1474892066-32005-1-git-send-email-festevam@gmail.com/
[3] https://source.denx.de/u-boot/u-boot/-/commit/3b30eece271cfc4096c2d20048c89e8bed0bbbfd
[4] https://www.nxp.com/webapp/Download?colCode=IMX6DQRM
[5] https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/mach-imx/mx6/ddr.c#L1672


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-03-17  8:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-02 16:14 Question/issues about i.MX6 DDR configuration Francesco Dolcini
2021-12-02 20:14 ` Fabio Estevam
2021-12-02 20:36   ` Michael Nazzareno Trimarchi
2021-12-02 20:56     ` Fabio Estevam
2021-12-03  8:46       ` Francesco Dolcini
2021-12-04 14:29         ` Fabio Estevam
2021-12-06  8:56           ` Francesco Dolcini
2021-12-03  8:33     ` Francesco Dolcini
2022-03-17  8:37 ` Francesco Dolcini

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.