diff options
author | Michael5 Chen1 <michael5_chen1@pegatron.corp-partner.google.com> | 2021-03-26 10:36:41 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-26 05:07:45 +0000 |
commit | 02a726c6e3f80bde7b42093ee4f86e8290954335 (patch) | |
tree | ba188e8d6485a96541848c5f4ada72160eff93e6 /board/galtic | |
parent | 91085d36a00607594a024aa4d242a2e05cb0232a (diff) | |
download | chrome-ec-02a726c6e3f80bde7b42093ee4f86e8290954335.tar.gz |
galtic: Add GPIO_EC_ENTERING_RW2
This commit add 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 will
behaved around init time.
This commit also overrides the board_pulse_ec_entering_rw() function
such that both lines can be pulsed.
BUG=b:181740591
BRANCH=dedede
TEST=make board=galtic
Signed-off-by: Michael5 Chen1 <michael5_chen1@pegatron.corp-partner.google.com>
Change-Id: Ibc65bafed0374e6356311b0e4c2133ea3be7d4f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2786885
Reviewed-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/galtic')
-rw-r--r-- | board/galtic/board.c | 15 | ||||
-rw-r--r-- | board/galtic/gpio.inc | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/board/galtic/board.c b/board/galtic/board.c index 2dfc74bbd4..5e8f5f5714 100644 --- a/board/galtic/board.c +++ b/board/galtic/board.c @@ -758,3 +758,18 @@ void lid_angle_peripheral_enable(int enable) } } #endif + +__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 cause 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); +} diff --git a/board/galtic/gpio.inc b/board/galtic/gpio.inc index 04f4e471f2..5a25121b6f 100644 --- a/board/galtic/gpio.inc +++ b/board/galtic/gpio.inc @@ -91,6 +91,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(ECH1_PACKET_MODE, PIN(H, 1), GPIO_OUT_LOW) @@ -107,7 +108,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) |