summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/google/zork/variants/baseboard/helpers.c8
-rw-r--r--src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h2
-rw-r--r--src/mainboard/google/zork/variants/vilboz/Makefile.inc2
-rw-r--r--src/mainboard/google/zork/variants/vilboz/romstage.c15
4 files changed, 27 insertions, 0 deletions
diff --git a/src/mainboard/google/zork/variants/baseboard/helpers.c b/src/mainboard/google/zork/variants/baseboard/helpers.c
index 00e7a033cb..38f0a72658 100644
--- a/src/mainboard/google/zork/variants/baseboard/helpers.c
+++ b/src/mainboard/google/zork/variants/baseboard/helpers.c
@@ -43,6 +43,9 @@ enum {
/* SAR presence */
FW_CONFIG_MASK_SAR = 0x7,
FW_CONFIG_SHIFT_SAR = 23,
+ /* Mainboard Type for VCORE IC */
+ FW_CONFIG_MASK_MB_TYPE = 0x1,
+ FW_CONFIG_SHIFT_MB_TYPE = 26,
/* Fan information */
FW_CONFIG_MASK_FAN = 0x3,
FW_CONFIG_SHIFT_FAN = 27,
@@ -86,6 +89,11 @@ int variant_gets_sar_config(void)
return extract_field(FW_CONFIG_MASK_SAR, FW_CONFIG_SHIFT_SAR);
}
+int variant_gets_mb_type_config(void)
+{
+ return extract_field(FW_CONFIG_MASK_MB_TYPE, FW_CONFIG_SHIFT_MB_TYPE);
+}
+
int variant_has_emmc(void)
{
return !!extract_field(FW_CONFIG_MASK_EMMC, FW_CONFIG_SHIFT_EMMC);
diff --git a/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h
index 230f059972..c8873abec9 100644
--- a/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h
@@ -64,6 +64,8 @@ const fsp_ddi_descriptor *baseboard_get_ddi_descriptors(size_t *num);
/* Retrieve attributes from FW_CONFIG in CBI. */
/* Return value of SAR config. */
int variant_gets_sar_config(void);
+/* Return value of Mainboard Type config */
+int variant_gets_mb_type_config(void);
/* Return 0 if non-existent, 1 if present. */
int variant_has_emmc(void);
/* Return 0 if non-existent, 1 if present. */
diff --git a/src/mainboard/google/zork/variants/vilboz/Makefile.inc b/src/mainboard/google/zork/variants/vilboz/Makefile.inc
index af38c8828d..f8ed418bb9 100644
--- a/src/mainboard/google/zork/variants/vilboz/Makefile.inc
+++ b/src/mainboard/google/zork/variants/vilboz/Makefile.inc
@@ -2,5 +2,7 @@
subdirs-y += ./spd
+romstage-y += romstage.c
+
ramstage-y += variant.c
ramstage-y += gpio.c
diff --git a/src/mainboard/google/zork/variants/vilboz/romstage.c b/src/mainboard/google/zork/variants/vilboz/romstage.c
new file mode 100644
index 0000000000..1e438927d8
--- /dev/null
+++ b/src/mainboard/google/zork/variants/vilboz/romstage.c
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <baseboard/variants.h>
+#include <console/console.h>
+
+void variant_updm_update(FSP_M_CONFIG *mcfg)
+{
+ printk(BIOS_INFO, "%s UPDM update\n", __func__);
+ if (variant_gets_mb_type_config()) {
+ mcfg->telemetry_vddcr_vdd_slope_mA = 32453;
+ mcfg->telemetry_vddcr_vdd_offset = 168;
+ mcfg->telemetry_vddcr_soc_slope_mA = 22644;
+ mcfg->telemetry_vddcr_soc_offset = -70;
+ }
+}