From bac90c00b105a182933988bf2b589675af23a2a7 Mon Sep 17 00:00:00 2001 From: John Su Date: Thu, 28 Jun 2018 14:29:23 +0800 Subject: [PATCH] mb/google/poppy/variants/nami: Perform PL2 setting for sona According to sona thermal table, PL2 need to check cpu id. And then set PL2 value. BUG=b:110867809 TEST=The thermal team verify OK Change-Id: I5759fb3c685e3d4eef1be054541f950843d19874 Signed-off-by: John Su Reviewed-on: https://review.coreboot.org/27260 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh Reviewed-by: Sumeet R Pawnikar --- src/mainboard/google/poppy/variants/nami/mainboard.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/mainboard/google/poppy/variants/nami/mainboard.c b/src/mainboard/google/poppy/variants/nami/mainboard.c index 1d5a0b2ec5..33d6bf3671 100644 --- a/src/mainboard/google/poppy/variants/nami/mainboard.c +++ b/src/mainboard/google/poppy/variants/nami/mainboard.c @@ -31,9 +31,16 @@ #define PL2_I7_SKU 44 #define PL2_DEFAULT 29 +#define PL2_KBL_R 25 -static uint32_t get_pl2(void) +static uint32_t get_pl2(uint32_t sku_id) { + if ((sku_id == SKU_0_SONA) || (sku_id == SKU_1_SONA)) { + if (cpuid_eax(1) == CPUID_KABYLAKE_Y0) + return PL2_DEFAULT; + + return PL2_KBL_R; + } if (cpuid_eax(1) == CPUID_KABYLAKE_Y0) return PL2_I7_SKU; @@ -62,7 +69,7 @@ void variant_devtree_update(void) config_t *cfg = root->chip_info; /* Update PL2 based on SKU. */ - cfg->tdp_pl2_override = get_pl2(); + cfg->tdp_pl2_override = get_pl2(sku_id); switch (sku_id) { case SKU_0_VAYNE: