aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorFrancesco Dolcini2022-06-24 12:33:35 +0200
committerStefano Babic2022-06-28 15:24:31 +0200
commit6b5ecb829391331bc1125c2b2033344b870ea5c3 (patch)
treeabd945420a722516e10c8ef66e2d2b465f70e83b /arch
parentd4cd19ded8a23fdc0d9c6499f82b3f7a596bc29d (diff)
mx6: ddr: Fix disabling on-die termination
In case rtt_nom is set to 0 keep ODT disabled (MMDC MPODTCTRL = 0). No changes required for DDR MR1 Rtt_Nom impedance register, 0 value is already handled correctly. No board is currently affected by this change (rtt_nom != 0 on all i.MX6 ddr3 boards), this will be used by a follow-up change. Fixes: fe0f7f7842e1 ("mx6: add mmdc configuration for MX6Q/MX6DL") Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Reviewed-by: Fabio Estevam <festevam@denx.de> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/mx6/ddr.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/mx6/ddr.c b/arch/arm/mach-imx/mx6/ddr.c
index 73a637c42d6..3c87c577737 100644
--- a/arch/arm/mach-imx/mx6/ddr.c
+++ b/arch/arm/mach-imx/mx6/ddr.c
@@ -1469,8 +1469,17 @@ void mx6_ddr3_cfg(const struct mx6_ddr_sysinfo *sysinfo,
MMDC1(mprddqby3dl, 0x33333333);
}
- /* MMDC Termination: rtt_nom:2 RZQ/2(120ohm), rtt_nom:1 RZQ/4(60ohm) */
- val = (sysinfo->rtt_nom == 2) ? 0x00011117 : 0x00022227;
+ /*
+ * MMDC Termination: rtt_nom:2 RZQ/2(120ohm),
+ * rtt_nom:1 RZQ/4(60ohm),
+ * rtt_nom:0 Disabled
+ */
+ if (sysinfo->rtt_nom == 0)
+ val = 0x00000000;
+ else if (sysinfo->rtt_nom == 2)
+ val = 0x00011117;
+ else
+ val = 0x00022227;
mmdc0->mpodtctrl = val;
if (sysinfo->dsize > 1)
MMDC1(mpodtctrl, val);