public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lauri Hintsala <lauri.hintsala@bluegiga.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 11/13] i.MX28: Add battery boot components to SPL
Date: Thu, 26 Jul 2012 12:15:51 +0300	[thread overview]
Message-ID: <50110AC7.5050702@bluegiga.com> (raw)
In-Reply-To: <201207252128.12122.marex@denx.de>

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

  reply	other threads:[~2012-07-26  9:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-01 21:09 [U-Boot] [PATCH 00/13] M28EVK/i.MX28 improvements Marek Vasut
2012-05-01 21:09 ` [U-Boot] [PATCH 01/13] FEC: Abstract out register setup Marek Vasut
2012-05-01 21:09 ` [U-Boot] [PATCH 02/13] M28EVK: Implement support for new board V2.0 Marek Vasut
2012-05-09 10:22   ` Stefano Babic
2012-05-09 10:31     ` Marek Vasut
2012-05-01 21:09 ` [U-Boot] [PATCH 03/13] M28EVK: Add SD update command Marek Vasut
2012-05-01 21:09 ` [U-Boot] [PATCH 04/13] i.MX28: Improve passing of data from SPL to U-Boot Marek Vasut
2012-05-01 21:09 ` [U-Boot] [PATCH 05/13] i.MX28: Implement boot pads sampling and reporting Marek Vasut
2012-05-01 21:09 ` [U-Boot] [PATCH 06/13] i.MX28: Add LCDIF register definitions Marek Vasut
2012-05-01 21:09 ` [U-Boot] [PATCH 07/13] i.MX28: Shut down the LCD controller before reset Marek Vasut
2012-05-01 21:09 ` [U-Boot] [PATCH 08/13] i.MX28: Add LRADC register definitions Marek Vasut
2012-05-01 21:09 ` [U-Boot] [PATCH 09/13] i.MX28: Add LRADC init to i.MX28 SPL Marek Vasut
2012-05-01 21:09 ` [U-Boot] [PATCH 10/13] i.MX28: Reorder battery status functions in SPL Marek Vasut
2012-05-01 21:09 ` [U-Boot] [PATCH 11/13] i.MX28: Add battery boot components to SPL Marek Vasut
2012-07-25 14:17   ` Lauri Hintsala
2012-07-25 14:40     ` Lauri Hintsala
2012-07-25 19:28       ` Marek Vasut
2012-07-26  9:15         ` Lauri Hintsala [this message]
2012-07-26 15:41           ` Marek Vasut
2012-05-01 21:09 ` [U-Boot] [PATCH 12/13] i.MX28: Check if WP detection is implemented at all Marek Vasut
2012-05-09 10:35   ` Stefano Babic
2012-05-01 21:09 ` [U-Boot] [PATCH 13/13] i.MX28: Avoid redefining serial_put[cs]() Marek Vasut
2012-05-09 10:35   ` Stefano Babic
2012-05-09 10:52 ` [U-Boot] [PATCH 00/13] M28EVK/i.MX28 improvements Stefano Babic
  -- strict thread matches above, loose matches on Subject: below --
2012-05-01 21:03 Marek Vasut
2012-05-01 21:03 ` [U-Boot] [PATCH 11/13] i.MX28: Add battery boot components to SPL Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50110AC7.5050702@bluegiga.com \
    --to=lauri.hintsala@bluegiga.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox