<p>Shelley Chen has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/20420">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">google/fizz: Override PL2 and SysPL2 values<br><br>Set PL2 and SysPL2 for Fizz based on cpu id.<br><br>BUG=b:7473486, b:35775024<br>BRANCH=None<br>TEST=On bootup make sure PL2 and PsysPL2 values set<br>     properly (through debug output)<br><br>Change-Id: I5c46667fdae9d8eed5346a481753bb69f98a071b<br>Signed-off-by: Shelley Chen <shchen@chromium.org><br>---<br>M src/mainboard/google/fizz/devicetree.cb<br>M src/mainboard/google/fizz/mainboard.c<br>2 files changed, 37 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/20420/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/mainboard/google/fizz/devicetree.cb b/src/mainboard/google/fizz/devicetree.cb<br>index a493de5..d0bddba 100644<br>--- a/src/mainboard/google/fizz/devicetree.cb<br>+++ b/src/mainboard/google/fizz/devicetree.cb<br>@@ -210,7 +210,6 @@<br>      }"<br> <br>    register "speed_shift_enable" = "1"<br>-      register "tdp_pl2_override" = "7"<br>         register "tcc_offset" = "10"     # TCC of 90C<br> <br>  # Use default SD card detect GPIO configuration<br>diff --git a/src/mainboard/google/fizz/mainboard.c b/src/mainboard/google/fizz/mainboard.c<br>index a925f08..75132bb 100644<br>--- a/src/mainboard/google/fizz/mainboard.c<br>+++ b/src/mainboard/google/fizz/mainboard.c<br>@@ -17,6 +17,8 @@<br> #include <console/console.h><br> #include <device/device.h><br> #include <ec/ec.h><br>+#include <intelblocks/mp_init.h><br>+#include <soc/cpu.h><br> #include <soc/pci_devs.h><br> #include <soc/nhlt.h><br> #include <vendorcode/google/chromeos/chromeos.h><br>@@ -24,6 +26,41 @@<br> static const char *oem_id = "GOOGLE";<br> static const char *oem_table_id = "FIZZ";<br> <br>+/*<br>+ * mainboard_get_pl2<br>+ *<br>+ * @return value Pl2 should be set to based on cpu id<br>+ *<br>+ * NOTE: This is purely based on cpu id, which only work for the<br>+ * current build because we have a different cpu id per sku.  However,<br>+ * on the next build, we'll have distinct board ids per sku.  We'll<br>+ * need to modify that at this point.<br>+ */<br>+u32 mainboard_get_pl2(void)<br>+{<br>+     struct cpuid_result cpuidr;<br>+<br>+       cpuidr = cpuid(1);<br>+   printk(BIOS_DEBUG, "CPU(1): 0x%x\n", cpuidr.eax);<br>+  if (cpuidr.eax == CPUID_KABYLAKE_Y0) {<br>+               /* i7 needs higher pl2 */<br>+            return 44;<br>+   }<br>+    return 29;<br>+}<br>+<br>+/*<br>+ * mainboard_get_psyspl2<br>+ *<br>+ * This is 90 Watts across all SKUs for Fizz<br>+ *<br>+ * @return value PsysPl2 should be set to<br>+ */<br>+u32 mainboard_get_psyspl2(void)<br>+{<br>+   return 90;<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/20420">change 20420</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/20420"/><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: I5c46667fdae9d8eed5346a481753bb69f98a071b </div>
<div style="display:none"> Gerrit-Change-Number: 20420 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Shelley Chen <shchen@google.com> </div>