Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/68660 )
Change subject: mb/google/nissa/var/craask: Add wifi sar table ......................................................................
mb/google/nissa/var/craask: Add wifi sar table
Add wifi sar table for craask/craaskbowl. Use fw_config to separate different project settings.
BUG=b:247652032,b:251287099,b:251287101 Test=emerge-nissa coreboot
Signed-off-by: Tyler Wang tyler.wang@quanta.corp-partner.google.com Change-Id: I5c92f0ab53ece12a97068f09241e5298909116aa Reviewed-on: https://review.coreboot.org/c/coreboot/+/68660 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Reka Norman rekanorman@chromium.org Reviewed-by: Eric Lai eric_lai@quanta.corp-partner.google.com --- M src/mainboard/google/brya/Kconfig.name M src/mainboard/google/brya/variants/craask/Makefile.inc M src/mainboard/google/brya/variants/craask/overridetree.cb A src/mainboard/google/brya/variants/craask/variant.c 4 files changed, 45 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Reka Norman: Looks good to me, approved Eric Lai: Looks good to me, approved
diff --git a/src/mainboard/google/brya/Kconfig.name b/src/mainboard/google/brya/Kconfig.name index 3c755c6..2102961 100644 --- a/src/mainboard/google/brya/Kconfig.name +++ b/src/mainboard/google/brya/Kconfig.name @@ -226,6 +226,7 @@ select DRIVERS_GENESYSLOGIC_GL9750 select DRIVERS_INTEL_MIPI_CAMERA select HAVE_WWAN_POWER_SEQUENCE + select CHROMEOS_WIFI_SAR if CHROMEOS
config BOARD_GOOGLE_OSIRIS bool "-> Osiris" diff --git a/src/mainboard/google/brya/variants/craask/Makefile.inc b/src/mainboard/google/brya/variants/craask/Makefile.inc index 8ae0e3b..86ba20d 100644 --- a/src/mainboard/google/brya/variants/craask/Makefile.inc +++ b/src/mainboard/google/brya/variants/craask/Makefile.inc @@ -4,4 +4,5 @@ romstage-y += gpio.c
ramstage-$(CONFIG_FW_CONFIG) += fw_config.c +ramstage-$(CONFIG_FW_CONFIG) += variant.c ramstage-y += gpio.c diff --git a/src/mainboard/google/brya/variants/craask/overridetree.cb b/src/mainboard/google/brya/variants/craask/overridetree.cb index ebf8c30..fa79d8b 100644 --- a/src/mainboard/google/brya/variants/craask/overridetree.cb +++ b/src/mainboard/google/brya/variants/craask/overridetree.cb @@ -20,6 +20,10 @@ field AMP 6 7 option AMP_MX98360A 0 end + field WIFI_SAR_ID 13 15 + option ID_0 0 + option UNUSED 7 + end field CODEC 32 33 option CODEC_ALC5682I_VS 0 option CODEC_NAU8825 1 diff --git a/src/mainboard/google/brya/variants/craask/variant.c b/src/mainboard/google/brya/variants/craask/variant.c new file mode 100644 index 0000000..689a59a --- /dev/null +++ b/src/mainboard/google/brya/variants/craask/variant.c @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <console/console.h> +#include <fw_config.h> +#include <sar.h> + +const char *get_wifi_sar_cbfs_filename(void) +{ + if (fw_config_probe(FW_CONFIG(WIFI_SAR_ID, ID_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, UNUSED))) { + printk(BIOS_INFO, "Wi-Fi SAR not used, return NULL!\n"); + } + + return NULL; +}