diff options
author | Leo Chou <leo.chou@lcfc.corp-partner.google.com> | 2022-12-08 15:30:32 +0800 |
---|---|---|
committer | Eric Lai <eric_lai@quanta.corp-partner.google.com> | 2022-12-12 02:47:42 +0000 |
commit | 5aabdf6e12d9fdab614597845e594b0a1b7e3a1b (patch) | |
tree | 5a078412b1e07e08f6fd46861f1327a217afbc69 | |
parent | 891e6c37a0f642259faf2dd2e63d17336e0f9943 (diff) |
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 <leo.chou@lcfc.corp-partner.google.com>
Change-Id: Ibdbe1c0a477e47af9cbbc9bf73ac583d06ad7a0d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70480
Reviewed-by: Reka Norman <rekanorman@chromium.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
-rw-r--r-- | src/mainboard/google/brya/Kconfig.name | 1 | ||||
-rw-r--r-- | src/mainboard/google/brya/variants/pujjo/overridetree.cb | 5 | ||||
-rw-r--r-- | src/mainboard/google/brya/variants/pujjo/variant.c | 22 |
3 files changed, 28 insertions, 0 deletions
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 <fw_config.h> #include <baseboard/variants.h> +#include <sar.h> 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; +} |