<p>Marc Jones has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/20276">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">google/kahlee: Add ec and gnvs ACPI<br><br>Add ACPI support for the Google EC, which requires gnvs support<br>for passing information from the EC to firmware and OS.<br><br>Change-Id: I0a308bcd608a135cc9633273a05527f020b60743<br>Signed-off-by: Marc Jones <marc.jones@scarletltd.com><br>---<br>A src/mainboard/google/kahlee/acpi/ec.asl<br>A src/mainboard/google/kahlee/acpi/superio.asl<br>M src/mainboard/google/kahlee/dsdt.asl<br>M src/mainboard/google/kahlee/ec.c<br>M src/mainboard/google/kahlee/ec.h<br>5 files changed, 62 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/76/20276/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/mainboard/google/kahlee/acpi/ec.asl b/src/mainboard/google/kahlee/acpi/ec.asl<br>new file mode 100644<br>index 0000000..8f59cb5<br>--- /dev/null<br>+++ b/src/mainboard/google/kahlee/acpi/ec.asl<br>@@ -0,0 +1,28 @@<br>+/*<br>+ * This file is part of the coreboot project.<br>+ *<br>+ * Copyright (C) 2014 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>+/* mainboard configuration */<br>+#include "ec.h"<br>+<br>+/* Enable LID switch and provide wake pin for EC */<br>+#define EC_ENABLE_LID_SWITCH<br>+/*<br>+ * There is no GPIO for LID, the EC pulses WAKE# pin instead.<br>+ * There is no GPE for WAKE#, so fake it with PCI_EXP_WAKE.<br>+ */<br>+#define EC_ENABLE_WAKE_PIN 0x69<br>+<br>+/* ACPI code for EC functions */<br>+#include <ec/google/chromeec/acpi/ec.asl><br>diff --git a/src/mainboard/google/kahlee/acpi/superio.asl b/src/mainboard/google/kahlee/acpi/superio.asl<br>new file mode 100644<br>index 0000000..b3e9afc<br>--- /dev/null<br>+++ b/src/mainboard/google/kahlee/acpi/superio.asl<br>@@ -0,0 +1,25 @@<br>+/*<br>+ * This file is part of the coreboot project.<br>+ *<br>+ * Copyright (C) 2014 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>+/* mainboard configuration */<br>+#include <mainboard/google/kahlee/ec.h><br>+<br>+#define SIO_EC_MEMMAP_ENABLE     // EC Memory Map Resources<br>+#define SIO_EC_HOST_ENABLE       // EC Host Interface Resources<br>+#define SIO_EC_ENABLE_PS2K       // Enable PS/2 Keyboard<br>+#define SIO_EC_ENABLE_COM1       // Enable Serial Port 1<br>+<br>+/* ACPI code for EC SuperIO functions */<br>+#include <ec/google/chromeec/acpi/superio.asl><br>diff --git a/src/mainboard/google/kahlee/dsdt.asl b/src/mainboard/google/kahlee/dsdt.asl<br>index 871fcd2..1239f57 100644<br>--- a/src/mainboard/google/kahlee/dsdt.asl<br>+++ b/src/mainboard/google/kahlee/dsdt.asl<br>@@ -23,7 +23,11 @@<br>  0x00010001      /* OEM Revision */<br>    )<br> {   /* Start of ASL file */<br>-      /* #include <arch/x86/acpi/debug.asl> */  /* Include global debug methods if needed */<br>+ /* Include global debug methods if needed */<br>+ /* #include <arch/x86/acpi/debug.asl> */<br>+<br>+    /* global NVS and variables */<br>+       #include <soc/intel/broadwell/acpi/globalnvs.asl><br> <br>    /* Globals for the platform */<br>        #include "acpi/mainboard.asl"<br>@@ -74,6 +78,9 @@<br> <br>         } /* End \_SB scope */<br> <br>+    /* Chrome OS specific */<br>+     #include <vendorcode/google/chromeos/acpi/chromeos.asl><br>+<br>      /* Describe SMBUS for the Southbridge */<br>      #include <soc/amd/stoneyridge/acpi/smbus.asl><br> <br>diff --git a/src/mainboard/google/kahlee/ec.c b/src/mainboard/google/kahlee/ec.c<br>index da0f855..71c6e10 100644<br>--- a/src/mainboard/google/kahlee/ec.c<br>+++ b/src/mainboard/google/kahlee/ec.c<br>@@ -15,6 +15,7 @@<br> <br> #include <arch/acpi.h><br> #include <console/console.h><br>+#include <ec/google/chromeec/ec.h><br> #include "ec.h"<br> #include <rules.h><br> #include <soc/hudson.h><br>diff --git a/src/mainboard/google/kahlee/ec.h b/src/mainboard/google/kahlee/ec.h<br>index bf4e3ad..6340b69 100644<br>--- a/src/mainboard/google/kahlee/ec.h<br>+++ b/src/mainboard/google/kahlee/ec.h<br>@@ -17,7 +17,6 @@<br> #define MAINBOARD_EC_H<br> <br> #include <ec/ec.h><br>-#include <ec/google/chromeec/ec.h><br> #include <ec/google/chromeec/ec_commands.h><br> <br> /* GPIO_S0_000 is EC_SCI#, but it is bit 24 in GPE_STS */<br></pre><p>To view, visit <a href="https://review.coreboot.org/20276">change 20276</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/20276"/><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: I0a308bcd608a135cc9633273a05527f020b60743 </div>
<div style="display:none"> Gerrit-Change-Number: 20276 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Marc Jones <marc@marcjonesconsulting.com> </div>