From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 26 Jul 2012 17:41:57 +0200 Subject: [U-Boot] [PATCH 11/13] i.MX28: Add battery boot components to SPL In-Reply-To: <50110AC7.5050702@bluegiga.com> References: <1335906593-25183-1-git-send-email-marex@denx.de> <201207252128.12122.marex@denx.de> <50110AC7.5050702@bluegiga.com> Message-ID: <201207261741.57890.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Lauri Hintsala, > On 07/25/2012 10:28 PM, Marek Vasut wrote: > > Dear Lauri Hintsala, > > > >> On 07/25/2012 05:17 PM, Lauri Hintsala wrote: > >>> Hi Marek, > >>> > >>> On 05/02/2012 12:09 AM, Marek Vasut wrote: > >>>> From: Marek Vasut > >>>> > >>>> Signed-off-by: Marek Vasut > >>>> Cc: Detlev Zundel > >>>> Cc: Fabio Estevam > >>>> Cc: Stefano Babic > >>>> Cc: Wolfgang Denk > >>>> --- > >>>> > >>>> arch/arm/cpu/arm926ejs/mx28/spl_power_init.c | 100 > >>>> > >>>> +++++++++++++++++++++++--- > >>>> > >>>> 1 file changed, 92 insertions(+), 8 deletions(-) > >>> > >>> This patch increases the power consumption about 250 mW (~50mA @ 5V). I > >>> think it could be nice to disable LRADC after spl boot if it is not > >>> really needed. > >> > >> This happens only on our machine. The increase is only 25 mW (5mA) on > >> mx28evk. > > > > You tried with latest mainline? > > Yes, I'm using v2012.07-rc2. > > > Sure it's OK to disable LRADC afterwards, will you submit a patch please? > > I just noticed the power was not eaten by LRADC. Power consumption is > increasing because of a battery charger. The charger circuit is enabled > even if the machine has no a battery connected to CPU. > > I added debug code to see the status of the battery charger: > > --- a/arch/arm/cpu/arm926ejs/mx28/spl_power_init.c > +++ b/arch/arm/cpu/arm926ejs/mx28/spl_power_init.c > @@ -1003,6 +1003,14 @@ void mx28_power_init(void) > > writel(POWER_5VCTRL_PWDN_5VBRNOUT, &power_regs->hw_power_5vctrl_set); > > + /* > + power_regs->hw_power_charge_set = POWER_CHARGE_PWD_BATTCHRG; > + early_delay(1000); > + */ > + > + serial_printf("Charger circuit: %s\n", > + power_regs->hw_power_charge & POWER_CHARGE_PWD_BATTCHRG?"down":"up"); > + > early_delay(1000); > } > > After disabling battery charger at the end of power init 25 mW power > leak has been gone. Tested with mx28evk rev D. Is there any reason to > enable the charger without a battery? No, no reason at all, disable it in case you're not running from battery. But please cross check with imx bootlets. > Lauri Best regards, Marek Vasut