summaryrefslogtreecommitdiff
path: root/board/freescale
diff options
context:
space:
mode:
authorRobby Cai <R63905@freescale.com>2011-11-28 10:51:53 +0800
committerRobby Cai <R63905@freescale.com>2011-11-28 11:23:11 +0800
commit995fbbca013d1f2c1cefed99d536e61cf9f85bb1 (patch)
tree33db9f713a0c7f8f544ce97c6dff633a8415a626 /board/freescale
parentdb44a4caf2a2c24d345c8e70756578441702c964 (diff)
downloadu-boot-imx-995fbbca013d1f2c1cefed99d536e61cf9f85bb1.zip
u-boot-imx-995fbbca013d1f2c1cefed99d536e61cf9f85bb1.tar.gz
u-boot-imx-995fbbca013d1f2c1cefed99d536e61cf9f85bb1.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>
Diffstat (limited to 'board/freescale')
-rw-r--r--board/freescale/mx53_pcba/mx53_pcba.c11
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;