diff options
author | Patryk Duda <pdk@semihalf.com> | 2021-07-09 13:37:37 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-16 09:28:51 +0000 |
commit | 53d4e09122e556dd641733189d362ef163cd7610 (patch) | |
tree | 0fa40ffff3376247d57d3ee65546dd9b54153727 | |
parent | 7b139d1d2f8d78fdfe05a108b97b13ef8b73852c (diff) | |
download | chrome-ec-53d4e09122e556dd641733189d362ef163cd7610.tar.gz |
nocturne_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=dartmonkey`
Signed-off-by: Patryk Duda <pdk@semihalf.com>
Change-Id: Ia62340585da915e7d9f368107d57d3fb74cb831e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3017988
Reviewed-by: Craig Hesling <hesling@chromium.org>
-rw-r--r-- | board/nocturne_fp/board_rw.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/board/nocturne_fp/board_rw.c b/board/nocturne_fp/board_rw.c index 9ace6c437e..657f155a4a 100644 --- a/board/nocturne_fp/board_rw.c +++ b/board/nocturne_fp/board_rw.c @@ -88,6 +88,15 @@ void board_init_rw(void) { enum fp_sensor_spi_select spi_select = get_fp_sensor_spi_select(); + /* + * 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); + ccprints("FP_SPI_SEL: %s", fp_sensor_spi_select_to_str(spi_select)); spi_configure(spi_select); |