summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJon Murphy <jpmurphy@google.com>2023-10-23 20:34:37 -0600
committerFelix Held <felix-coreboot@felixheld.de>2023-10-26 12:06:03 +0000
commit10201aa99de8d78c6cea42a7222006165427d58a (patch)
tree79f7159445838ce3f50e30607fe5812119a6a0ea /src
parent632ca01a04b63e9d6dba6083d60ef5d05ab6640f (diff)
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 <jpmurphy@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78622 Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <ericllai@google.com> Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/zork/variants/baseboard/helpers.c2
-rw-r--r--src/mainboard/google/zork/variants/morphius/variant.c30
2 files changed, 31 insertions, 1 deletions
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 <baseboard/variants.h>
+#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;
+ }
+}