summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2018-07-10 21:01:30 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-07-18 18:15:23 -0700
commit9ba60c726b979cdddd31d1a30f48c85441dc9070 (patch)
tree42b5c9d496020344c9044a466c7322cbb86a9ac9
parent3f7decb2d9cecb6fc19ef0d105dc08d85a4835eb (diff)
downloadchrome-ec-9ba60c726b979cdddd31d1a30f48c85441dc9070.tar.gz
nocturne: Adjust IMVP8 step decay quantization.
The IMVP8 vendor suggested to change the step decay quantization from 3 to 1. Doing this seems to help with the hangs that were seen. This commit simply has the EC write to the IMVP8 to set this register ~250ms after sequencing to S0. BUG=b:111224125 BRANCH=master TEST=Flash nocturne, boot to S0, read back register 0xFA from IMVP8, verify that it reads back as 0x0ac5. Change-Id: Ic7444c763ed4da3a4b80b3a9e79b60c5fa984345 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/1132718 Reviewed-by: Nick Vaccaro <nvaccaro@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> (cherry picked from commit a3c9f1332a421343837cc5048ccbb9f66ff4ae95) Reviewed-on: https://chromium-review.googlesource.com/1141704 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org>
-rw-r--r--board/nocturne/board.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/board/nocturne/board.c b/board/nocturne/board.c
index 6d13f0dace..3011aba5b9 100644
--- a/board/nocturne/board.c
+++ b/board/nocturne/board.c
@@ -323,6 +323,21 @@ void board_chipset_startup(void)
}
DECLARE_HOOK(HOOK_CHIPSET_STARTUP, board_chipset_startup, HOOK_PRIO_DEFAULT);
+static void imvp8_tune_deferred(void)
+{
+ /* For the IMVP8, reduce the steps during decay from 3 to 1. */
+ if (i2c_write16(I2C_PORT_POWER, I2C_ADDR_MP2949, 0xFA, 0x0AC5))
+ CPRINTS("Failed to change step decay!");
+}
+DECLARE_DEFERRED(imvp8_tune_deferred);
+
+void board_chipset_resume(void)
+{
+ /* Write to the IMVP8 after 250ms. */
+ hook_call_deferred(&imvp8_tune_deferred_data, 250 * MSEC);
+}
+DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT);
+
void board_chipset_shutdown(void)
{
gpio_set_level(GPIO_EN_5V, 0);