mx6: ddr: Wait before issuing the first MRS cmd
authorFrancesco Dolcini <francesco.dolcini@toradex.com>
Wed, 6 Apr 2022 11:53:25 +0000 (13:53 +0200)
committerStefano Babic <sbabic@denx.de>
Tue, 12 Apr 2022 17:10:43 +0000 (19:10 +0200)
commitaa42894471ae6a4e57692f6912690489a1587019
treed190f8d5046a2d19873d967b14c0a16b502268d3
parent09dbac8174c47c6d547c7ab84601fc3424c71dc8
mx6: ddr: Wait before issuing the first MRS cmd

Wait 1ms before issuing the first MRS command to write DDR3 Mode
registers.

There is a requirement to wait a minimum time before issuing command to
the DDR3 device, according to the JEDEC standard this time is 500us
(after RESET_n is de-asserted until CKE becomes active) + tXPR (Reset
CKE Exit time, maximum value 360ns).

It seems that for some reason this is not enforced by the MMDC
controller.

Without this change we experienced random memory initialization failures
with about 2% boot failure rate on specific problematic boards, after
this change we were able to do more than 10.000 power-cycle without a
single failure.

Fixes: fe0f7f7842e1 ("mx6: add mmdc configuration for MX6Q/MX6DL")
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
arch/arm/mach-imx/mx6/ddr.c