David Wu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/84339?usp=email )
Change subject: mb/google/nissa/var/riven: enable WIFI SAR ......................................................................
mb/google/nissa/var/riven: enable WIFI SAR
According to the CL:chrome-internal:7651905, Riven will use the fw_config to separate SAR setting.
CNVI + ID_0 --> wifi_sar_0.hex for WIFI6 PCIE + ID_1 --> wifi_sar_9.hex for WIFI7
BUG=b:366060274 TEST=build, enabled iwlwifi debug, and check dmesg
Cq-Depend: chrome-internal:7651905 Change-Id: I647d64a008991a7a20791b2c87ea6308af6bb82e Signed-off-by: David Wu david_wu@quanta.corp-partner.google.com --- M src/mainboard/google/brya/Kconfig M src/mainboard/google/brya/variants/riven/overridetree.cb M src/mainboard/google/brya/variants/riven/variant.c 3 files changed, 22 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/39/84339/1
diff --git a/src/mainboard/google/brya/Kconfig b/src/mainboard/google/brya/Kconfig index b54b0db..a8c8345 100644 --- a/src/mainboard/google/brya/Kconfig +++ b/src/mainboard/google/brya/Kconfig @@ -476,6 +476,7 @@
config BOARD_GOOGLE_RIVEN select BOARD_GOOGLE_BASEBOARD_NISSA + select CHROMEOS_WIFI_SAR if CHROMEOS select DRIVERS_GENERIC_GPIO_KEYS select DRIVERS_INTEL_MIPI_CAMERA select HAVE_WWAN_POWER_SEQUENCE diff --git a/src/mainboard/google/brya/variants/riven/overridetree.cb b/src/mainboard/google/brya/variants/riven/overridetree.cb index 6f33f48..d565897 100644 --- a/src/mainboard/google/brya/variants/riven/overridetree.cb +++ b/src/mainboard/google/brya/variants/riven/overridetree.cb @@ -8,6 +8,10 @@ option STYLUS_ABSENT 0 option STYLUS_PRESENT 1 end + field WIFI_SAR_ID 4 6 + option ID_0 0 + option ID_1 1 + end field WIFI_TYPE 7 option WIFI_CNVI 0 option WIFI_PCIE 1 diff --git a/src/mainboard/google/brya/variants/riven/variant.c b/src/mainboard/google/brya/variants/riven/variant.c index 15460ce..ab31f15 100644 --- a/src/mainboard/google/brya/variants/riven/variant.c +++ b/src/mainboard/google/brya/variants/riven/variant.c @@ -2,6 +2,23 @@
#include <baseboard/variants.h> #include <boardid.h> +#include <fw_config.h> +#include <sar.h> + +const char *get_wifi_sar_cbfs_filename(void) +{ + if (fw_config_probe(FW_CONFIG(WIFI_TYPE, WIFI_CNVI)) && fw_config_probe(FW_CONFIG(WIFI_SAR_ID, ID_0))) { + printk(BIOS_INFO, "Use wifi_sar_0.hex for WIFI6.\n"); + return "wifi_sar_0.hex"; + } + + if (fw_config_probe(FW_CONFIG(WIFI_TYPE, WIFI_PCIE)) && fw_config_probe(FW_CONFIG(WIFI_SAR_ID, ID_1))) { + printk(BIOS_INFO, "Use wifi_sar_9.hex for WIFI7.\n"); + return "wifi_sar_9.hex"; + } + + return NULL; +}
void variant_update_soc_chip_config(struct soc_intel_alderlake_config *config) {