<p>Justin TerAvest has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/c/coreboot/+/30223">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">WIP: mb/google/octopus: Add custom SAR values for Bobba<br><br>Bobba would prefer to use different SAR values per sku-id for regulatory<br>compliance. This commit uses the newly added interface for custom wifi<br>SAR CBFS filenames.<br><br>This is a work-in-progress; the underlying files don't exist, but I'm<br>uploading this to that we can review this approach.<br><br>Change-Id: I354382d651d65d533459f0ca460ca6fd6de547fd<br>---<br>M src/mainboard/google/octopus/variants/bobba/Makefile.inc<br>A src/mainboard/google/octopus/variants/bobba/mainboard.c<br>2 files changed, 53 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/30223/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/mainboard/google/octopus/variants/bobba/Makefile.inc b/src/mainboard/google/octopus/variants/bobba/Makefile.inc</span><br><span>index 9fb63f5..152b46e 100644</span><br><span>--- a/src/mainboard/google/octopus/variants/bobba/Makefile.inc</span><br><span>+++ b/src/mainboard/google/octopus/variants/bobba/Makefile.inc</span><br><span>@@ -1,3 +1,4 @@</span><br><span> bootblock-y += gpio.c</span><br><span> </span><br><span> ramstage-y += gpio.c</span><br><span style="color: hsl(120, 100%, 40%);">+ramstage-y += mainboard.c</span><br><span>diff --git a/src/mainboard/google/octopus/variants/bobba/mainboard.c b/src/mainboard/google/octopus/variants/bobba/mainboard.c</span><br><span>new file mode 100644</span><br><span>index 0000000..d5c8101</span><br><span>--- /dev/null</span><br><span>+++ b/src/mainboard/google/octopus/variants/bobba/mainboard.c</span><br><span>@@ -0,0 +1,52 @@</span><br><span style="color: hsl(120, 100%, 40%);">+/*</span><br><span style="color: hsl(120, 100%, 40%);">+ * This file is part of the coreboot project.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Copyright 2018 Google Inc.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(120, 100%, 40%);">+ * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(120, 100%, 40%);">+ * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(120, 100%, 40%);">+ * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(120, 100%, 40%);">+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(120, 100%, 40%);">+ * GNU General Public License for more details.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#include <boardid.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <ec/google/chromeec/ec.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <sar.h></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+const char *get_wifi_sar_cbfs_filename(void)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+   static const char *filename = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+   if (filename == NULL) {</span><br><span style="color: hsl(120, 100%, 40%);">+               uint32_t sku_id;</span><br><span style="color: hsl(120, 100%, 40%);">+              if (!google_chromeec_cbi_get_sku_id(&sku_id)) {</span><br><span style="color: hsl(120, 100%, 40%);">+                   switch (sku_id) {</span><br><span style="color: hsl(120, 100%, 40%);">+                             case 1:</span><br><span style="color: hsl(120, 100%, 40%);">+                               case 2:</span><br><span style="color: hsl(120, 100%, 40%);">+                               case 3:</span><br><span style="color: hsl(120, 100%, 40%);">+                               case 4:</span><br><span style="color: hsl(120, 100%, 40%);">+                                       filename = "bobba_sar_wifi_values.hex";</span><br><span style="color: hsl(120, 100%, 40%);">+                                     break;</span><br><span style="color: hsl(120, 100%, 40%);">+                                case 9:</span><br><span style="color: hsl(120, 100%, 40%);">+                               case 10:</span><br><span style="color: hsl(120, 100%, 40%);">+                              case 11:</span><br><span style="color: hsl(120, 100%, 40%);">+                              case 12:</span><br><span style="color: hsl(120, 100%, 40%);">+                                      filename = "bobba360_sar_wifi_values.hex";</span><br><span style="color: hsl(120, 100%, 40%);">+                                  break;</span><br><span style="color: hsl(120, 100%, 40%);">+                                case 17:</span><br><span style="color: hsl(120, 100%, 40%);">+                              case 18:</span><br><span style="color: hsl(120, 100%, 40%);">+                              case 19:</span><br><span style="color: hsl(120, 100%, 40%);">+                              case 20:</span><br><span style="color: hsl(120, 100%, 40%);">+                                      filename = "sparky_sar_wifi_values.hex";</span><br><span style="color: hsl(120, 100%, 40%);">+                                    break;</span><br><span style="color: hsl(120, 100%, 40%);">+                                case 25:</span><br><span style="color: hsl(120, 100%, 40%);">+                              case 26:</span><br><span style="color: hsl(120, 100%, 40%);">+                                      filename = "sparky360_sar_wifi_values.hex";</span><br><span style="color: hsl(120, 100%, 40%);">+                 }</span><br><span style="color: hsl(120, 100%, 40%);">+             }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+     return filename;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/c/coreboot/+/30223">change 30223</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/c/coreboot/+/30223"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I354382d651d65d533459f0ca460ca6fd6de547fd </div>
<div style="display:none"> Gerrit-Change-Number: 30223 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Justin TerAvest <teravest@chromium.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>