[U-Boot] [PATCH 11/13] i.MX28: Add battery boot components to SPL

Lauri Hintsala lauri.hintsala at bluegiga.com
Thu Jul 26 11:15:51 CEST 2012


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 <marek.vasut at gmail.com>
>>>>
>>>> Signed-off-by: Marek Vasut <marek.vasut at gmail.com>
>>>> Cc: Detlev Zundel <dzu at denx.de>
>>>> Cc: Fabio Estevam <fabio.estevam at freescale.com>
>>>> Cc: Stefano Babic <sbabic at denx.de>
>>>> Cc: Wolfgang Denk <wd at denx.de>
>>>> ---
>>>>
>>>>    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?

Lauri


More information about the U-Boot mailing list