Patchwork [U-Boot] mxs: Boost the memory power supply

login
register
mail settings
Submitter Marek Vasut
Date Jan. 21, 2013, 10:51 p.m.
Message ID <1358808710-20142-1-git-send-email-marex@denx.de>
Download mbox | patch
Permalink /patch/214290/
State Superseded
Headers show

Comments

Marek Vasut - Jan. 21, 2013, 10:51 p.m.
The memory power supply on MX23 didn't pump out enough juice into
the DRAM chip, thus caused occasional memory corruption. Fix this.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
---
 arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c |    4 ++--
 board/olimex/mx23_olinuxino/spl_boot.c    |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
Otavio Salvador - Jan. 22, 2013, 12:44 a.m.
On Mon, Jan 21, 2013 at 8:51 PM, Marek Vasut <marex@denx.de> wrote:
> The memory power supply on MX23 didn't pump out enough juice into
> the DRAM chip, thus caused occasional memory corruption. Fix this.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Otavio Salvador <otavio@ossystems.com.br>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> Cc: Stefano Babic <sbabic@denx.de>

Acked-by: Otavio Salvador <otavio@ossystems.com.br>

I did try it in mx23evk and mtest works fine there. However this patch
needs to wait for other MMC changes as it does not apply in current
form.

I will post them soon.

--
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
Marek Vasut - Jan. 22, 2013, 12:58 a.m.
Dear Otavio Salvador,

> On Mon, Jan 21, 2013 at 8:51 PM, Marek Vasut <marex@denx.de> wrote:
> > The memory power supply on MX23 didn't pump out enough juice into
> > the DRAM chip, thus caused occasional memory corruption. Fix this.
> > 
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Cc: Otavio Salvador <otavio@ossystems.com.br>
> > Cc: Fabio Estevam <fabio.estevam@freescale.com>
> > Cc: Stefano Babic <sbabic@denx.de>
> 
> Acked-by: Otavio Salvador <otavio@ossystems.com.br>
> 
> I did try it in mx23evk and mtest works fine there. However this patch
> needs to wait for other MMC changes as it does not apply in current
> form.

Ah right, I rebased it on top of -imx/master. V2 out. Obviously you can not 
stall important fixes because of other less important patchset, that makes no 
sense. Thus, V2.

Good catch, thanks.

> I will post them soon.
> 
> --
> Otavio Salvador                             O.S. Systems
> E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
> Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

Best regards,
Marek Vasut
Fabio Estevam - Jan. 22, 2013, 12:59 a.m.
Hi Otavio,

On Mon, Jan 21, 2013 at 10:44 PM, Otavio Salvador
<otavio@ossystems.com.br> wrote:

> I did try it in mx23evk and mtest works fine there. However this patch

That's good news. Do you plan to submit mx23evk support?

Thanks,

Fabio Estevam
Otavio Salvador - Jan. 22, 2013, 1 a.m.
On Mon, Jan 21, 2013 at 10:59 PM, Fabio Estevam <festevam@gmail.com> wrote:
> Hi Otavio,
>
> On Mon, Jan 21, 2013 at 10:44 PM, Otavio Salvador
> <otavio@ossystems.com.br> wrote:
>
>> I did try it in mx23evk and mtest works fine there. However this patch
>
> That's good news. Do you plan to submit mx23evk support?

Yes; finishing MMC timeout fix to send it.

--
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

Patch

diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
index 5944dd2..836e636 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
@@ -230,7 +230,7 @@  static void mx23_mem_setup_vddmem(void)
 	struct mxs_power_regs *power_regs =
 		(struct mxs_power_regs *)MXS_POWER_BASE;
 
-	writel((0x10 << POWER_VDDMEMCTRL_TRG_OFFSET) |
+	writel((0x12 << POWER_VDDMEMCTRL_TRG_OFFSET) |
 		POWER_VDDMEMCTRL_ENABLE_ILIMIT |
 		POWER_VDDMEMCTRL_ENABLE_LINREG |
 		POWER_VDDMEMCTRL_PULLDOWN_ACTIVE,
@@ -238,7 +238,7 @@  static void mx23_mem_setup_vddmem(void)
 
 	early_delay(10000);
 
-	writel((0x10 << POWER_VDDMEMCTRL_TRG_OFFSET) |
+	writel((0x12 << POWER_VDDMEMCTRL_TRG_OFFSET) |
 		POWER_VDDMEMCTRL_ENABLE_LINREG,
 		&power_regs->hw_power_vddmemctrl);
 }
diff --git a/board/olimex/mx23_olinuxino/spl_boot.c b/board/olimex/mx23_olinuxino/spl_boot.c
index 3cc40cd..d42bb14 100644
--- a/board/olimex/mx23_olinuxino/spl_boot.c
+++ b/board/olimex/mx23_olinuxino/spl_boot.c
@@ -29,7 +29,7 @@ 
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
 
-#define	MUX_CONFIG_EMI	(MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL)
+#define	MUX_CONFIG_EMI	(MXS_PAD_3V3 | MXS_PAD_16MA | MXS_PAD_PULLUP)
 #define	MUX_CONFIG_SSP	(MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP)
 
 const iomux_cfg_t iomux_setup[] = {