From 51f3b3225504707ce6df81b12e373ce8ff1ee58c Mon Sep 17 00:00:00 2001 From: Stanley Wu Date: Mon, 15 Mar 2021 22:48:25 +0800 Subject: [PATCH] mb/google/dedede/var/boten: Add custom Wifi SAR for botenflex Add wifi sar for botenflex. Due to fw-config cannot distinguish between boten and botenflex. Using sku_id to decide to load botenflex custom wifi sar. Detail reason for using sku_id in b:182433707. BUG=b:182433707 TEST=build and test on boten/botenflex Cq-Depend: chrome-internal:3686313 Change-Id: Id3f2529a7ad56ff306df98f77cda556656da52a5 Signed-off-by: Stanley Wu Reviewed-on: https://review.coreboot.org/c/coreboot/+/51501 Tested-by: build bot (Jenkins) Reviewed-by: Karthik Ramasubramanian --- .../google/dedede/variants/boten/Makefile.inc | 2 ++ .../google/dedede/variants/boten/variant.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/mainboard/google/dedede/variants/boten/Makefile.inc b/src/mainboard/google/dedede/variants/boten/Makefile.inc index 67a7ab235a..5ca7b86d1d 100644 --- a/src/mainboard/google/dedede/variants/boten/Makefile.inc +++ b/src/mainboard/google/dedede/variants/boten/Makefile.inc @@ -3,3 +3,5 @@ ramstage-y += gpio.c smm-y += variant.c + +ramstage-y += variant.c diff --git a/src/mainboard/google/dedede/variants/boten/variant.c b/src/mainboard/google/dedede/variants/boten/variant.c index 2540fc7f2a..9afcb272e7 100644 --- a/src/mainboard/google/dedede/variants/boten/variant.c +++ b/src/mainboard/google/dedede/variants/boten/variant.c @@ -3,7 +3,11 @@ #include #include #include +#include #include +#include + +#define SKU_ID_BOTENFLEX 0x90000 static void power_off_lte_module(void) { @@ -21,3 +25,13 @@ void variant_smi_sleep(u8 slp_typ) if (slp_typ == ACPI_S5) power_off_lte_module(); } + +const char *get_wifi_sar_cbfs_filename(void) +{ + uint32_t sku_id = google_chromeec_get_board_sku(); + + if (sku_id == SKU_ID_BOTENFLEX) + return "wifi_sar-botenflex.hex"; + + return "wifi_sar-boten.hex"; +}