Seunghwan Kim has uploaded this change for review. ( https://review.coreboot.org/28439
Change subject: mb/google/poppy/variants/nautilus: Bump VCC_SA voltage offset 75mV ......................................................................
mb/google/poppy/variants/nautilus: Bump VCC_SA voltage offset 75mV
Nautilus-Wifi with m3 AP got a halt issue during CTS test.
Nautilus-Wifi was FCS with Celeron AP first and also its PCB/BOM was validated only with Celeron. Since Celeron deos not support turbo boost mode, its steady power demend and lower CPU frequency may not reflect the potential noise hidden inside the board.
Bumping VCC_SA voltage offset 75mV confirmed works to mitigate the potential noise coupling to VCC_GT/SA, and we verified this change makes this issue go away on Nautilus-Wifi board.
Nautilus-LTE doesn't show this issue, since it has 10L PCB, will have better grounding and less noise/ripple than 8L PCB.
BUG=b:111417632 BRANCH=poppy TEST=Verified CTS test pass without an issue.
Change-Id: Id13fcc36a5b6ed42620c66f57a7303f30bff1a50 Signed-off-by: Seunghwan Kim sh_.kim@samsung.com --- M src/mainboard/google/poppy/romstage.c M src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h M src/mainboard/google/poppy/variants/nautilus/Makefile.inc M src/mainboard/google/poppy/variants/nautilus/mainboard.c M src/mainboard/google/poppy/variants/nautilus/memory.c A src/mainboard/google/poppy/variants/nautilus/sku.c 6 files changed, 79 insertions(+), 21 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/39/28439/1
diff --git a/src/mainboard/google/poppy/romstage.c b/src/mainboard/google/poppy/romstage.c index af4f70b..adc13ed 100644 --- a/src/mainboard/google/poppy/romstage.c +++ b/src/mainboard/google/poppy/romstage.c @@ -173,4 +173,9 @@ mem_cfg->MemorySpdPtr00 = mainboard_get_spd_data(p.type, p.use_sec_spd); mem_cfg->MemorySpdPtr10 = mem_cfg->MemorySpdPtr00; mem_cfg->MemorySpdDataLen = spd_info[p.type].len; + + if (p.enable_sa_oc_support) { + mem_cfg->SaOcSupport = 1; + mem_cfg->SaVoltageOffset = p.sa_voltage_offset_val; + } } diff --git a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h index 391f809..ef41c9b 100644 --- a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/poppy/variants/baseboard/include/baseboard/variants.h @@ -54,6 +54,8 @@ const void *rcomp_target; size_t rcomp_target_size; bool use_sec_spd; + bool enable_sa_oc_support; + uint16_t sa_voltage_offset_val; };
void variant_memory_params(struct memory_params *p); diff --git a/src/mainboard/google/poppy/variants/nautilus/Makefile.inc b/src/mainboard/google/poppy/variants/nautilus/Makefile.inc index d52893e..130c940 100644 --- a/src/mainboard/google/poppy/variants/nautilus/Makefile.inc +++ b/src/mainboard/google/poppy/variants/nautilus/Makefile.inc @@ -7,9 +7,11 @@
romstage-y += memory.c romstage-y += gpio.c +romstage-y += sku.c
ramstage-y += gpio.c ramstage-y += nhlt.c ramstage-y += mainboard.c +ramstage-y += sku.c
smm-$(CONFIG_HAVE_SMI_HANDLER) += smihandler.c diff --git a/src/mainboard/google/poppy/variants/nautilus/mainboard.c b/src/mainboard/google/poppy/variants/nautilus/mainboard.c index e51370c..32e9b97 100644 --- a/src/mainboard/google/poppy/variants/nautilus/mainboard.c +++ b/src/mainboard/google/poppy/variants/nautilus/mainboard.c @@ -15,32 +15,17 @@
#include <baseboard/variants.h> #include <chip.h> -#include <gpio.h> #include <device/device.h> +#include <device/pci.h> #include <smbios.h> #include <string.h> #include <variant/sku.h> +#include <console/console.h>
-uint32_t variant_board_sku(void) -{ - static uint32_t sku_id = SKU_UNKNOWN; - - if (sku_id != SKU_UNKNOWN) - return sku_id; - - /* - * Nautilus uses GPP_B20 to determine SKU - * 0 - Wifi SKU - * 1 - LTE SKU - */ - gpio_input_pulldown(GPP_B20); - if (!gpio_get(GPP_B20)) - sku_id = SKU_0_NAUTILUS; - else - sku_id = SKU_1_NAUTILUS_LTE; - - return sku_id; -} +#define R_PCH_OC_WDT_CTL 0x54 +#define B_PCH_OC_WDT_CTL_FORCE_ALL BIT15 +#define B_PCH_OC_WDT_CTL_EN BIT14 +#define B_PCH_OC_WDT_CTL_UNXP_RESET_STS BIT22
const char *smbios_mainboard_sku(void) { @@ -57,11 +42,22 @@ uint32_t sku_id = variant_board_sku(); struct device *root = SA_DEV_ROOT; config_t *cfg = root->chip_info; + uint16_t abase; + uint32_t val32;
switch (sku_id) { case SKU_0_NAUTILUS: /* Disable LTE module */ cfg->usb3_ports[3].enable = 0; + + /* Enabling SaOcSupport flag makes OC_WDT be enabled in FSP-M. + * We should clear OC_WDT to prevent turning the system off. */ + abase = pci_read_config16(PCH_DEV_PMC, ABASE) & 0xfffc; + val32 = inl(abase + R_PCH_OC_WDT_CTL); + val32 &= ~(B_PCH_OC_WDT_CTL_EN | + B_PCH_OC_WDT_CTL_FORCE_ALL | + B_PCH_OC_WDT_CTL_UNXP_RESET_STS); + outl(val32, abase + R_PCH_OC_WDT_CTL); break;
case SKU_1_NAUTILUS_LTE: diff --git a/src/mainboard/google/poppy/variants/nautilus/memory.c b/src/mainboard/google/poppy/variants/nautilus/memory.c index dc845bc..a0dd76b 100644 --- a/src/mainboard/google/poppy/variants/nautilus/memory.c +++ b/src/mainboard/google/poppy/variants/nautilus/memory.c @@ -14,6 +14,7 @@ */
#include <baseboard/variants.h> +#include <variant/sku.h>
/* DQ byte map */ static const u8 dq_map[][12] = { @@ -46,4 +47,13 @@ p->rcomp_resistor_size = sizeof(rcomp_resistor); p->rcomp_target = rcomp_target; p->rcomp_target_size = sizeof(rcomp_target); + + switch (variant_board_sku()) { + case SKU_0_NAUTILUS: + /* Bumping VCC_SA voltage offset 75mV to allow a + * tolerance to PLLGT on Nautilus-Wifi sku */ + p->enable_sa_oc_support = 1; + p->sa_voltage_offset_val = 75; + break; + } } diff --git a/src/mainboard/google/poppy/variants/nautilus/sku.c b/src/mainboard/google/poppy/variants/nautilus/sku.c new file mode 100644 index 0000000..55b118d --- /dev/null +++ b/src/mainboard/google/poppy/variants/nautilus/sku.c @@ -0,0 +1,43 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2018 Google Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <baseboard/variants.h> +#include <gpio.h> +#include <variant/sku.h> + +uint32_t variant_board_sku(void) +{ +#if ENV_ROMSTAGE + uint32_t sku_id = SKU_UNKNOWN; +#else + static uint32_t sku_id = SKU_UNKNOWN; + + if (sku_id != SKU_UNKNOWN) + return sku_id; +#endif + + /* + * Nautilus uses GPP_B20 to determine SKU + * 0 - Wifi SKU + * 1 - LTE SKU + */ + gpio_input_pulldown(GPP_B20); + if (!gpio_get(GPP_B20)) + sku_id = SKU_0_NAUTILUS; + else + sku_id = SKU_1_NAUTILUS_LTE; + + return sku_id; +}