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>
This commit is contained in:
parent
391342ee6d
commit
1efb6e84b7
2 changed files with 33 additions and 9 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue