Commit 5246d01edd8935e04cdf79a5b9a03874509a31b1
Committed by
Sandeep Paulraj
1 parent
2391174048
Exists in
master
and in
54 other branches
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: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Showing 1 changed file with 9 additions and 0 deletions Side-by-side Diff
board/pandora/pandora.c
... | ... | @@ -37,6 +37,10 @@ |
37 | 37 | #include <asm/mach-types.h> |
38 | 38 | #include "pandora.h" |
39 | 39 | |
40 | +#define TWL4030_BB_CFG_BBCHEN (1 << 4) | |
41 | +#define TWL4030_BB_CFG_BBSEL_3200MV (3 << 2) | |
42 | +#define TWL4030_BB_CFG_BBISEL_500UA 2 | |
43 | + | |
40 | 44 | /* |
41 | 45 | * Routine: board_init |
42 | 46 | * Description: Early hardware init. |
... | ... | @@ -77,6 +81,11 @@ |
77 | 81 | /* Set GPIOs */ |
78 | 82 | writel(GPIO28, &gpio5_base->setdataout); |
79 | 83 | writel(GPIO4, &gpio6_base->setdataout); |
84 | + | |
85 | + /* Enable battery backup capacitor (3.2V, 0.5mA charge current) */ | |
86 | + twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, | |
87 | + TWL4030_BB_CFG_BBCHEN | TWL4030_BB_CFG_BBSEL_3200MV | | |
88 | + TWL4030_BB_CFG_BBISEL_500UA, TWL4030_PM_RECEIVER_BB_CFG); | |
80 | 89 | |
81 | 90 | dieid_num_r(); |
82 | 91 |