<p>Martin Roth has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/22373">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">mainboard/google/kahlee: Add baseboard framework<br><br>BUG=b:68293392<br>TEST=Build only<br><br>Change-Id: Ie4d039b4da10a992fc9dd2b0221fd4a1644aae6a<br>Signed-off-by: Martin Roth <martinroth@google.com><br>---<br>A src/mainboard/google/kahlee/variants/baseboard/Makefile.inc<br>A src/mainboard/google/kahlee/variants/baseboard/gpio.c<br>A src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/usb_oc.asl<br>M src/mainboard/google/kahlee/variants/baseboard/include/baseboard/gpio.h<br>A src/mainboard/google/kahlee/variants/baseboard/memory.c<br>5 files changed, 124 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/73/22373/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/mainboard/google/kahlee/variants/baseboard/Makefile.inc b/src/mainboard/google/kahlee/variants/baseboard/Makefile.inc<br>new file mode 100644<br>index 0000000..94f3889<br>--- /dev/null<br>+++ b/src/mainboard/google/kahlee/variants/baseboard/Makefile.inc<br>@@ -0,0 +1,22 @@<br>+#<br>+# This file is part of the coreboot project.<br>+#<br>+# Copyright (C) 2017 Google, Inc.<br>+#<br>+# This program is free software; you can redistribute it and/or modify<br>+# it under the terms of the GNU General Public License as published by<br>+# the Free Software Foundation; version 2 of the License.<br>+#<br>+# This program is distributed in the hope that it will be useful,<br>+# but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>+# GNU General Public License for more details.<br>+#<br>+<br>+bootblock-y += gpio.c<br>+<br>+romstage-y += gpio.c<br>+romstage-y += memory.c<br>+<br>+ramstage-y += gpio.c<br>+ramstage-y += memory.c<br>diff --git a/src/mainboard/google/kahlee/variants/baseboard/gpio.c b/src/mainboard/google/kahlee/variants/baseboard/gpio.c<br>new file mode 100644<br>index 0000000..cb71097<br>--- /dev/null<br>+++ b/src/mainboard/google/kahlee/variants/baseboard/gpio.c<br>@@ -0,0 +1,41 @@<br>+/*<br>+ * This file is part of the coreboot project.<br>+ *<br>+ * Copyright (C) 2017 Advanced Micro Devices, Inc.<br>+ *<br>+ * This program is free software; you can redistribute it and/or modify<br>+ * it under the terms of the GNU General Public License as published by<br>+ * the Free Software Foundation; version 2 of the License.<br>+ *<br>+ * This program is distributed in the hope that it will be useful,<br>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>+ * GNU General Public License for more details.<br>+ */<br>+<br>+#include <AGESA.h><br>+#include <FchPlatform.h><br>+#include <mainboard.h><br>+#include <soc/smi.h><br>+#include <soc/southbridge.h><br>+#include <stdlib.h><br>+<br>+const GPIO_CONTROL  __attribute__((weak)) agesa_board_gpios[] = {<br>+<br>+      {-1}<br>+};<br>+<br>+/*<br>+ * GPE setup table must match ACPI GPE ASL<br>+ *  { gevent, gpe, direction, level }<br>+ */<br>+static const struct sci_source gpe_table[] = {<br>+<br>+<br>+};<br>+<br>+const __attribute__((weak)) struct sci_source *get_gpe_table(size_t *num)<br>+{<br>+  *num = ARRAY_SIZE(gpe_table);<br>+        return gpe_table;<br>+}<br>diff --git a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/usb_oc.asl b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/usb_oc.asl<br>new file mode 100644<br>index 0000000..72f26d8<br>--- /dev/null<br>+++ b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/usb_oc.asl<br>@@ -0,0 +1,29 @@<br>+/*<br>+ * This file is part of the coreboot project.<br>+ *<br>+ * Copyright (C) 2015 Advanced Micro Devices, Inc.<br>+ * Copyright (C) 2013 Sage Electronic Engineering, LLC<br>+ *<br>+ * This program is free software; you can redistribute it and/or modify<br>+ * it under the terms of the GNU General Public License as published by<br>+ * the Free Software Foundation; version 2 of the License.<br>+ *<br>+ * This program is distributed in the hope that it will be useful,<br>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>+ * GNU General Public License for more details.<br>+ */<br>+<br>+/* USB overcurrent mapping pins.   */<br>+Name (UOM0, 0)<br>+Name (UOM1, 0)<br>+Name (UOM2, 0)<br>+Name (UOM3, 0)<br>+Name (UOM4, 0)<br>+Name (UOM5, 0)<br>+Name (UOM6, 0)<br>+Name (UOM7, 0)<br>+Name (UOM8, 0)<br>+Name (UOM9, 0)<br>+<br>+/* USB Overcurrent GPEs */<br>diff --git a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/gpio.h b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/gpio.h<br>index 5aca3e8..a936061 100644<br>--- a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/gpio.h<br>+++ b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/gpio.h<br>@@ -25,8 +25,8 @@<br> # define MEM_CONFIG3               GPIO_0<br> <br> /* SPI Write protect */<br>-#define CROS_WP_GPIO              GPIO_0<br>-#define GPIO_EC_IN_RW          GPIO_0<br>+#define CROS_WP_GPIO           0<br>+#define GPIO_EC_IN_RW               0<br> <br> #endif /* _ACPI__ */<br> <br>diff --git a/src/mainboard/google/kahlee/variants/baseboard/memory.c b/src/mainboard/google/kahlee/variants/baseboard/memory.c<br>new file mode 100644<br>index 0000000..511241f<br>--- /dev/null<br>+++ b/src/mainboard/google/kahlee/variants/baseboard/memory.c<br>@@ -0,0 +1,30 @@<br>+/*<br>+ * This file is part of the coreboot project.<br>+ *<br>+ * Copyright 2017 Google Inc.<br>+ *<br>+ * This program is free software; you can redistribute it and/or modify<br>+ * it under the terms of the GNU General Public License as published by<br>+ * the Free Software Foundation; version 2 of the License.<br>+ *<br>+ * This program is distributed in the hope that it will be useful,<br>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>+ * GNU General Public License for more details.<br>+ */<br>+<br>+#include <gpio.h> /* src/include/gpio.h */<br>+#include <baseboard/variants.h><br>+#include <variant/gpio.h><br>+<br>+size_t __attribute__((weak)) variant_board_id(void)<br>+{<br>+   gpio_t pads[] = {<br>+            [3] = MEM_CONFIG3,<br>+           [2] = MEM_CONFIG2,<br>+           [1] = MEM_CONFIG1,<br>+           [0] = MEM_CONFIG0,<br>+   };<br>+<br>+        return gpio_pullup_base2_value(pads, ARRAY_SIZE(pads));<br>+}<br></pre><p>To view, visit <a href="https://review.coreboot.org/22373">change 22373</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/22373"/><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: Ie4d039b4da10a992fc9dd2b0221fd4a1644aae6a </div>
<div style="display:none"> Gerrit-Change-Number: 22373 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Martin Roth <martinroth@google.com> </div>