From 5aabdf6e12d9fdab614597845e594b0a1b7e3a1b Mon Sep 17 00:00:00 2001 From: Leo Chou Date: Thu, 8 Dec 2022 15:30:32 +0800 Subject: mb/google/nissa/var/pujjo: Add wifi sar table Add wifi sar table for pujjo intel wifi config. Use fw_config to separate different project settings. BUG=b:256042825,b:256042769 Test=emerge-nissa coreboot Signed-off-by: Leo Chou Change-Id: Ibdbe1c0a477e47af9cbbc9bf73ac583d06ad7a0d Reviewed-on: https://review.coreboot.org/c/coreboot/+/70480 Reviewed-by: Reka Norman Reviewed-by: Kangheui Won Tested-by: build bot (Jenkins) Reviewed-by: Eric Lai --- src/mainboard/google/brya/Kconfig.name | 1 + .../google/brya/variants/pujjo/overridetree.cb | 5 +++++ src/mainboard/google/brya/variants/pujjo/variant.c | 22 ++++++++++++++++++++++ 3 files changed, 28 insertions(+) (limited to 'src') diff --git a/src/mainboard/google/brya/Kconfig.name b/src/mainboard/google/brya/Kconfig.name index 48e511df0c..e141933091 100644 --- a/src/mainboard/google/brya/Kconfig.name +++ b/src/mainboard/google/brya/Kconfig.name @@ -264,6 +264,7 @@ config BOARD_GOOGLE_PUJJO select DRIVERS_I2C_SX9324 select DRIVERS_I2C_SX9324_SUPPORT_LEGACY_LINUX_DRIVER select HAVE_WWAN_POWER_SEQUENCE + select CHROMEOS_WIFI_SAR if CHROMEOS config BOARD_GOOGLE_XIVU bool "-> Xivu" diff --git a/src/mainboard/google/brya/variants/pujjo/overridetree.cb b/src/mainboard/google/brya/variants/pujjo/overridetree.cb index acba86ee7d..ade32f0ad3 100644 --- a/src/mainboard/google/brya/variants/pujjo/overridetree.cb +++ b/src/mainboard/google/brya/variants/pujjo/overridetree.cb @@ -30,6 +30,11 @@ fw_config option EXT_VR_PRESENT 0 option EXT_VR_ABSENT 1 end + field WIFI_SAR_ID 16 17 + option WIFI_SAR_TABLE_0 0 + option WIFI_SAR_TABLE_1 1 + option WIFI_SAR_TABLE_2 2 + end end diff --git a/src/mainboard/google/brya/variants/pujjo/variant.c b/src/mainboard/google/brya/variants/pujjo/variant.c index a09bba90f8..75eb0c24a0 100644 --- a/src/mainboard/google/brya/variants/pujjo/variant.c +++ b/src/mainboard/google/brya/variants/pujjo/variant.c @@ -2,6 +2,7 @@ #include #include +#include void variant_update_soc_chip_config(struct soc_intel_alderlake_config *config) { @@ -31,3 +32,24 @@ void variant_update_soc_chip_config(struct soc_intel_alderlake_config *config) config->ext_fivr_settings.vnn_icc_max_ma = 500; } } + +const char *get_wifi_sar_cbfs_filename(void) +{ + if (fw_config_probe(FW_CONFIG(WIFI_SAR_ID, WIFI_SAR_TABLE_0))) { + printk(BIOS_INFO, "Use wifi_sar_0.hex.\n"); + return "wifi_sar_0.hex"; + } + + else if (fw_config_probe(FW_CONFIG(WIFI_SAR_ID, WIFI_SAR_TABLE_1))) { + printk(BIOS_INFO, "Use wifi_sar_1.hex.\n"); + return "wifi_sar_1.hex"; + } + + else if (fw_config_probe(FW_CONFIG(WIFI_SAR_ID, WIFI_SAR_TABLE_2))) { + printk(BIOS_INFO, "Use wifi_sar_2.hex.\n"); + return "wifi_sar_2.hex"; + } + + printk(BIOS_INFO, "Intel Wi-Fi SAR not used, return NULL!\n"); + return NULL; +} -- cgit v1.2.3