From 63aced761da609365578084e77dbdd47a8c02f7e Mon Sep 17 00:00:00 2001 From: Caveh Jalali Date: Thu, 23 Aug 2018 20:59:30 -0700 Subject: bd99992: add some more register definitions this adds definitions for some additional PMIC registers we're using in our codebase. BUG=b:112732855 BRANCH=none TEST=flashed atlas with new EC build Change-Id: Ibad7b11b3770f00c925c2d8fc3b24109147aa643 Signed-off-by: Caveh Jalali Reviewed-on: https://chromium-review.googlesource.com/1187899 Commit-Ready: caveh jalali Tested-by: caveh jalali Reviewed-by: Daisuke Nojiri Reviewed-by: caveh jalali --- board/atlas/board.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'board/atlas') diff --git a/board/atlas/board.c b/board/atlas/board.c index ca76d3566a..44352ef543 100644 --- a/board/atlas/board.c +++ b/board/atlas/board.c @@ -392,28 +392,34 @@ static void board_pmic_init(void) board_report_pmic_fault("SYSJUMP"); /* Clear power source events */ - i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, 0x04, 0xff); + i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, + BD99992GW_REG_PWRSRCINT, 0xff); /* Disable power button shutdown timer */ - i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, 0x14, 0x00); + i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, + BD99992GW_REG_PBCONFIG, 0x00); if (system_jumped_to_this_image()) return; /* DISCHGCNT2 - enable 100 ohm discharge on V3.3A and V1.8A */ - i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, 0x3d, 0x05); + i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, + BD99992GW_REG_DISCHGCNT2, 0x05); /* DISCHGCNT3 - enable 100 ohm discharge on V1.00A */ - i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, 0x3e, 0x04); + i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, + BD99992GW_REG_DISCHGCNT3, 0x04); /* * Set V085ACNT / V0.85A Control Register: * Nominal output = 0.85V. */ - i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, 0x38, 0x2a); + i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, + BD99992GW_REG_V085ACNT, 0x2a); /* VRMODECTRL - disable low-power mode for all rails */ - i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, 0x3b, 0x1f); + i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, + BD99992GW_REG_VRMODECTRL, 0x1f); } DECLARE_HOOK(HOOK_INIT, board_pmic_init, HOOK_PRIO_DEFAULT); -- cgit v1.2.1