<p>Shelley Chen has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/22557">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">google/fizz: Define smbios_mainboard_sku to return OEM IDs<br><br>Currently, mosys just returns "fizz" as model/chassis values.<br>Returning proper OEM IDs so that mosys can return the proper<br>variant.<br><br>BUG=b:67732053<br>BRANCH=None<br>TEST=mosys platform model; mosys platform chassis;<br>     Make sure returns the right variant string and not fizz.<br><br>Change-Id: I42e293e833b0f7c9870dc275561ad13256836e60<br>Signed-off-by: Shelley Chen <shchen@chromium.org><br>---<br>M src/mainboard/google/fizz/gpio.h<br>M src/mainboard/google/fizz/mainboard.c<br>2 files changed, 36 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/57/22557/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/mainboard/google/fizz/gpio.h b/src/mainboard/google/fizz/gpio.h<br>index d063e8d..d54a1fe 100644<br>--- a/src/mainboard/google/fizz/gpio.h<br>+++ b/src/mainboard/google/fizz/gpio.h<br>@@ -37,6 +37,11 @@<br> #define GPIO_SKU_ID2             GPP_C14<br> #define GPIO_SKU_ID3          GPP_C15<br> <br>+/* OEM ID GPIOs */<br>+#define GPIO_OEM_ID1          GPP_D10<br>+#define GPIO_OEM_ID2          GPP_D11<br>+#define GPIO_OEM_ID3          GPP_D12<br>+<br> #ifndef __ACPI__<br> /* Pad configuration in ramstage */<br> /* Leave eSPI pins untouched from default settings */<br>@@ -163,9 +168,12 @@<br> /* ISH_I2C1_SCL */  PAD_CFG_NC(GPP_D8),<br> /* ISH_SPI_CS# */ PAD_CFG_GPI_INT(GPP_D9, NONE,<br>                                         PLTRST, EDGE), /* HP_IRQ_GPIO */<br>-/* ISH_SPI_CLK */    PAD_CFG_NC(GPP_D10),<br>-/* ISH_SPI_MISO */       PAD_CFG_NC(GPP_D11),<br>-/* ISH_SPI_MOSI */       PAD_CFG_NC(GPP_D12),<br>+/* ISH_SPI_CLK */        PAD_CFG_GPI_GPIO_DRIVER(GPP_D10, NONE,<br>+                                               DEEP), /* OEM_ID1 */<br>+/* ISH_SPI_MISO */       PAD_CFG_GPI_GPIO_DRIVER(GPP_D11, NONE,<br>+                                               DEEP), /* OEM_ID2 */<br>+/* ISH_SPI_MOSI */       PAD_CFG_GPI_GPIO_DRIVER(GPP_D12, NONE,<br>+                                               DEEP), /* OEM_ID3 */<br> /* ISH_UART0_RXD */      PAD_CFG_NC(GPP_D13),<br> /* ISH_UART0_TXD */      PAD_CFG_NC(GPP_D14),<br> /* ISH_UART0_RTS# */     PAD_CFG_NC(GPP_D15),<br>diff --git a/src/mainboard/google/fizz/mainboard.c b/src/mainboard/google/fizz/mainboard.c<br>index ae37675..f058b5b 100644<br>--- a/src/mainboard/google/fizz/mainboard.c<br>+++ b/src/mainboard/google/fizz/mainboard.c<br>@@ -21,9 +21,11 @@<br> #include <ec/google/chromeec/ec.h><br> #include <gpio.h><br> #include <mainboard/google/fizz/gpio.h><br>+#include <smbios.h><br> #include <soc/gpio.h><br> #include <soc/pci_devs.h><br> #include <soc/nhlt.h><br>+#include <string.h><br> #include <vendorcode/google/chromeos/chromeos.h><br> <br> #define FIZZ_SKU_ID_I7_U42 0x4<br>@@ -74,6 +76,29 @@<br>     return watts;<br> }<br> <br>+static uint8_t variant_oem_id(void)<br>+{<br>+       static int board_oem_id = -1;<br>+        const gpio_t oem_id_gpios[] = {<br>+              GPIO_OEM_ID1,<br>+                GPIO_OEM_ID2,<br>+                GPIO_OEM_ID3,<br>+        };<br>+   if (board_oem_id < 0)<br>+             board_oem_id = gpio_base2_value(oem_id_gpios,<br>+                                                ARRAY_SIZE(oem_id_gpios));<br>+   return board_oem_id;<br>+}<br>+<br>+const char *smbios_mainboard_sku(void)<br>+{<br>+     static char sku_str[7]; /* sku{0..255} */<br>+<br>+ snprintf(sku_str, sizeof(sku_str), "sku%d", variant_oem_id());<br>+<br>+  return sku_str;<br>+}<br>+<br> static void mainboard_init(device_t dev)<br> {<br>         mainboard_ec_init();<br></pre><p>To view, visit <a href="https://review.coreboot.org/22557">change 22557</a>. To unsubscribe, 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/22557"/><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-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I42e293e833b0f7c9870dc275561ad13256836e60 </div>
<div style="display:none"> Gerrit-Change-Number: 22557 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Shelley Chen <shchen@google.com> </div>