summaryrefslogtreecommitdiff
path: root/src/mainboard/google/brya/variants
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google/brya/variants')
-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;
}