[coreboot-gerrit] Change in ...coreboot[master]: WIP: mb/google/octopus: Add custom SAR values for Bobba

Justin TerAvest (Code Review) gerrit at coreboot.org
Fri Dec 14 19:28:55 CET 2018


Justin TerAvest has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30223


Change subject: WIP: mb/google/octopus: Add custom SAR values for Bobba
......................................................................

WIP: mb/google/octopus: Add custom SAR values for Bobba

Bobba would prefer to use different SAR values per sku-id for regulatory
compliance. This commit uses the newly added interface for custom wifi
SAR CBFS filenames.

This is a work-in-progress; the underlying files don't exist, but I'm
uploading this to that we can review this approach.

Change-Id: I354382d651d65d533459f0ca460ca6fd6de547fd
---
M src/mainboard/google/octopus/variants/bobba/Makefile.inc
A src/mainboard/google/octopus/variants/bobba/mainboard.c
2 files changed, 53 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/30223/1

diff --git a/src/mainboard/google/octopus/variants/bobba/Makefile.inc b/src/mainboard/google/octopus/variants/bobba/Makefile.inc
index 9fb63f5..152b46e 100644
--- a/src/mainboard/google/octopus/variants/bobba/Makefile.inc
+++ b/src/mainboard/google/octopus/variants/bobba/Makefile.inc
@@ -1,3 +1,4 @@
 bootblock-y += gpio.c
 
 ramstage-y += gpio.c
+ramstage-y += mainboard.c
diff --git a/src/mainboard/google/octopus/variants/bobba/mainboard.c b/src/mainboard/google/octopus/variants/bobba/mainboard.c
new file mode 100644
index 0000000..d5c8101
--- /dev/null
+++ b/src/mainboard/google/octopus/variants/bobba/mainboard.c
@@ -0,0 +1,52 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2018 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <boardid.h>
+#include <ec/google/chromeec/ec.h>
+#include <sar.h>
+
+const char *get_wifi_sar_cbfs_filename(void)
+{
+	static const char *filename = NULL;
+	if (filename == NULL) {
+		uint32_t sku_id;
+		if (!google_chromeec_cbi_get_sku_id(&sku_id)) {
+			switch (sku_id) {
+				case 1:
+				case 2:
+				case 3:
+				case 4:
+					filename = "bobba_sar_wifi_values.hex";
+					break;
+				case 9:
+				case 10:
+				case 11:
+				case 12:
+					filename = "bobba360_sar_wifi_values.hex";
+					break;
+				case 17:
+				case 18:
+				case 19:
+				case 20:
+					filename = "sparky_sar_wifi_values.hex";
+					break;
+				case 25:
+				case 26:
+					filename = "sparky360_sar_wifi_values.hex";
+			}
+		}
+	}
+	return filename;
+}

-- 
To view, visit https://review.coreboot.org/c/coreboot/+/30223
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I354382d651d65d533459f0ca460ca6fd6de547fd
Gerrit-Change-Number: 30223
Gerrit-PatchSet: 1
Gerrit-Owner: Justin TerAvest <teravest at chromium.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181214/bd4813fb/attachment-0001.html>


More information about the coreboot-gerrit mailing list