Skip to content
Snippets Groups Projects
Commit 5246d01e authored by Grazvydas Ignotas's avatar Grazvydas Ignotas Committed by Sandeep Paulraj
Browse files

OMAP3: pandora: enable battery backup capacitor


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: default avatarGrazvydas Ignotas <notasas@gmail.com>
Signed-off-by: default avatarSandeep Paulraj <s-paulraj@ti.com>
parent 23911740
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,10 @@ ...@@ -37,6 +37,10 @@
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include "pandora.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 * Routine: board_init
* Description: Early hardware init. * Description: Early hardware init.
...@@ -78,6 +82,11 @@ int misc_init_r(void) ...@@ -78,6 +82,11 @@ int misc_init_r(void)
writel(GPIO28, &gpio5_base->setdataout); writel(GPIO28, &gpio5_base->setdataout);
writel(GPIO4, &gpio6_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(); dieid_num_r();
return 0; return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment