diff options
author | Jon Murphy <jpmurphy@google.com> | 2024-08-01 21:02:47 -0600 |
---|---|---|
committer | Jon Murphy <jpmurphy@google.com> | 2024-10-03 20:54:03 +0000 |
commit | 1efb6e84b7e048c0ccbd8f6ae3a2610585ca90bd (patch) | |
tree | 211d68b0c002afc123859c54c42f40c2434ccc61 /src/mainboard/google/hatch | |
parent | 391342ee6de1944fd9cbcdc79e2d1bdcdd03b281 (diff) |
mb/google/hatch/var/dratini: Add FP enable
Add FP enable/disable based on SKU ID for Dratini. This is meant
to resolve a UMA issue with Dratini devices that had the FPMCU
populated on non-fp devices. Since the FPMCU is present, and the
firmware enables the power GPIO's based on variant, not SKU, the
devices were reporting data on fingerprint errantly.
BUG=b:354769653
BUG=b:200825114
TEST=Flash to Dratini, test FP.
Disable test SKU, flash on Dratini, test FP.
To test, run `ectool --name=cros_fp version` in the shell
When enabled, the fpmcu fw version should be displayed.
When disabled, an error should be displayed because the fpmcu
is inaccessible.
Change-Id: Ifc450f51b00b9c3b62268ce94884f5749a3e18c0
Signed-off-by: Jon Murphy <jpmurphy@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83745
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Diffstat (limited to 'src/mainboard/google/hatch')
-rw-r--r-- | src/mainboard/google/hatch/variants/dratini/include/variant/sku.h | 8 | ||||
-rw-r--r-- | src/mainboard/google/hatch/variants/dratini/ramstage.c | 34 |
2 files changed, 33 insertions, 9 deletions
diff --git a/src/mainboard/google/hatch/variants/dratini/include/variant/sku.h b/src/mainboard/google/hatch/variants/dratini/include/variant/sku.h index c44e0dbdbe..89f670821e 100644 --- a/src/mainboard/google/hatch/variants/dratini/include/variant/sku.h +++ b/src/mainboard/google/hatch/variants/dratini/include/variant/sku.h @@ -4,6 +4,14 @@ #define __MAINBOARD_SKU_H__ enum { + SKU_1_DRATINI = 1, + SKU_2_DRATINI = 2, + SKU_3_DRATINI = 3, + SKU_4_DRATINI = 4, + SKU_5_DRATINI = 5, + SKU_6_DRATINI = 6, + SKU_7_DRATINI = 7, + SKU_8_DRATINI = 8, SKU_21_DRAGONAIR = 21, SKU_22_DRAGONAIR = 22, SKU_23_DRAGONAIR = 23, diff --git a/src/mainboard/google/hatch/variants/dratini/ramstage.c b/src/mainboard/google/hatch/variants/dratini/ramstage.c index 240bcaeb93..302ef83c55 100644 --- a/src/mainboard/google/hatch/variants/dratini/ramstage.c +++ b/src/mainboard/google/hatch/variants/dratini/ramstage.c @@ -3,16 +3,32 @@ #include <delay.h> #include <gpio.h> #include <baseboard/variants.h> +#include <variant/sku.h> +#include <ec/google/chromeec/ec.h> void variant_ramstage_init(void) { - /* - * Enable power to FPMCU, wait for power rail to stabilize, - * and then deassert FPMCU reset. - * Waiting for the power rail to stabilize can take a while, - * a minimum of 400us on Kohaku. - */ - gpio_output(GPP_C11, 1); - mdelay(4); - gpio_output(GPP_A12, 1); + uint32_t sku_id = google_chromeec_get_board_sku(); + + switch (sku_id) { + case SKU_2_DRATINI: + case SKU_4_DRATINI: + case SKU_6_DRATINI: + case SKU_8_DRATINI: + case SKU_21_DRAGONAIR: + case SKU_22_DRAGONAIR: + /* + * Enable power to FPMCU, wait for power rail to stabilize, + * and then deassert FPMCU reset. + * Waiting for the power rail to stabilize can take a while, + * a minimum of 400us on Kohaku. + */ + gpio_output(GPP_C11, 1); + mdelay(4); + gpio_output(GPP_A12, 1); + break; + default: + /* SKU does not have FP Sensor, do not enable FPMCU */ + break; + } } |