From 10201aa99de8d78c6cea42a7222006165427d58a Mon Sep 17 00:00:00 2001 From: Jon Murphy Date: Mon, 23 Oct 2023 20:34:37 -0600 Subject: [PATCH] mb/google/zork: Add FP enable for Morphius Add FP enable/disable based on SKU ID for Morphius. This is meant to resolve a UMA issue with Morphius 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:258040377 TEST=Flash to Morphius, test FP. Disable test SKU, flash on Morphius, test FP. Change-Id: If5794a9a1b7eb3daaa4cdfd1354dfb0c688624fd Signed-off-by: Jon Murphy Reviewed-on: https://review.coreboot.org/c/coreboot/+/78622 Reviewed-by: Karthik Ramasubramanian Tested-by: build bot (Jenkins) Reviewed-by: Eric Lai Reviewed-by: Matt DeVillier --- .../google/zork/variants/baseboard/helpers.c | 2 +- .../google/zork/variants/morphius/variant.c | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/mainboard/google/zork/variants/baseboard/helpers.c b/src/mainboard/google/zork/variants/baseboard/helpers.c index 7057a48382..ed981776fc 100644 --- a/src/mainboard/google/zork/variants/baseboard/helpers.c +++ b/src/mainboard/google/zork/variants/baseboard/helpers.c @@ -183,7 +183,7 @@ int variant_get_daughterboard_id(void) return extract_field(FW_CONFIG_MASK_DB_INDEX, FW_CONFIG_DB_INDEX_SHIFT); } -bool variant_has_fingerprint(void) +__weak bool variant_has_fingerprint(void) { if (CONFIG(VARIANT_HAS_FPMCU)) return true; diff --git a/src/mainboard/google/zork/variants/morphius/variant.c b/src/mainboard/google/zork/variants/morphius/variant.c index 1810a666bf..864d73b9c5 100644 --- a/src/mainboard/google/zork/variants/morphius/variant.c +++ b/src/mainboard/google/zork/variants/morphius/variant.c @@ -2,6 +2,17 @@ #include +#define MORPHIUS_SKU_1 0x5A010010 +#define MORPHIUS_SKU_2 0x5A010011 +#define MORPHIUS_SKU_3 0x5A010012 +#define MORPHIUS_SKU_4 0x5A010014 +#define MORPHIUS_SKU_5 0x5A010029 +#define MORPHIUS_SKU_11 0x5A010025 +#define MORPHIUS_SKU_12 0x5A010026 +#define MORPHIUS_SKU_13 0x5A010013 +#define MORPHIUS_SKU_14 0x5A010028 +#define MORPHIUS_SKU_15 0x5A010016 + void variant_devtree_update(void) { /* @@ -10,3 +21,22 @@ void variant_devtree_update(void) if (!(variant_has_emmc() || boot_is_factory_unprovisioned())) DEV_PTR(emmc)->enabled = 0; } + +bool variant_has_fingerprint(void) +{ + switch (sku_id()) { + case MORPHIUS_SKU_1: + case MORPHIUS_SKU_2: + case MORPHIUS_SKU_3: + case MORPHIUS_SKU_4: + case MORPHIUS_SKU_5: + case MORPHIUS_SKU_11: + case MORPHIUS_SKU_12: + case MORPHIUS_SKU_13: + case MORPHIUS_SKU_14: + case MORPHIUS_SKU_15: + return true; + default: + return false; + } +}