All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] ARM: mxs: Enable DCDC converter for battery boot
@ 2013-10-28 11:29 Marek Vasut
  2013-10-28 11:29 ` [U-Boot] [PATCH 2/2] ARM: mxs: Configure 2 Gbit DDR2 RAM for BG0900 Marek Vasut
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Marek Vasut @ 2013-10-28 11:29 UTC (permalink / raw)
  To: u-boot

In case the board detected sufficient voltage for battery boot,
make sure the DCDC converter is ON and the board is not running
only from linregs, otherwise an instability will be observed.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
---
 arch/arm/cpu/arm926ejs/mxs/spl_power_init.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
index 8ea45be..d25019a 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
@@ -654,6 +654,8 @@ static void mxs_batt_boot(void)
 	clrsetbits_le32(&power_regs->hw_power_5vctrl,
 		POWER_5VCTRL_CHARGE_4P2_ILIMIT_MASK,
 		0x8 << POWER_5VCTRL_CHARGE_4P2_ILIMIT_OFFSET);
+
+	mxs_power_enable_4p2();
 }
 
 /**
-- 
1.8.4.rc3

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

* [U-Boot] [PATCH 2/2] ARM: mxs: Configure 2 Gbit DDR2 RAM for BG0900
  2013-10-28 11:29 [U-Boot] [PATCH 1/2] ARM: mxs: Enable DCDC converter for battery boot Marek Vasut
@ 2013-10-28 11:29 ` Marek Vasut
  2013-10-31 17:03   ` Stefano Babic
  2013-10-29  1:46 ` [U-Boot] [PATCH 1/2] ARM: mxs: Enable DCDC converter for battery boot Fabio Estevam
  2013-10-31 17:02 ` Stefano Babic
  2 siblings, 1 reply; 9+ messages in thread
From: Marek Vasut @ 2013-10-28 11:29 UTC (permalink / raw)
  To: u-boot

From: Christoph G. Baumann <c.baumann@ppc-ag.de>

The BG0900 module has 2Gbit DRAM module on it, adjust the DataBahn
DRAM controller registers so the DRAM module will be correctly
recognised.

Signed-off-by: Christoph G. Baumann <c.baumann@ppc-ag.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
---
 board/ppcag/bg0900/spl_boot.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/board/ppcag/bg0900/spl_boot.c b/board/ppcag/bg0900/spl_boot.c
index 2616e1f..a04c955 100644
--- a/board/ppcag/bg0900/spl_boot.c
+++ b/board/ppcag/bg0900/spl_boot.c
@@ -118,6 +118,19 @@ const iomux_cfg_t iomux_setup[] = {
 
 void mxs_adjust_memory_params(uint32_t *dram_vals)
 {
+	/*
+	 * DDR Controller Registers
+	 * Manufacturer:	Winbond
+	 * Device Part Number:	W972GG6JB-25I
+	 * Clock Freq.:		200MHz
+	 * Density:		2Gb
+	 * Chip Selects:	1
+	 * Number of Banks:	8
+	 * Row address:		14
+	 * Column address:	10
+	 */
+
+	dram_vals[0x74 / 4] = 0x0102010A;
 	dram_vals[0x98 / 4] = 0x04005003;
 	dram_vals[0x9c / 4] = 0x090000c8;
 
-- 
1.8.4.rc3

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

* [U-Boot] [PATCH 1/2] ARM: mxs: Enable DCDC converter for battery boot
  2013-10-28 11:29 [U-Boot] [PATCH 1/2] ARM: mxs: Enable DCDC converter for battery boot Marek Vasut
  2013-10-28 11:29 ` [U-Boot] [PATCH 2/2] ARM: mxs: Configure 2 Gbit DDR2 RAM for BG0900 Marek Vasut
@ 2013-10-29  1:46 ` Fabio Estevam
  2013-10-29 15:28   ` Marek Vasut
  2013-10-31 17:02 ` Stefano Babic
  2 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2013-10-29  1:46 UTC (permalink / raw)
  To: u-boot

Hi Marek,

On Mon, Oct 28, 2013 at 9:29 AM, Marek Vasut <marex@denx.de> wrote:
> In case the board detected sufficient voltage for battery boot,
> make sure the DCDC converter is ON and the board is not running
> only from linregs, otherwise an instability will be observed.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  arch/arm/cpu/arm926ejs/mxs/spl_power_init.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
> index 8ea45be..d25019a 100644
> --- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
> +++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
> @@ -654,6 +654,8 @@ static void mxs_batt_boot(void)
>         clrsetbits_le32(&power_regs->hw_power_5vctrl,
>                 POWER_5VCTRL_CHARGE_4P2_ILIMIT_MASK,
>                 0x8 << POWER_5VCTRL_CHARGE_4P2_ILIMIT_OFFSET);
> +
> +       mxs_power_enable_4p2();

Shouldn't this be conditional?

#if defined CONFIG_MXS_ENABLE_4P2
mxs_power_enable_4p2();
#endif

Then the boards that need this power supply enable
CONFIG_MXS_ENABLE_4P2 in its config file.

Regards,

Fabio Estevam

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

* [U-Boot] [PATCH 1/2] ARM: mxs: Enable DCDC converter for battery boot
  2013-10-29  1:46 ` [U-Boot] [PATCH 1/2] ARM: mxs: Enable DCDC converter for battery boot Fabio Estevam
@ 2013-10-29 15:28   ` Marek Vasut
  2014-10-23  7:07     ` Michael Thalmeier
  0 siblings, 1 reply; 9+ messages in thread
From: Marek Vasut @ 2013-10-29 15:28 UTC (permalink / raw)
  To: u-boot

Dear Fabio Estevam,

> Hi Marek,
> 
> On Mon, Oct 28, 2013 at 9:29 AM, Marek Vasut <marex@denx.de> wrote:
> > In case the board detected sufficient voltage for battery boot,
> > make sure the DCDC converter is ON and the board is not running
> > only from linregs, otherwise an instability will be observed.
> > 
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Cc: Stefano Babic <sbabic@denx.de>
> > Cc: Fabio Estevam <fabio.estevam@freescale.com>
> > ---
> > 
> >  arch/arm/cpu/arm926ejs/mxs/spl_power_init.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
> > b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c index 8ea45be..d25019a
> > 100644
> > --- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
> > +++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
> > @@ -654,6 +654,8 @@ static void mxs_batt_boot(void)
> > 
> >         clrsetbits_le32(&power_regs->hw_power_5vctrl,
> >         
> >                 POWER_5VCTRL_CHARGE_4P2_ILIMIT_MASK,
> >                 0x8 << POWER_5VCTRL_CHARGE_4P2_ILIMIT_OFFSET);
> > 
> > +
> > +       mxs_power_enable_4p2();
> 
> Shouldn't this be conditional?
> 
> #if defined CONFIG_MXS_ENABLE_4P2
> mxs_power_enable_4p2();
> #endif
> 
> Then the boards that need this power supply enable
> CONFIG_MXS_ENABLE_4P2 in its config file.

No, we want to start the DCDC converter unconditionally when running on battery 
power to increase efficiency.

Best regards,
Marek Vasut

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

* [U-Boot] [PATCH 1/2] ARM: mxs: Enable DCDC converter for battery boot
  2013-10-28 11:29 [U-Boot] [PATCH 1/2] ARM: mxs: Enable DCDC converter for battery boot Marek Vasut
  2013-10-28 11:29 ` [U-Boot] [PATCH 2/2] ARM: mxs: Configure 2 Gbit DDR2 RAM for BG0900 Marek Vasut
  2013-10-29  1:46 ` [U-Boot] [PATCH 1/2] ARM: mxs: Enable DCDC converter for battery boot Fabio Estevam
@ 2013-10-31 17:02 ` Stefano Babic
  2 siblings, 0 replies; 9+ messages in thread
From: Stefano Babic @ 2013-10-31 17:02 UTC (permalink / raw)
  To: u-boot

On 28/10/2013 12:29, Marek Vasut wrote:
> In case the board detected sufficient voltage for battery boot,
> make sure the DCDC converter is ON and the board is not running
> only from linregs, otherwise an instability will be observed.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> ---

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic


-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
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] 9+ messages in thread

* [U-Boot] [PATCH 2/2] ARM: mxs: Configure 2 Gbit DDR2 RAM for BG0900
  2013-10-28 11:29 ` [U-Boot] [PATCH 2/2] ARM: mxs: Configure 2 Gbit DDR2 RAM for BG0900 Marek Vasut
@ 2013-10-31 17:03   ` Stefano Babic
  0 siblings, 0 replies; 9+ messages in thread
From: Stefano Babic @ 2013-10-31 17:03 UTC (permalink / raw)
  To: u-boot

On 28/10/2013 12:29, Marek Vasut wrote:
> From: Christoph G. Baumann <c.baumann@ppc-ag.de>
> 
> The BG0900 module has 2Gbit DRAM module on it, adjust the DataBahn
> DRAM controller registers so the DRAM module will be correctly
> recognised.
> 
> Signed-off-by: Christoph G. Baumann <c.baumann@ppc-ag.de>
> Cc: Marek Vasut <marex@denx.de>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> ---

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic


-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
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] 9+ messages in thread

* [U-Boot] [PATCH 1/2] ARM: mxs: Enable DCDC converter for battery boot
  2013-10-29 15:28   ` Marek Vasut
@ 2014-10-23  7:07     ` Michael Thalmeier
  2014-10-25 21:43       ` Fabio Estevam
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Thalmeier @ 2014-10-23  7:07 UTC (permalink / raw)
  To: u-boot

Hi Marek, and Fabio

> > Shouldn't this be conditional?
> > 
> > #if defined CONFIG_MXS_ENABLE_4P2
> > mxs_power_enable_4p2();
> > #endif
> > 
> > Then the boards that need this power supply enable
> > CONFIG_MXS_ENABLE_4P2 in its config file.
> 
> No, we want to start the DCDC converter unconditionally when running on
battery 
> power to increase efficiency.
> 

I just stumbled upon this, because our board does not boot reliably any more
with this change.
Perhaps we have a special situation in that our board is powered via
DCDC_BATT only by an external power source (no battery).

I am currently working on creating a patch to only conditionally enabling
this feature, or to enable it by default and have it conditionally be
disabled for boards that are known to have problems with this.

Which approach seems to be more feasible to you?

Regards Michael

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

* [U-Boot] [PATCH 1/2] ARM: mxs: Enable DCDC converter for battery boot
  2014-10-23  7:07     ` Michael Thalmeier
@ 2014-10-25 21:43       ` Fabio Estevam
  2014-10-25 22:42         ` Marek Vasut
  0 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2014-10-25 21:43 UTC (permalink / raw)
  To: u-boot

Hi Michael,

On Thu, Oct 23, 2014 at 5:07 AM, Michael Thalmeier
<michael.thalmeier@hale.at> wrote:
> Hi Marek, and Fabio
>
>> > Shouldn't this be conditional?
>> >
>> > #if defined CONFIG_MXS_ENABLE_4P2
>> > mxs_power_enable_4p2();
>> > #endif
>> >
>> > Then the boards that need this power supply enable
>> > CONFIG_MXS_ENABLE_4P2 in its config file.
>>
>> No, we want to start the DCDC converter unconditionally when running on
> battery
>> power to increase efficiency.
>>
>
> I just stumbled upon this, because our board does not boot reliably any more
> with this change.
> Perhaps we have a special situation in that our board is powered via
> DCDC_BATT only by an external power source (no battery).
>
> I am currently working on creating a patch to only conditionally enabling
> this feature, or to enable it by default and have it conditionally be
> disabled for boards that are known to have problems with this.
>
> Which approach seems to be more feasible to you?

Initially I proposed something like:

#if defined CONFIG_MXS_ENABLE_4P2
mxs_power_enable_4p2();
#endif

,but Marek was not happy about it, so let's wait for his thoughts. Marek?

Regards,

Fabio Estevam

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

* [U-Boot] [PATCH 1/2] ARM: mxs: Enable DCDC converter for battery boot
  2014-10-25 21:43       ` Fabio Estevam
@ 2014-10-25 22:42         ` Marek Vasut
  0 siblings, 0 replies; 9+ messages in thread
From: Marek Vasut @ 2014-10-25 22:42 UTC (permalink / raw)
  To: u-boot

On Saturday, October 25, 2014 at 11:43:05 PM, Fabio Estevam wrote:
> Hi Michael,
> 
> On Thu, Oct 23, 2014 at 5:07 AM, Michael Thalmeier
> 
> <michael.thalmeier@hale.at> wrote:
> > Hi Marek, and Fabio
> > 
> >> > Shouldn't this be conditional?
> >> > 
> >> > #if defined CONFIG_MXS_ENABLE_4P2
> >> > mxs_power_enable_4p2();
> >> > #endif
> >> > 
> >> > Then the boards that need this power supply enable
> >> > CONFIG_MXS_ENABLE_4P2 in its config file.
> >> 
> >> No, we want to start the DCDC converter unconditionally when running on
> > 
> > battery
> > 
> >> power to increase efficiency.
> > 
> > I just stumbled upon this, because our board does not boot reliably any
> > more with this change.
> > Perhaps we have a special situation in that our board is powered via
> > DCDC_BATT only by an external power source (no battery).
> > 
> > I am currently working on creating a patch to only conditionally enabling
> > this feature, or to enable it by default and have it conditionally be
> > disabled for boards that are known to have problems with this.
> > 
> > Which approach seems to be more feasible to you?
> 
> Initially I proposed something like:
> 
> #if defined CONFIG_MXS_ENABLE_4P2
> mxs_power_enable_4p2();
> #endif
> 
> ,but Marek was not happy about it, so let's wait for his thoughts. Marek?

Can you share the schematic of your power distribution network ? I would like
to check a couple of things in there. I suspect there is a common problem with
MX23 and MX28 based designs discovered by Juha and I'd like to make sure you
don't suffer from it.

It's OK to send the schematic off-list.

Thanks!

Best regards,
Marek Vasut

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

end of thread, other threads:[~2014-10-25 22:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-28 11:29 [U-Boot] [PATCH 1/2] ARM: mxs: Enable DCDC converter for battery boot Marek Vasut
2013-10-28 11:29 ` [U-Boot] [PATCH 2/2] ARM: mxs: Configure 2 Gbit DDR2 RAM for BG0900 Marek Vasut
2013-10-31 17:03   ` Stefano Babic
2013-10-29  1:46 ` [U-Boot] [PATCH 1/2] ARM: mxs: Enable DCDC converter for battery boot Fabio Estevam
2013-10-29 15:28   ` Marek Vasut
2014-10-23  7:07     ` Michael Thalmeier
2014-10-25 21:43       ` Fabio Estevam
2014-10-25 22:42         ` Marek Vasut
2013-10-31 17:02 ` Stefano Babic

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.