* [U-Boot] [PATCH] OMAP3: pandora: enable battery backup capacitor
@ 2010-04-29 14:52 Grazvydas Ignotas
2010-06-08 12:12 ` Grazvydas Ignotas
0 siblings, 1 reply; 3+ messages in thread
From: Grazvydas Ignotas @ 2010-04-29 14:52 UTC (permalink / raw)
To: u-boot
Pandora has a capacitor connected as backup battery, which allows
retaining RTC for some time while main battery is removed. Enable backup
battery charge function to charge that capacitor.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
---
board/pandora/pandora.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/board/pandora/pandora.c b/board/pandora/pandora.c
index 75e4330..355e9ea 100644
--- a/board/pandora/pandora.c
+++ b/board/pandora/pandora.c
@@ -37,6 +37,10 @@
#include <asm/mach-types.h>
#include "pandora.h"
+#define TWL4030_BB_CFG_BBCHEN (1 << 4)
+#define TWL4030_BB_CFG_BBSEL_3200MV (3 << 2)
+#define TWL4030_BB_CFG_BBISEL_500UA 2
+
/*
* Routine: board_init
* Description: Early hardware init.
@@ -78,6 +82,11 @@ int misc_init_r(void)
writel(GPIO28, &gpio5_base->setdataout);
writel(GPIO4, &gpio6_base->setdataout);
+ /* Enable battery backup capacitor (3.2V, 0.5mA charge current) */
+ twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER,
+ TWL4030_BB_CFG_BBCHEN | TWL4030_BB_CFG_BBSEL_3200MV |
+ TWL4030_BB_CFG_BBISEL_500UA, TWL4030_PM_RECEIVER_BB_CFG);
+
dieid_num_r();
return 0;
--
1.6.3.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] OMAP3: pandora: enable battery backup capacitor
2010-04-29 14:52 [U-Boot] [PATCH] OMAP3: pandora: enable battery backup capacitor Grazvydas Ignotas
@ 2010-06-08 12:12 ` Grazvydas Ignotas
2010-06-08 21:26 ` Paulraj, Sandeep
0 siblings, 1 reply; 3+ messages in thread
From: Grazvydas Ignotas @ 2010-06-08 12:12 UTC (permalink / raw)
To: u-boot
CCing Sandeep.
On Thu, Apr 29, 2010 at 5:52 PM, Grazvydas Ignotas <notasas@gmail.com> wrote:
> Pandora has a capacitor connected as backup battery, which allows
> retaining RTC for some time while main battery is removed. Enable backup
> battery charge function to charge that capacitor.
>
> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
> ---
> ?board/pandora/pandora.c | ? ?9 +++++++++
> ?1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/board/pandora/pandora.c b/board/pandora/pandora.c
> index 75e4330..355e9ea 100644
> --- a/board/pandora/pandora.c
> +++ b/board/pandora/pandora.c
> @@ -37,6 +37,10 @@
> ?#include <asm/mach-types.h>
> ?#include "pandora.h"
>
> +#define TWL4030_BB_CFG_BBCHEN ? ? ? ? ?(1 << 4)
> +#define TWL4030_BB_CFG_BBSEL_3200MV ? ?(3 << 2)
> +#define TWL4030_BB_CFG_BBISEL_500UA ? ?2
> +
> ?/*
> ?* Routine: board_init
> ?* Description: Early hardware init.
> @@ -78,6 +82,11 @@ int misc_init_r(void)
> ? ? ? ?writel(GPIO28, &gpio5_base->setdataout);
> ? ? ? ?writel(GPIO4, &gpio6_base->setdataout);
>
> + ? ? ? /* Enable battery backup capacitor (3.2V, 0.5mA charge current) */
> + ? ? ? twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER,
> + ? ? ? ? ? ? ? TWL4030_BB_CFG_BBCHEN | TWL4030_BB_CFG_BBSEL_3200MV |
> + ? ? ? ? ? ? ? TWL4030_BB_CFG_BBISEL_500UA, TWL4030_PM_RECEIVER_BB_CFG);
> +
> ? ? ? ?dieid_num_r();
>
> ? ? ? ?return 0;
> --
> 1.6.3.3
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] OMAP3: pandora: enable battery backup capacitor
2010-06-08 12:12 ` Grazvydas Ignotas
@ 2010-06-08 21:26 ` Paulraj, Sandeep
0 siblings, 0 replies; 3+ messages in thread
From: Paulraj, Sandeep @ 2010-06-08 21:26 UTC (permalink / raw)
To: u-boot
>
> CCing Sandeep.
>
> On Thu, Apr 29, 2010 at 5:52 PM, Grazvydas Ignotas <notasas@gmail.com>
> wrote:
> > Pandora has a capacitor connected as backup battery, which allows
> > retaining RTC for some time while main battery is removed. Enable backup
> > battery charge function to charge that capacitor.
> >
> > Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
> > ---
> > ?board/pandora/pandora.c | ? ?9 +++++++++
> > ?1 files changed, 9 insertions(+), 0 deletions(-)
> >
I have pushed this to u-boot-ti/master.
This will be part of my next pull request to Tom
Thanks,
Sandeep
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-08 21:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-29 14:52 [U-Boot] [PATCH] OMAP3: pandora: enable battery backup capacitor Grazvydas Ignotas
2010-06-08 12:12 ` Grazvydas Ignotas
2010-06-08 21:26 ` Paulraj, Sandeep
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.