<p>Marc Jones has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21614">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">google/kahlee: Fix GPIO ASL<br><br>Use a single define and set the CROS GPIO ASL device to match the<br>StoneyRidge GPIO HID. Pass the GPIO number and not the memory mapped address<br>of the GPIO. Also, add a DDN field in the GPIO ASL.<br><br>BUG=b:65597554<br>BRANCH=none<br>TEST=grep ^ /sys/devices/platform/chromeos_acpi/GPIO.*/* reports AMD0030.<br><br>Change-Id: I1d6c42c6c9a0eef25e0e99aed6d838c767f5e01f<br>Signed-off-by: Marc Jones <marcj303@gmail.com><br>---<br>M src/mainboard/google/kahlee/acpi/carrizo_fch.asl<br>M src/mainboard/google/kahlee/chromeos.c<br>M src/soc/amd/stoneyridge/include/soc/gpio.h<br>3 files changed, 15 insertions(+), 9 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/14/21614/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/mainboard/google/kahlee/acpi/carrizo_fch.asl b/src/mainboard/google/kahlee/acpi/carrizo_fch.asl<br>index 04f563e..9bf7dec 100644<br>--- a/src/mainboard/google/kahlee/acpi/carrizo_fch.asl<br>+++ b/src/mainboard/google/kahlee/acpi/carrizo_fch.asl<br>@@ -13,6 +13,8 @@<br>  * GNU General Public License for more details.<br>  */<br> <br>+#include <soc/gpio.h><br>+<br> Device (AAHB)<br> {<br>   Name (_HID, "AAHB0000")<br>@@ -30,9 +32,10 @@<br> <br> Device (GPIO)<br> {<br>- Name (_HID, "AMD0030")<br>-     Name (_CID, "AMD0030")<br>-     Name(_UID, 0)<br>+        Name (_HID, GPIO_DEVICE_NAME)<br>+        Name (_CID, GPIO_DEVICE_NAME)<br>+        Name (_UID, 0)<br>+       Name (_DDN, GPIO_DEVICE_DESC)<br> <br>      Name (_CRS, ResourceTemplate()<br>        {<br>diff --git a/src/mainboard/google/kahlee/chromeos.c b/src/mainboard/google/kahlee/chromeos.c<br>index 156614b..ef471be 100644<br>--- a/src/mainboard/google/kahlee/chromeos.c<br>+++ b/src/mainboard/google/kahlee/chromeos.c<br>@@ -21,7 +21,8 @@<br> #include <gpio.h><br> <br> /* SPI Write protect */<br>-#define CROS_WP_GPIO     GPIO_122<br>+#define CROS_WP_GPIO         GPIO_122<br>+#define CROS_WP_GPIO_NUMBER  122<br> <br> void fill_lb_gpios(struct lb_gpios *gpios)<br> {<br>@@ -40,8 +41,8 @@<br> }<br> <br> static const struct cros_gpio cros_gpios[] = {<br>-   CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, CROS_GPIO_DEVICE_NAME),<br>-  CROS_GPIO_WP_AH(CROS_WP_GPIO, CROS_GPIO_DEVICE_NAME),<br>+        CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, GPIO_DEVICE_NAME),<br>+       CROS_GPIO_WP_AH(CROS_WP_GPIO_NUMBER, GPIO_DEVICE_NAME),<br> };<br> <br> void mainboard_chromeos_acpi_generate(void)<br>diff --git a/src/soc/amd/stoneyridge/include/soc/gpio.h b/src/soc/amd/stoneyridge/include/soc/gpio.h<br>index c5b7c8a..5aa6248 100644<br>--- a/src/soc/amd/stoneyridge/include/soc/gpio.h<br>+++ b/src/soc/amd/stoneyridge/include/soc/gpio.h<br>@@ -16,10 +16,12 @@<br> #ifndef __STONEYRIDGE_GPIO_H__<br> #define __STONEYRIDGE_GPIO_H__<br> <br>+#define GPIO_DEVICE_NAME     "AMD0030"<br>+#define GPIO_DEVICE_DESC  "GPIO Controller"<br>+<br>+#ifndef __ACPI__<br> #include <soc/amd/common/amd_defs.h><br> #include <types.h><br>-<br>-#define CROS_GPIO_DEVICE_NAME    "AmdKern"<br> <br> #define GPIO_PIN_STS           (1 << 16)<br> #define GPIO_PULLUP_ENABLE    (1 << 20)<br>@@ -128,5 +130,5 @@<br> #define   GPIO_148       (GPIO_BANK2_CONTROL + 0x50)<br> <br> typedef uint32_t gpio_t;<br>-<br>+#endif /* __ACPI__ */<br> #endif /* __STONEYRIDGE_GPIO_H__ */<br></pre><p>To view, visit <a href="https://review.coreboot.org/21614">change 21614</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/21614"/><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: I1d6c42c6c9a0eef25e0e99aed6d838c767f5e01f </div>
<div style="display:none"> Gerrit-Change-Number: 21614 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Marc Jones <marc@marcjonesconsulting.com> </div>