diff options
author | Martin Roth <martinroth@chromium.org> | 2020-10-30 16:41:32 -0600 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-11-16 11:03:25 +0000 |
commit | 726504a61a83b12a72fca40c88c7fee1c40b54ad (patch) | |
tree | 02bb42291254e307eb1f86183e988f3f486585d2 /src/mainboard/google/zork/variants/baseboard/include | |
parent | fc2047b1f74f42fc2e38fbafdf09929ca39bfa62 (diff) |
mb/google/zork: Init fingerprint GPIOs for boot vs resume
Add a function that initializes GPIOs based on the sleep type that
the system is coming back from. This allows initialization of the
fingerprint GPIOs which need to be handled differently between wake
from S3 and boot from S5.
On initial boot, the state of the FP sensor could be either
enabled or disabled. Because of this, on boot, we power off
the sensor for >200ms, to reset its state, then power it back on.
In suspend/resume, the fingerprint sensor should remain powered
the entire time.
If fingerprint is disabled on the trembyle-based board, set the pins
to no-connect. Dalboz doesn't have fingerprint and the GPIOS are
configured differently due to the FT5 chip having fewer GPIOS than
FP5, so nothing needs to be initialized there.
There were also a couple of trivial comment clean ups regarding the
FPMCU GPIOS.
BUG=b:171837716
TEST=Boot & Check GPIO states.
BRANCH=Zork
Signed-off-by: Martin Roth <martinroth@chromium.org>
Change-Id: I16a2e621145782e0a908bb3e49478586c09a0e0a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47308
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/mainboard/google/zork/variants/baseboard/include')
-rw-r--r-- | src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h index 338b918623..4ec6addfe7 100644 --- a/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h @@ -24,12 +24,17 @@ const struct soc_amd_gpio *variant_base_gpio_table(size_t *size); */ const struct soc_amd_gpio *variant_override_gpio_table(size_t *size); +/* This function provides GPIO init in bootblock. */ +const struct soc_amd_gpio *variant_bootblock_gpio_table(size_t *size, int slp_typ); + /* * This function provides GPIO table for the pads that need to be configured when entering * sleep. */ const struct soc_amd_gpio *variant_sleep_gpio_table(size_t *size, int slp_typ); +/* Program any required GPIOs at the finalize phase */ +void finalize_gpios(int slp_typ); /* Modify devictree settings during ramstage. */ void variant_devtree_update(void); /* Update audio configuration in devicetree during ramstage. */ @@ -69,9 +74,13 @@ bool variant_uses_v3_schematics(void); bool variant_uses_v3_6_schematics(void); /* Return true if variant uses CODEC_GPI pin for headphone jack interrupt. */ bool variant_uses_codec_gpi(void); -/* Return true if variant has active low power enable fow WiFi. */ +/* Return true if variant has active low power enable for WiFi. */ bool variant_has_active_low_wifi_power(void); /* Return value of daughterboard ID */ int variant_get_daughterboard_id(void); +/* Return true if the board has a fingerprint sensor. */ +bool variant_has_fingerprint(void); +/* Return true if the board needs an extra fpmcu delay. */ +bool fpmcu_needs_delay(void); #endif /* __BASEBOARD_VARIANTS_H__ */ |