diff options
author | Nicolas Boichat <drinkcat@chromium.org> | 2017-10-05 12:46:47 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-10-05 05:17:02 -0700 |
commit | 7dc3066837aaaa565af5df2e1433d7564d43220b (patch) | |
tree | d1263cb754c749222389194fcdd05eae45718a4b | |
parent | a5cc6b48191d7e43b85bc10a3f78ba4cd62b9e31 (diff) | |
download | chrome-ec-7dc3066837aaaa565af5df2e1433d7564d43220b.tar.gz |
poppy: Enable pull-down on SPI flash MISO pin to avoid leakage
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
floating SPI buffer input (MISO), which causes power leakage.
BRANCH=none
BUG=b:64797021
TEST=Flash soraka, check output of rw .b 0x400C3029 is 0x80
Check that U58 (SN74LVC244ARWPR) leakage drops from 1.2 mA to 0.
TEST=1. flashrom from host to EC spi flash using servo
2. flashrom from host to EC spi flash using suzyq
3. flashrom from device to EC spi flash
4. EC SW sync
Change-Id: I5ac22142f6a1a5b1c31d6ae272ed7516a112f29e
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/701717
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
-rw-r--r-- | board/poppy/board.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/board/poppy/board.c b/board/poppy/board.c index de1cb0ed24..143b55176c 100644 --- a/board/poppy/board.c +++ b/board/poppy/board.c @@ -651,6 +651,14 @@ DECLARE_HOOK(HOOK_INIT, board_pmic_init, HOOK_PRIO_DEFAULT); /* Initialize board. */ static void board_init(void) { + /* + * 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 + * floating SPI buffer input (MISO), which causes power leakage (see + * b/64797021). + */ + NPCX_PUPD_EN1 |= (1 << NPCX_DEVPU1_F_SPI_PUD_EN); + /* Provide AC status to the PCH */ gpio_set_level(GPIO_PCH_ACOK, extpower_is_present()); |