summaryrefslogtreecommitdiff
path: root/src/mainboard/google/brya/variants
diff options
context:
space:
mode:
authorWisley Chen <wisley.chen@quanta.corp-partner.google.com>2022-12-14 18:08:53 +0600
committerMartin L Roth <gaumless@gmail.com>2022-12-17 20:26:49 +0000
commit964a60360a11ce06a65d1eceb15ee0100574dc3d (patch)
tree86f92d2b172403166e78d44549e891678eff418c /src/mainboard/google/brya/variants
parent3228b266b2c6da6cd274c0905a960bd4300fc567 (diff)
mb/google/nissa/var/yaviks: Enable wifi SAR
Enable wifi sar function for yaviks. Use the fw_config to separate SAR setting for different wifi card. BUG=259199095 TEST=build, enabled iwlwifi debug, and check dmesg Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com> Change-Id: I3ced65368ee66e084e58d66cff8f75147f665d71 Reviewed-on: https://review.coreboot.org/c/coreboot/+/70750 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Reka Norman <rekanorman@chromium.org>
Diffstat (limited to 'src/mainboard/google/brya/variants')
-rw-r--r--src/mainboard/google/brya/variants/yaviks/Makefile.inc1
-rw-r--r--src/mainboard/google/brya/variants/yaviks/overridetree.cb10
-rw-r--r--src/mainboard/google/brya/variants/yaviks/variant.c12
3 files changed, 23 insertions, 0 deletions
diff --git a/src/mainboard/google/brya/variants/yaviks/Makefile.inc b/src/mainboard/google/brya/variants/yaviks/Makefile.inc
index d38141ca24..06e2f8dfbf 100644
--- a/src/mainboard/google/brya/variants/yaviks/Makefile.inc
+++ b/src/mainboard/google/brya/variants/yaviks/Makefile.inc
@@ -3,4 +3,5 @@ bootblock-y += gpio.c
romstage-y += gpio.c
+ramstage-$(CONFIG_FW_CONFIG) += variant.c
ramstage-y += gpio.c
diff --git a/src/mainboard/google/brya/variants/yaviks/overridetree.cb b/src/mainboard/google/brya/variants/yaviks/overridetree.cb
index 3ad4ff3523..61c9188d91 100644
--- a/src/mainboard/google/brya/variants/yaviks/overridetree.cb
+++ b/src/mainboard/google/brya/variants/yaviks/overridetree.cb
@@ -1,3 +1,13 @@
+fw_config
+ field DB_USB 0 1
+ option DB_NONE 0
+ option DB_1C_1A 1
+ end
+ field WIFI_SAR_ID 2 3
+ option SAR_ID_0 0
+ end
+end
+
chip soc/intel/alderlake
register "sagv" = "SaGv_Enabled"
diff --git a/src/mainboard/google/brya/variants/yaviks/variant.c b/src/mainboard/google/brya/variants/yaviks/variant.c
new file mode 100644
index 0000000000..0db334d474
--- /dev/null
+++ b/src/mainboard/google/brya/variants/yaviks/variant.c
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <fw_config.h>
+#include <sar.h>
+
+const char *get_wifi_sar_cbfs_filename(void)
+{
+ if (fw_config_probe(FW_CONFIG(WIFI_SAR_ID, SAR_ID_0)))
+ return "wifi_sar_0.hex";
+
+ return NULL;
+}