Chen Wisley has uploaded this change for review.

View Change

mb/google/dedede/var/drawcia: Add Wifi SAR for drawcia

drawman/drawlat/drawcia share the same coreboot, and only drawcia is convertible.
Use tablet mode of fw config to decide to load custom wifi sar or not.

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

Change-Id: Ibcd498021e63d0a172c71c3d94b60b3a25973467
Signed-off-by: Wisley Chen <wisley.chen@quantatw.com>
---
A src/mainboard/google/dedede/variants/drawcia/Makefile.inc
A src/mainboard/google/dedede/variants/drawcia/variant.c
2 files changed, 28 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/44661/1
diff --git a/src/mainboard/google/dedede/variants/drawcia/Makefile.inc b/src/mainboard/google/dedede/variants/drawcia/Makefile.inc
new file mode 100755
index 0000000..0013e84
--- /dev/null
+++ b/src/mainboard/google/dedede/variants/drawcia/Makefile.inc
@@ -0,0 +1,3 @@
+## SPDX-License-Identifier: GPL-2.0-or-later
+
+ramstage-y += variant.c
diff --git a/src/mainboard/google/dedede/variants/drawcia/variant.c b/src/mainboard/google/dedede/variants/drawcia/variant.c
new file mode 100755
index 0000000..8ce5475
--- /dev/null
+++ b/src/mainboard/google/dedede/variants/drawcia/variant.c
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <baseboard/variants.h>
+#include <ec/google/chromeec/ec.h>
+#include <console/console.h>
+#include <sar.h>
+
+#define FW_CONFIG_TABLETMODE_MASK 0x00000400
+
+const char *get_wifi_sar_cbfs_filename(void)
+{
+ const char *filename = NULL;
+ uint32_t fw_id;
+ int rev;
+
+ rev = google_chromeec_cbi_get_fw_config(&fw_id);
+
+ if (!rev) {
+
+ if (fw_id & FW_CONFIG_TABLETMODE_MASK)
+ filename = "wifi_sar-drawcia.hex";
+ }
+
+ return filename;
+}

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ibcd498021e63d0a172c71c3d94b60b3a25973467
Gerrit-Change-Number: 44661
Gerrit-PatchSet: 1
Gerrit-Owner: Chen Wisley <wisley.chen@quantatw.com>
Gerrit-MessageType: newchange