diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2018-06-11 09:05:08 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-06-18 17:19:18 -0700 |
commit | 643e329c7bb6868f85fa12ab899c3997241ed77b (patch) | |
tree | 0109db366f93aa69e1653dea2e8265514f2cbd19 /board/nami/board.c | |
parent | b3110cc9c35e73af83b66aee70cc773a496379f5 (diff) | |
download | chrome-ec-643e329c7bb6868f85fa12ab899c3997241ed77b.tar.gz |
Nami: Reduce buck-boost mode switching frequency of isl9238
This patch reduces buck-boost mode switching frequency of isl9238
to half. This should reduce the heat generated from the charger.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b:80448805
BRANCH=none
TEST=make BOARD=nami
Change-Id: I38a12d60f562d828a7d186e43791a8b6aedc2500
Reviewed-on: https://chromium-review.googlesource.com/1095429
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/nami/board.c')
-rw-r--r-- | board/nami/board.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/board/nami/board.c b/board/nami/board.c index 216c30d292..a7460aa372 100644 --- a/board/nami/board.c +++ b/board/nami/board.c @@ -33,6 +33,7 @@ #include "hooks.h" #include "host_command.h" #include "i2c.h" +#include "isl923x.h" #include "keyboard_backlight.h" #include "keyboard_scan.h" #include "lid_switch.h" @@ -744,6 +745,8 @@ static void setup_motion_sensors(void) static void board_init(void) { + int reg; + /* * This enables pull-down on F_DIO1 (SPI MISO), and F_DIO0 (SPI MOSI), * whenever the EC is not doing SPI flash transactions. This avoids @@ -755,8 +758,14 @@ static void board_init(void) /* Provide AC status to the PCH */ gpio_set_level(GPIO_PCH_ACPRESENT, extpower_is_present()); - /* Enable sensors power supply */ - /* dnojiri: how do we enable it? */ + /* Reduce Buck-boost mode switching frequency to reduce heat */ + if (i2c_read16(I2C_PORT_CHARGER, I2C_ADDR_CHARGER, + ISL9238_REG_CONTROL3, ®) == EC_SUCCESS) { + reg |= ISL9238_C3_BB_SWITCHING_PERIOD; + if (i2c_write16(I2C_PORT_CHARGER, I2C_ADDR_CHARGER, + ISL9238_REG_CONTROL3, reg)) + CPRINTF("Failed to set isl9238\n"); + } /* Enable VBUS interrupt */ gpio_enable_interrupt(GPIO_USB_C0_VBUS_WAKE_L); |