diff options
author | Mike Lee <mike5@huaqin.corp-partner.google.com> | 2021-02-27 14:53:00 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-09 21:13:55 +0000 |
commit | 76fcd2f08711cd6603c9a2643d88e42a45edbfff (patch) | |
tree | 9c7a62555d17763eafea6a19aeb762b69c5f4ba9 /board/storo | |
parent | 7514fb8c40073014bf99e0be6cc8ab4cff51b774 (diff) | |
download | chrome-ec-76fcd2f08711cd6603c9a2643d88e42a45edbfff.tar.gz |
Storo: 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:181847975
BRANCH=dedede
TEST=Build and flash storo, verify it boots.
Signed-off-by: Mike Lee <mike5@huaqin.corp-partner.google.com>
Change-Id: I6301dfb551518a5d421af5f84eb1599c1fe8f188
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2725475
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/storo')
-rw-r--r-- | board/storo/board.c | 15 | ||||
-rw-r--r-- | board/storo/gpio.inc | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/board/storo/board.c b/board/storo/board.c index 4b16b077f1..3a3e7ab53d 100644 --- a/board/storo/board.c +++ b/board/storo/board.c @@ -288,6 +288,21 @@ __override void board_ocpc_init(struct ocpc_data *ocpc) ocpc->chg_flags[CHARGER_SECONDARY] |= OCPC_NO_ISYS_MEAS_CAP; } +__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/storo/gpio.inc b/board/storo/gpio.inc index 00a3e94289..fa805e03b4 100644 --- a/board/storo/gpio.inc +++ b/board/storo/gpio.inc @@ -89,6 +89,7 @@ GPIO(EC_AP_MKBP_INT_L, PIN(L, 5), GPIO_ODR_HIGH) /* 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(EN_PP3300_PEN, PIN(B, 5), GPIO_OUT_LOW) @@ -104,7 +105,6 @@ 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(GPIOC6_NC, PIN(C, 6), GPIO_INPUT | GPIO_PULL_DOWN) -GPIO(GPIOC7_NC, PIN(C, 7), GPIO_INPUT | GPIO_PULL_DOWN) GPIO(GPIOF0_NC, PIN(F, 0), 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) |