<p>Martin Roth has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/23228">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">mainboard/google/kahlee: Finish GPIO90 setup for Grunt<br><br>GPIO 90 is being used as a GPIO.  The IOMUX register is set correctly,<br>but these additional registers need to be set to use it as a GPIO.<br>- Split structures into variant specific versions.  These will be<br>moved into the variant tree in a follow-on patch<br>- Set GENINT_DISABLE bit<br>- Disable interrupts for this GPIO.<br><br>BUG=b:71867096<br>TEST=Build and boot grunt.  Verify registers are set correctly.<br><br>Change-Id: I4b8d12720167b298ee6e0acf80edf414539975b0<br>Signed-off-by: Martin Roth <martinroth@google.com><br>---<br>M src/mainboard/google/kahlee/mainboard.c<br>1 file changed, 46 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/28/23228/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/mainboard/google/kahlee/mainboard.c b/src/mainboard/google/kahlee/mainboard.c</span><br><span>index 0954a29..b080682 100644</span><br><span>--- a/src/mainboard/google/kahlee/mainboard.c</span><br><span>+++ b/src/mainboard/google/kahlee/mainboard.c</span><br><span>@@ -39,6 +39,9 @@</span><br><span>  * These values are used by the PCI configuration space,</span><br><span>  * MP Tables.  TODO: Make ACPI use these values too.</span><br><span>  */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+// TODO: Move these to board variant specific file</span><br><span style="color: hsl(120, 100%, 40%);">+#if IS_ENABLED(CONFIG_BOARD_GOOGLE_KAHLEE)</span><br><span> const u8 mainboard_picr_data[] = {</span><br><span>  [0x00] = 0x03, 0x04, 0x05, 0x07, 0x0B, 0x0A, 0x1F, 0x1F,</span><br><span>     [0x08] = 0xFA, 0xF1, 0x00, 0x00, 0x1F, 0x1F, 0x1F, 0x1F,</span><br><span>@@ -76,7 +79,45 @@</span><br><span>        [0x70] = 0x03, 0x0F, 0x06, 0x0E, 0x0A, 0x0B, 0x1F, 0x1F,</span><br><span>     [0x78] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,</span><br><span> };</span><br><span style="color: hsl(120, 100%, 40%);">+#else</span><br><span style="color: hsl(120, 100%, 40%);">+const u8 mainboard_picr_data[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+     [0x00] = 0x03, 0x04, 0x05, 0x07, 0x0B, 0x1F, 0x1F, 0x1F,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x08] = 0xFA, 0xF1, 0x00, 0x00, 0x1F, 0x1F, 0x1F, 0x1F,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x10] = 0x1F, 0x1F, 0x1F, 0x03, 0x1F, 0x1F, 0x1F, 0x1F,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x18] = 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x20] = 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00, 0x00,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x28] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x30] = 0x05, 0x04, 0x05, 0x04, 0x04, 0x05, 0x04, 0x05,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x38] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x40] = 0x04, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x48] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x50] = 0x03, 0x04, 0x05, 0x07, 0x1F, 0x1F, 0x1F, 0x1F,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x58] = 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x60] = 0x1F, 0x1F, 0x07, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x68] = 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x70] = 0x03, 0x0F, 0x06, 0x0E, 0x0A, 0x0B, 0x1F, 0x1F,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x78] = 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F,</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+const u8 mainboard_intr_data[] = {</span><br><span style="color: hsl(120, 100%, 40%);">+  [0x00] = 0x10, 0x11, 0x12, 0x13, 0x14, 0x1F, 0x16, 0x17,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x08] = 0x00, 0x00, 0x00, 0x00, 0x1F, 0x1F, 0x1F, 0x1F,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x10] = 0x09, 0x1F, 0x1F, 0x10, 0x1F, 0x1F, 0x1F, 0x10,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x18] = 0x1F, 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x20] = 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00, 0x00,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x28] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x30] = 0x12, 0x11, 0x12, 0x11, 0x12, 0x11, 0x12, 0x00,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x38] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x40] = 0x11, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x48] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x50] = 0x1F, 0x1F, 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x00,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x58] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x60] = 0x1F, 0x1F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x68] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x70] = 0x03, 0x0F, 0x06, 0x0E, 0x0A, 0x0B, 0x1F, 0x1F,</span><br><span style="color: hsl(120, 100%, 40%);">+      [0x78] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span> /* PIRQ Setup */</span><br><span> static void pirq_setup(void)</span><br><span> {</span><br><span>@@ -96,6 +137,11 @@</span><br><span> </span><br><span>      gpes = get_gpe_table(&num);</span><br><span>      gpe_configure_sci(gpes, num);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       /* Set GenIntDisable so that GPIO 90 is configured as a GPIO. */</span><br><span style="color: hsl(120, 100%, 40%);">+      if (!IS_ENABLED(CONFIG_BOARD_GOOGLE_KAHLEE))</span><br><span style="color: hsl(120, 100%, 40%);">+          pm_write8(PM_PCIB_CFG,</span><br><span style="color: hsl(120, 100%, 40%);">+                                pm_read8(PM_PCIB_CFG) | PM_GENINT_DISABLE);</span><br><span> }</span><br><span> </span><br><span> /*************************************************</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/23228">change 23228</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/23228"/><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: I4b8d12720167b298ee6e0acf80edf414539975b0 </div>
<div style="display:none"> Gerrit-Change-Number: 23228 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Martin Roth <martinroth@google.com> </div>