diff options
author | Mike Lee <mike5@huaqin.corp-partner.google.com> | 2021-03-09 23:13:16 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-09 20:53:37 +0000 |
commit | 19b8edade10b5d0423a1439b1a610d7e89161b7a (patch) | |
tree | 8ba506cda8f295a3e183b8a979017ee83c850b2c /board/blipper/board.c | |
parent | 2b3b4380a1f4c6caff99fba9ac8e64c406aae586 (diff) | |
download | chrome-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/board.c')
-rw-r--r-- | board/blipper/board.c | 15 |
1 files changed, 15 insertions, 0 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) { /* |