summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorris Hsu <morris-hsu@quanta.corp-partner.google.com>2023-10-18 15:45:18 +0800
committerFelix Held <felix-coreboot@felixheld.de>2023-10-23 13:01:01 +0000
commit0360aea50062cbf0a7c3d42f2f6e6f7a7672ebf9 (patch)
treed30ba9c50869489b92f2a1a11f7a50d9a2a7fb8c
parenta0efce412d2145d5db68cce104c90035a1b9f196 (diff)
mb/google/brya/var/dochi: Update overridetree for FingerPrint
Update overridetree to correct FP_MCU fw_config settings. BUG=b:299284564, b:298328847, b:299570339 TEST=emerge-brya coreboot Change-Id: If76dd8fa3567ed01b11a6d2ba796e8c39807816c Signed-off-by: Morris Hsu <morris-hsu@quanta.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78454 Reviewed-by: Eric Lai <ericllai@google.com> Reviewed-by: Bob Moragues <moragues@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--src/mainboard/google/brya/variants/dochi/fw_config.c13
-rw-r--r--src/mainboard/google/brya/variants/dochi/overridetree.cb8
-rw-r--r--src/mainboard/google/brya/variants/dochi/variant.c2
3 files changed, 11 insertions, 12 deletions
diff --git a/src/mainboard/google/brya/variants/dochi/fw_config.c b/src/mainboard/google/brya/variants/dochi/fw_config.c
index d2947074ac..59013d0126 100644
--- a/src/mainboard/google/brya/variants/dochi/fw_config.c
+++ b/src/mainboard/google/brya/variants/dochi/fw_config.c
@@ -1,9 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#include <bootstate.h>
+#include <baseboard/gpio.h>
+#include <baseboard/variants.h>
#include <console/console.h>
#include <fw_config.h>
-#include <gpio.h>
static const struct pad_config fp_disable_pads[] = {
PAD_NC(GPP_D0, NONE), /* D0 : ISH_GP0 ==> PCH_FP_BOOT0 */
@@ -11,11 +11,10 @@ static const struct pad_config fp_disable_pads[] = {
PAD_NC(GPP_D2, NONE), /* D2 : ISH_GP2 ==> EN_FP_PWR */
};
-static void fw_config_handle(void *unused)
+void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
{
- if (fw_config_probe(FW_CONFIG(FPMCU_MASK, FPMCU_DISABLED))) {
- printk(BIOS_INFO, "Disabling FP pads\n");
- gpio_configure_pads(fp_disable_pads, ARRAY_SIZE(fp_disable_pads));
+ if (fw_config_probe(FW_CONFIG(FP_MCU, FP_ABSENT))) {
+ printk(BIOS_INFO, "Configure GPIOs for no FP module.\n");
+ gpio_padbased_override(padbased_table, fp_disable_pads, ARRAY_SIZE(fp_disable_pads));
}
}
-BOOT_STATE_INIT_ENTRY(BS_DEV_ENABLE, BS_ON_ENTRY, fw_config_handle, NULL);
diff --git a/src/mainboard/google/brya/variants/dochi/overridetree.cb b/src/mainboard/google/brya/variants/dochi/overridetree.cb
index baa2f0a8c5..d44409e7c3 100644
--- a/src/mainboard/google/brya/variants/dochi/overridetree.cb
+++ b/src/mainboard/google/brya/variants/dochi/overridetree.cb
@@ -1,7 +1,7 @@
fw_config
- field FPMCU_MASK 10
- option FPMCU_DISABLED 0
- option FPMCU_ENABLED 1
+ field FP_MCU 9 10
+ option FP_ABSENT 0
+ option FP_MCU_NUVOTON 1
end
field STORAGE 30 31
option STORAGE_UNKNOWN 0
@@ -279,7 +279,7 @@ chip soc/intel/alderlake
register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D2)"
register "enable_delay_ms" = "3"
device spi 0 on
- probe FPMCU_MASK FPMCU_ENABLED
+ probe FP_MCU FP_MCU_NUVOTON
end
end # FPMCU
end
diff --git a/src/mainboard/google/brya/variants/dochi/variant.c b/src/mainboard/google/brya/variants/dochi/variant.c
index ae8488481c..4c24347153 100644
--- a/src/mainboard/google/brya/variants/dochi/variant.c
+++ b/src/mainboard/google/brya/variants/dochi/variant.c
@@ -6,6 +6,6 @@
void variant_update_soc_chip_config(struct soc_intel_alderlake_config *config)
{
- if (fw_config_probe(FW_CONFIG(FPMCU_MASK, FPMCU_DISABLED)))
+ if (fw_config_probe(FW_CONFIG(FP_MCU, FP_ABSENT)))
config->serial_io_gspi_mode[PchSerialIoIndexGSPI1] = PchSerialIoDisabled;
}