summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Su <john_su@compal.corp-partner.google.com>2021-01-19 22:13:51 +0800
committerMartin Roth <martinroth@google.com>2021-03-10 23:04:32 +0000
commit2f67b34e12ad40c9bf3e90e980be4c11365865ea (patch)
tree659e0656296788822f9bfeb3893b274604b8db94 /src
parent216d69d459ba685c2aeb42b00c1cef7be2482864 (diff)
mb/google/zork/var/vilboz: Add Mainboard Type for VCORE IC
To define Mainboard Type config, use the fw_config bit[26]. Check MB Type to modify SDLE settings for different VCORE IC. BUG=b:177193131 BRANCH=zork Signed-off-by: John Su <john_su@compal.corp-partner.google.com> Change-Id: If153c0a3e641ae32ef89737925bd9f62dfb71f3d Reviewed-on: https://review.coreboot.org/c/coreboot/+/49683 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com> Reviewed-by: Kangheui Won <khwon@chromium.org>
Diffstat (limited to 'src')
-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;
+ }
+}