summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Broch <tbroch@chromium.org>2018-02-20 11:50:26 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-03-08 00:17:09 +0000
commitf94850c8e244cb6eafb92c2b73347e4a014e06ab (patch)
tree334d61182e89bfabfd3c56a503ead3d814aa5fe0
parent1d4547264f28daa2550c44cf85203a364b204b54 (diff)
downloadchrome-ec-f94850c8e244cb6eafb92c2b73347e4a014e06ab.tar.gz
chell: CTLV085A/PP850_PRIM_CORE change VR mode based on power state.
Change this VR power mode to: - PWM by default & S0 for stability. - PFM in suspend for power savings. Signed-off-by: Todd Broch <tbroch@chromium.org> BRANCH=glados BUG=b:72921038 TEST=manual, Boot problematic device with AC plugged and no longer see reboot at login screen. Change-Id: I25addfd473675d6d0de441286c4c4bdffcc2118c Reviewed-on: https://chromium-review.googlesource.com/943403 Reviewed-by: Yomyung Leem <yungleem@chromium.org> Reviewed-by: Duncan Laurie <dlaurie@google.com> Commit-Queue: Todd Broch <tbroch@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org>
-rw-r--r--board/chell/board.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/board/chell/board.c b/board/chell/board.c
index cb732e887a..b4bb9dcf5d 100644
--- a/board/chell/board.c
+++ b/board/chell/board.c
@@ -265,13 +265,34 @@ static void board_pmic_init(void)
/*
* Set V085ACNT / V0.85A Control Register:
- * Lower power mode = 0.7V.
- * Nominal output = 1.0V.
+ * Lower power mode = 0.7V == d[7:6] == 01b.
+ * Nominal output = 1.0V == d[5:4] == 11b.
+ * Force LP mode exit = rise SLP_S0# == d[3:2] == 10b (default).
+ * mode control = PWM == d[1:0] == 11b.
*/
- i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, 0x38, 0x7a);
+ i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, 0x38, 0x7b);
}
DECLARE_HOOK(HOOK_INIT, board_pmic_init, HOOK_PRIO_DEFAULT);
+static void chell_pmic_resume(void)
+{
+ /*
+ * Set V085ACNT mode control to PWM for stability.
+ */
+ i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, 0x38, 0x7b);
+}
+DECLARE_HOOK(HOOK_CHIPSET_RESUME, chell_pmic_resume, HOOK_PRIO_DEFAULT);
+
+static void chell_pmic_suspend(void)
+{
+ /*
+ * Set V085ACNT mode control to PFM for power saving.
+ * mode control = PFM == d[1:0] == 01b.
+ */
+ i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, 0x38, 0x79);
+}
+DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, chell_pmic_suspend, HOOK_PRIO_DEFAULT);
+
/* Initialize board. */
static void board_init(void)
{