diff options
author | Robby Cai <R63905@freescale.com> | 2011-11-28 10:51:53 +0800 |
---|---|---|
committer | Lily Zhang <r58066@freescale.com> | 2011-12-02 16:29:25 +0800 |
commit | 0b390bada10c170e789bcb01d2067df38a7c34d2 (patch) | |
tree | 541ebbb5939eebdc86c645dc411bc2e1d4ff5c12 | |
parent | c32b984e6ccc6804d725e8384354c61645709596 (diff) | |
download | u-boot-imx-0b390bada10c170e789bcb01d2067df38a7c34d2.zip u-boot-imx-0b390bada10c170e789bcb01d2067df38a7c34d2.tar.gz u-boot-imx-0b390bada10c170e789bcb01d2067df38a7c34d2.tar.bz2 |
ENGR00163239-2 mc34708: enable extra charging circuit
current schema is to enable this extra charging circuit, and
then enable or disable it by checking VBatt is less or more
than 3.4v. If VBatt is less than 3.4v, enable it; otherwise
disable it.
Signed-off-by: Robby Cai <R63905@freescale.com>
(cherry picked from commit 995fbbca013d1f2c1cefed99d536e61cf9f85bb1)
-rw-r--r-- | board/freescale/mx53_pcba/mx53_pcba.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/board/freescale/mx53_pcba/mx53_pcba.c b/board/freescale/mx53_pcba/mx53_pcba.c index df3f2fc..2261321 100644 --- a/board/freescale/mx53_pcba/mx53_pcba.c +++ b/board/freescale/mx53_pcba/mx53_pcba.c @@ -503,6 +503,17 @@ int setup_pmic_voltages_spi(void) spi_pmic_free(slave); + /* extra charging circuit enabled */ + /* set GPIO2_27 to high */ + mxc_request_iomux(MX53_PIN_EIM_LBA, IOMUX_CONFIG_ALT1); + + val = readl(GPIO2_BASE_ADDR + 0x4); + val |= 0x8000000; + writel(val, GPIO2_BASE_ADDR + 0x4); + val = readl(GPIO2_BASE_ADDR + 0x0); + val |= 0x8000000; + writel(val, GPIO2_BASE_ADDR + 0x0); + } else { printf("spi_pmic_probe failed!\n"); return -1; |