Ren Kuo has uploaded this change for review.

View Change

mb/google/dedede/var/magolor: Add Wifi SAR for magolor and maglia

Add wifi sar for magolor and maglia:
Using tablet mode of fw config to decide to load custom wifi sar or not.
same wifi sar value for magolor and maglia (shared firmware)

BUG=b:173001370 b:173001251
TEST=enable CHROMEOS_WIFI_SAR in config of coreboot,
emerge-dedede coreboot-private-files-baseboard-dedede coreboot chromeos-bootimage.

Signed-off-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
Change-Id: I44ab68c9ee5deced90d3858161571ab4b39b4c8a
---
M src/mainboard/google/dedede/Kconfig.name
A src/mainboard/google/dedede/variants/magolor/Makefile.inc
A src/mainboard/google/dedede/variants/magolor/variant.c
3 files changed, 18 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/48448/1
diff --git a/src/mainboard/google/dedede/Kconfig.name b/src/mainboard/google/dedede/Kconfig.name
index 6aeb9ed..411efdb 100644
--- a/src/mainboard/google/dedede/Kconfig.name
+++ b/src/mainboard/google/dedede/Kconfig.name
@@ -67,6 +67,7 @@
select BASEBOARD_DEDEDE_LAPTOP
select DRIVERS_INTEL_MIPI_CAMERA
select SOC_INTEL_COMMON_BLOCK_IPU
+ select GEO_SAR_ENABLE if CHROMEOS_WIFI_SAR

config BOARD_GOOGLE_METAKNIGHT
bool "-> Metaknight"
diff --git a/src/mainboard/google/dedede/variants/magolor/Makefile.inc b/src/mainboard/google/dedede/variants/magolor/Makefile.inc
new file mode 100644
index 0000000..24c75d1
--- /dev/null
+++ b/src/mainboard/google/dedede/variants/magolor/Makefile.inc
@@ -0,0 +1,3 @@
+## SPDX-License-Identifier: GPL-2.0-or-later
+
+ramstage-$(CONFIG_FW_CONFIG) += variant.c
diff --git a/src/mainboard/google/dedede/variants/magolor/variant.c b/src/mainboard/google/dedede/variants/magolor/variant.c
new file mode 100644
index 0000000..e3b9599
--- /dev/null
+++ b/src/mainboard/google/dedede/variants/magolor/variant.c
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <fw_config.h>
+#include <sar.h>
+
+const char *get_wifi_sar_cbfs_filename(void)
+{
+ const char *filename = NULL;
+
+ if (fw_config_probe(FW_CONFIG(TABLETMODE, TABLETMODE_ENABLED)))
+ filename = "wifi_sar-magolor.hex";
+
+ return filename;
+}

To view, visit change 48448. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I44ab68c9ee5deced90d3858161571ab4b39b4c8a
Gerrit-Change-Number: 48448
Gerrit-PatchSet: 1
Gerrit-Owner: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
Gerrit-MessageType: newchange