* [PATCH] ARM: imx: ddr: Fill in missing DDRC ZQCTLx on i.MX7
@ 2020-05-21 23:12 Marek Vasut
2020-06-23 7:52 ` sbabic at denx.de
0 siblings, 1 reply; 2+ messages in thread
From: Marek Vasut @ 2020-05-21 23:12 UTC (permalink / raw)
To: u-boot
The iMX7 defines further DDRC ZQCTLx registers, however those were
thus far missing from the list of registers and not programmed. On
systems with LPDDR2 or DDR3, those registers must be programmed with
correct values, otherwise the DRAM may not work. However, existing
systems which worked without programming these registers before are
now setting those registers to 0, which is the default value, so no
functional change there.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
---
arch/arm/include/asm/arch-mx7/mx7-ddr.h | 4 +++-
arch/arm/mach-imx/mx7/ddr.c | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/arm/include/asm/arch-mx7/mx7-ddr.h b/arch/arm/include/asm/arch-mx7/mx7-ddr.h
index 37aaee0ad7..bea5dd8ec5 100644
--- a/arch/arm/include/asm/arch-mx7/mx7-ddr.h
+++ b/arch/arm/include/asm/arch-mx7/mx7-ddr.h
@@ -39,7 +39,9 @@ struct ddrc {
u32 dramtmg8; /* 0x0120 */
u32 reserved7[0x17];
u32 zqctl0; /* 0x0180 */
- u32 reserved8[0x03];
+ u32 zqctl1; /* 0x0184 */
+ u32 zqctl2; /* 0x0188 */
+ u32 zqstat; /* 0x018c */
u32 dfitmg0; /* 0x0190 */
u32 dfitmg1; /* 0x0194 */
u32 reserved9[0x02];
diff --git a/arch/arm/mach-imx/mx7/ddr.c b/arch/arm/mach-imx/mx7/ddr.c
index 9713835bf2..9ffd8c6c66 100644
--- a/arch/arm/mach-imx/mx7/ddr.c
+++ b/arch/arm/mach-imx/mx7/ddr.c
@@ -58,6 +58,7 @@ void mx7_dram_cfg(struct ddrc *ddrc_regs_val, struct ddrc_mp *ddrc_mp_val,
writel(ddrc_regs_val->dramtmg5, &ddrc_regs->dramtmg5);
writel(ddrc_regs_val->dramtmg8, &ddrc_regs->dramtmg8);
writel(ddrc_regs_val->zqctl0, &ddrc_regs->zqctl0);
+ writel(ddrc_regs_val->zqctl1, &ddrc_regs->zqctl1);
writel(ddrc_regs_val->dfitmg0, &ddrc_regs->dfitmg0);
writel(ddrc_regs_val->dfitmg1, &ddrc_regs->dfitmg1);
writel(ddrc_regs_val->dfiupd0, &ddrc_regs->dfiupd0);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] ARM: imx: ddr: Fill in missing DDRC ZQCTLx on i.MX7
2020-05-21 23:12 [PATCH] ARM: imx: ddr: Fill in missing DDRC ZQCTLx on i.MX7 Marek Vasut
@ 2020-06-23 7:52 ` sbabic at denx.de
0 siblings, 0 replies; 2+ messages in thread
From: sbabic at denx.de @ 2020-06-23 7:52 UTC (permalink / raw)
To: u-boot
> The iMX7 defines further DDRC ZQCTLx registers, however those were
> thus far missing from the list of registers and not programmed. On
> systems with LPDDR2 or DDR3, those registers must be programmed with
> correct values, otherwise the DRAM may not work. However, existing
> systems which worked without programming these registers before are
> now setting those registers to 0, which is the default value, so no
> functional change there.
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Fabio Estevam <festevam@gmail.com>
> Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Stefano Babic <sbabic@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-23 7:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-21 23:12 [PATCH] ARM: imx: ddr: Fill in missing DDRC ZQCTLx on i.MX7 Marek Vasut
2020-06-23 7:52 ` sbabic at denx.de
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox