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 <jpmurphy@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/86826 Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
This commit is contained in:
parent
663dbd462a
commit
2e27ceed67
1 changed files with 24 additions and 10 deletions
|
|
@ -3,17 +3,31 @@
|
|||
#include <delay.h>
|
||||
#include <gpio.h>
|
||||
#include <baseboard/variants.h>
|
||||
#include <ec/google/chromeec/ec.h>
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue