diff options
author | Patryk Duda <pdk@semihalf.com> | 2021-09-16 13:34:35 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-16 23:18:58 +0000 |
commit | d954f9ac3bff4f2f9e351bbbcbe5e4779dae47b1 (patch) | |
tree | 065bb4aa38e8c1666292d4626124453c68c41522 | |
parent | a880e2c58410a700a8b9d55562ca4dcc534e456a (diff) | |
download | chrome-ec-d954f9ac3bff4f2f9e351bbbcbe5e4779dae47b1.tar.gz |
hatch_fp/board_rw: Reset FP_RST_ODL line to default on RW init
This change was introduced in crrev.com/c/3017987 but it was
accidentally removed in crrev.com/c/3078823. This patch reintroduces
the change.
Original change's description:
> hatch_fp/board_rw: Explicitly reset FP_RST_ODL to default on RW init
>
> FP_RST_ODL pin is only defined in gpio_rw.inc, so this pin won't be
> initialized to 1 by RO. Also, RW won't set this pin because sysjump to
> RW is a warm reset actually and we are not setting GPIO pins to their
> defaults after the warm reset to avoid undesired effects (see
> gpio_pre_init() in chip/stm32/gpio.c).
>
> As a result fpsensor_hw hardware unit test was not working, because
> FPMCU was keeping sensor in reset.
>
> Build with FP private driver is working because the driver performs
> sensor reset during initialization.
>
> BUG=b:170432597
> BRANCH=none
> TEST=`make BOARD=bloonchipper`
>
> Signed-off-by: Patryk Duda <pdk@semihalf.com>
> Change-Id: Ib88d1965dc1410c08c3e3a51ad4f90d27f8ea1b0
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3017987
> Reviewed-by: Craig Hesling <hesling@chromium.org>
BUG=b:178746753 b:170432597
BRANCH=none
TEST=Run 'run_device_tests.py -b bloonchipper' and check if fpsensor_hw
passes.
Signed-off-by: Patryk Duda <pdk@semihalf.com>
Change-Id: Ia852807f9229e7e6c3b12df01fd26962777e45d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3162205
Tested-by: Patryk Duda <patrykd@google.com>
Auto-Submit: Patryk Duda <patrykd@google.com>
Reviewed-by: Craig Hesling <hesling@chromium.org>
Commit-Queue: Craig Hesling <hesling@chromium.org>
-rw-r--r-- | board/hatch_fp/board_rw.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/board/hatch_fp/board_rw.c b/board/hatch_fp/board_rw.c index 35709860e3..4c83c8723c 100644 --- a/board/hatch_fp/board_rw.c +++ b/board/hatch_fp/board_rw.c @@ -46,6 +46,15 @@ static void configure_fp_sensor_spi(void) void board_init_rw(void) { + /* + * FP_RST_ODL pin is defined in gpio_rw.inc (with GPIO_OUT_HIGH + * flag) but not in gpio.inc, so RO leaves this pin set to 0 (reset + * default), but RW doesn't initialize this pin to 1 because sysjump + * to RW is a warm reset (see gpio_pre_init() in chip/stm32/gpio.c). + * Explicitly reset FP_RST_ODL pin to default value. + */ + gpio_reset(GPIO_FP_RST_ODL); + /* Configure and enable SPI as master for FP sensor */ configure_fp_sensor_spi(); } |