summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@google.com>2017-08-16 09:30:57 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2017-08-16 16:49:02 +0000
commit81013dc32203909c721331e6fc901033f52d367d (patch)
tree442104a0f8f9a20a8009eedaad9cef684be4c77f /board
parent54f9b14d7f71373cb653466146c4d715123fed6c (diff)
downloadchrome-ec-81013dc32203909c721331e6fc901033f52d367d.tar.gz
eve: Make a few pmic init commands run on RW image
Currently all of board_pmic_init() is skipped if you jump to the image, which means it never runs on RW, or on RO if it is updated by flashing, and requires a power+refresh boot to take effect. Move a few of these that are adjusting important settings to also run on system jump so they get applied when rolling out a new FW. BUG=none TEST=manual: flash new ec.bin and check that pmic register is set to disable VCCIO from ALL_SYS_PWRGD. Change-Id: I07a96dd052d142e5026778a7e785e1cb4c4849a1 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://chromium-review.googlesource.com/617267 Reviewed-by: Scott Collyer <scollyer@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/eve/board.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/board/eve/board.c b/board/eve/board.c
index b9577f8e4a..ac99a79efd 100644
--- a/board/eve/board.c
+++ b/board/eve/board.c
@@ -356,6 +356,16 @@ const struct button_config buttons[CONFIG_BUTTON_COUNT] = {
static void board_pmic_init(void)
{
+ /* Clear power source events */
+ i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, 0x04, 0xff);
+
+ /* Disable power button shutdown timer */
+ i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, 0x14, 0x00);
+
+ /* Disable VCCIO in ALL_SYS_PWRGD for early boards */
+ if (board_get_version() <= BOARD_VERSION_DVTB)
+ i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, 0x18, 0x80);
+
if (system_jumped_to_this_image())
return;
@@ -382,16 +392,6 @@ static void board_pmic_init(void)
/* VRMODECTRL - disable low-power mode for all rails */
i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, 0x3b, 0x1f);
-
- /* Clear power source events */
- i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, 0x04, 0xff);
-
- /* Disable power button shutdown timer */
- i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, 0x14, 0x00);
-
- /* Disable VCCIO in ALL_SYS_PWRGD for early boards */
- if (board_get_version() <= BOARD_VERSION_DVTB)
- i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, 0x18, 0x80);
}
DECLARE_HOOK(HOOK_INIT, board_pmic_init, HOOK_PRIO_DEFAULT);