summaryrefslogtreecommitdiff
path: root/board/blipper
diff options
context:
space:
mode:
authorMike Lee <mike5@huaqin.corp-partner.google.com>2021-03-09 23:13:16 +0800
committerCommit Bot <commit-bot@chromium.org>2021-03-09 20:53:37 +0000
commit19b8edade10b5d0423a1439b1a610d7e89161b7a (patch)
tree8ba506cda8f295a3e183b8a979017ee83c850b2c /board/blipper
parent2b3b4380a1f4c6caff99fba9ac8e64c406aae586 (diff)
downloadchrome-ec-19b8edade10b5d0423a1439b1a610d7e89161b7a.tar.gz
Blipper: Add GPIO_EC_ENTERING_RW2
This commit adds a new GPIO, GPIO_EC_ENTERING_RW2 which does the same thing as GPIO_EC_ENTERING_RW. However, it's on a pin that's more well behaved around init time. This commit also overrides the board_pulse_ec_entering_rw() function such that both lines can be pulsed. BUG=b:182063215 BRANCH=dedede TEST=Build and flash blipper, verify it boots. Signed-off-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Change-Id: If15afb6058c5019f05c13be23fa624226330168b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2745183 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/blipper')
-rw-r--r--board/blipper/board.c15
-rw-r--r--board/blipper/gpio.inc2
2 files changed, 16 insertions, 1 deletions
diff --git a/board/blipper/board.c b/board/blipper/board.c
index 78ffaa8f5b..5cb2390474 100644
--- a/board/blipper/board.c
+++ b/board/blipper/board.c
@@ -198,6 +198,21 @@ void board_init(void)
}
DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
+__override void board_pulse_entering_rw(void)
+{
+ /*
+ * On the ITE variants, the EC_ENTERING_RW signal was connected to a pin
+ * which is active high by default. This causes Cr50 to think that the
+ * EC has jumped to its RW image even though this may not be the case.
+ * The pin is changed to GPIO_EC_ENTERING_RW2.
+ */
+ gpio_set_level(GPIO_EC_ENTERING_RW, 1);
+ gpio_set_level(GPIO_EC_ENTERING_RW2, 1);
+ usleep(MSEC);
+ gpio_set_level(GPIO_EC_ENTERING_RW, 0);
+ gpio_set_level(GPIO_EC_ENTERING_RW2, 0);
+}
+
void board_reset_pd_mcu(void)
{
/*
diff --git a/board/blipper/gpio.inc b/board/blipper/gpio.inc
index 07cb1e3fe7..330e2a5865 100644
--- a/board/blipper/gpio.inc
+++ b/board/blipper/gpio.inc
@@ -93,6 +93,7 @@ GPIO(EC_SUB_IO_1_2, PIN(F, 0), GPIO_INPUT)
/* Misc */
GPIO(EN_BL_OD, PIN(K, 4), GPIO_ODR_LOW)
GPIO(EC_ENTERING_RW, PIN(G, 0), GPIO_OUT_LOW)
+GPIO(EC_ENTERING_RW2, PIN(C, 7), GPIO_OUT_LOW)
GPIO(CCD_MODE_ODL, PIN(H, 5), GPIO_INPUT)
GPIO(EC_BATTERY_PRES_ODL, PIN(I, 4), GPIO_INPUT)
GPIO(ECH1_PACKET_MODE, PIN(H, 1), GPIO_OUT_LOW)
@@ -105,7 +106,6 @@ GPIO(GPIOB5_NC, PIN(B, 5), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOC0_NC, PIN(C, 0), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOC3_NC, PIN(C, 3), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOC4_NC, PIN(C, 4), GPIO_INPUT | GPIO_PULL_DOWN)
-GPIO(GPIOC7_NC, PIN(C, 7), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOF1_NC, PIN(F, 1), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOF4_NC, PIN(F, 4), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOF5_NC, PIN(F, 5), GPIO_INPUT | GPIO_PULL_DOWN)