From 2e27ceed6778fac0ecdb67af589ee0c57b7716cb Mon Sep 17 00:00:00 2001 From: Jon Murphy Date: Tue, 11 Mar 2025 13:23:20 -0600 Subject: [PATCH] mb/google/volteer/var/elemi: Check FP presence against SKU ID Add/update FP enable/disable based on SKU ID. This is meant to resolve a UMA issue with 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. Specify the SKUs which should not have a FP sensor and default to true to maintain the legacy behavior for undefined devices and limit risk. Variants which do not have FP SKUs will be unaffected. BUG=b:354769653 TEST=Flash on device, test FP. Disable test SKU, flash on device, 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: I9811721d0b345614e10ac27946ad45b6ec6f7494 Signed-off-by: Jon Murphy Reviewed-on: https://review.coreboot.org/c/coreboot/+/86826 Reviewed-by: Matt DeVillier Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel --- .../google/volteer/variants/elemi/ramstage.c | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/src/mainboard/google/volteer/variants/elemi/ramstage.c b/src/mainboard/google/volteer/variants/elemi/ramstage.c index f7a174d888..16261b7d45 100644 --- a/src/mainboard/google/volteer/variants/elemi/ramstage.c +++ b/src/mainboard/google/volteer/variants/elemi/ramstage.c @@ -3,17 +3,31 @@ #include #include #include +#include void variant_ramstage_init(void) { - /* - * Assert FPMCU reset and 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. - */ - gpio_output(GPP_C23, 0); - gpio_output(GPP_A21, 1); - mdelay(1); - gpio_output(GPP_C23, 1); + uint32_t sku_id = google_chromeec_get_board_sku(); + + switch (sku_id) { + case 102: + case 104: + case 107: + case 109: + case 115: + /* + * Assert FPMCU reset and 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. + */ + gpio_output(GPP_C23, 0); + gpio_output(GPP_A21, 1); + mdelay(1); + gpio_output(GPP_C23, 1); + break; + default: + /* SKU does not have FP Sensor, do not enable FPMCU */ + break; + } }