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>
This commit is contained in:
John Su 2021-01-19 22:13:51 +08:00 committed by Martin Roth
parent 216d69d459
commit 2f67b34e12
4 changed files with 27 additions and 0 deletions

View File

@ -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);

View File

@ -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. */

View File

@ -2,5 +2,7 @@
subdirs-y += ./spd
romstage-y += romstage.c
ramstage-y += variant.c
ramstage-y += gpio.c

View File

@ -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;
}
}