aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorKeerthy <j-keerthy@ti.com>2016-09-27 10:15:48 +0530
committerLokesh Vutla <lokeshvutla@ti.com>2016-09-28 14:59:22 +0530
commit0ff8a585ca9ab9a7394fd7b5c137a366be5458c2 (patch)
tree3f24dedf6567f1088efae7ee5cbad14fd8500ab6 /board
parent48030baf3d94d4601b9a8ce57c3d2d2d4e7b01c4 (diff)
downloadjacinto6evm-0ff8a585ca9ab9a7394fd7b5c137a366be5458c2.tar.gz
am57xx: Set tps659038 PMIC GPIO7 pad mux value to POWERHOLD
The GPIO7 pad mux should be programmed to POWERHOLD value as per board design. In cases where the PMIC is shut off the mux is set to GPIO7 mode. So during initialization to be on the safer side set the mode to POWERHOLD. Signed-off-by: Keerthy <j-keerthy@ti.com>
Diffstat (limited to 'board')
-rw-r--r--board/ti/am57xx/board.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index ba2236d43c..f6b20b3357 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -69,6 +69,9 @@ DECLARE_GLOBAL_DATA_PTR;
#define SYSINFO_BOARD_NAME_MAX_LEN 45
+#define TPS65903X_PRIMARY_SECONDARY_PAD2 0xFB
+#define TPS65903X_PAD2_POWERHOLD_MASK 0x20
+
const struct omap_sysinfo sysinfo = {
"Board: UNKNOWN(BeagleBoard X15?) REV UNKNOWN\n"
};
@@ -651,6 +654,7 @@ int board_late_init(void)
{
setup_board_eeprom_env();
+ u8 val;
/*
* DEV_CTRL.DEV_ON = 1 please - else palmas switches off in 8 seconds
@@ -658,6 +662,18 @@ int board_late_init(void)
*/
palmas_i2c_write_u8(TPS65903X_CHIP_P1, 0xA0, 0x1);
+ /*
+ * Set the GPIO7 Pad to POWERHOLD. This has higher priority
+ * over DEV_CTRL.DEV_ON bit. This can be reset in case of
+ * PMIC Power off. So to be on the safer side set it back
+ * to POWERHOLD mode irrespective of the current state.
+ */
+ palmas_i2c_read_u8(TPS65903X_CHIP_P1, TPS65903X_PRIMARY_SECONDARY_PAD2,
+ &val);
+ val = val | TPS65903X_PAD2_POWERHOLD_MASK;
+ palmas_i2c_write_u8(TPS65903X_CHIP_P1, TPS65903X_PRIMARY_SECONDARY_PAD2,
+ val);
+
am57x_idk_lcd_detect();
#if !defined(CONFIG_SPL_BUILD)