From ed62dbaf674d102d45b84b38c5de62134e5bca4c Mon Sep 17 00:00:00 2001 From: Daniel Peng Date: Mon, 11 Sep 2023 17:29:54 +0800 Subject: mb/google/brya/var/marasov: Enable Wi-Fi sar table for Intel module 1.In contrast to the MediaTek Wi-Fi module, the Intel Wi-Fi module needs to load a SAR table. 2.Describe the FW_CONFIG probe for the settings on marasov. - WIFI_SAR_ID_0 for MTK Wi-Fi module MT7921L - WIFI_SAR_ID_1 for Intel Wi-Fi module AX211NGW BUG=b:300045956 BRANCH=firmware-brya-14505.B TEST=emerge-brya coreboot chromeos-bootimage Change-Id: I5b5c6bea6c2c916fb682044218ec7b3a5d2659f6 Signed-off-by: Daniel Peng Reviewed-on: https://review.coreboot.org/c/coreboot/+/77789 Reviewed-by: Daniel Peng Reviewed-by: Eric Lai Tested-by: build bot (Jenkins) Reviewed-by: Subrata Banik --- src/mainboard/google/brya/variants/marasov/overridetree.cb | 4 ++++ src/mainboard/google/brya/variants/marasov/variant.c | 14 ++++++++++++++ 2 files changed, 18 insertions(+) (limited to 'src/mainboard/google/brya/variants/marasov') diff --git a/src/mainboard/google/brya/variants/marasov/overridetree.cb b/src/mainboard/google/brya/variants/marasov/overridetree.cb index 311971f0ba..a8c1c06152 100644 --- a/src/mainboard/google/brya/variants/marasov/overridetree.cb +++ b/src/mainboard/google/brya/variants/marasov/overridetree.cb @@ -16,6 +16,10 @@ fw_config option TOUCH_NONE 0 option TOUCH_ELAN0001 1 end + field WIFI_SAR_ID 6 7 + option WIFI_SAR_ID_0 0 + option WIFI_SAR_ID_1 1 + end field STORAGE 30 31 option STORAGE_UNKNOWN 0 option STORAGE_NVME 1 diff --git a/src/mainboard/google/brya/variants/marasov/variant.c b/src/mainboard/google/brya/variants/marasov/variant.c index dad8a3c03b..5f3894d35c 100644 --- a/src/mainboard/google/brya/variants/marasov/variant.c +++ b/src/mainboard/google/brya/variants/marasov/variant.c @@ -2,8 +2,22 @@ #include #include +#include +#include +#include #include +const char *get_wifi_sar_cbfs_filename(void) +{ + if (fw_config_probe(FW_CONFIG(WIFI_SAR_ID, WIFI_SAR_ID_1))) { + printk(BIOS_INFO, "Use wifi_sar_1.hex for Intel Wi-Fi module AX211NGW.\n"); + return "wifi_sar_1.hex"; + } + + printk(BIOS_INFO, "Intel Wi-Fi SAR not used, return NULL!\n"); + return NULL; +} + void variant_generate_s0ix_hook(enum s0ix_entry entry) { /* Add board-specific MS0X entries */ -- cgit v1.2.3