<p>Kamil Wcisło has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21983">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">drivers/pc80/tpm: add support for SLB9665 TPM2.0 module<br><br>SLB9665 are not initialized correctly. Add support for the TPM2.0<br>startup sequence and correctly identify the chip.<br><br>Change-Id: Ic20b9a65ef6a4ee392a9352f7c9bf01b2496f482<br>Signed-off-by: Kamil Wcislo <kamil.wcislo@3mdeb.com><br>---<br>M src/drivers/pc80/tpm/romstage.c<br>M src/drivers/pc80/tpm/tpm.c<br>2 files changed, 17 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/83/21983/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/drivers/pc80/tpm/romstage.c b/src/drivers/pc80/tpm/romstage.c<br>index 5531458..95e65f2 100644<br>--- a/src/drivers/pc80/tpm/romstage.c<br>+++ b/src/drivers/pc80/tpm/romstage.c<br>@@ -48,6 +48,12 @@<br> <br> static const struct {<br>   u8 buffer[12];<br>+} tpm2_startup_cmd = {<br>+      {0x80, 0x01, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x01, 0x44, 0x0, 0x0 }<br>+};<br>+<br>+static const struct {<br>+    u8 buffer[12];<br> } tpm_deactivate_cmd = {<br>     {0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0x99, 0x0, 0x3 }<br> };<br>@@ -229,9 +235,15 @@<br>                    return;<br>               }<br>     } else {<br>-             printk(BIOS_SPEW, "TPM: Startup\n");<br>-               result = TlclSendReceive(tpm_startup_cmd.buffer,<br>-                                     response, sizeof(response));<br>+         if (IS_ENABLED(CONFIG_TPM2)) {<br>+                       printk(BIOS_SPEW, "TPM2: Startup\n");<br>+                      result = TlclSendReceive(tpm2_startup_cmd.buffer,<br>+                                            response, sizeof(response));<br>+         } else {<br>+                     printk(BIOS_SPEW, "TPM: Startup\n");<br>+                       result = TlclSendReceive(tpm_startup_cmd.buffer,<br>+                                             response, sizeof(response));<br>+         }<br>     }<br> <br>  tis_close();<br>diff --git a/src/drivers/pc80/tpm/tpm.c b/src/drivers/pc80/tpm/tpm.c<br>index c0afd4c..d25cee0 100644<br>--- a/src/drivers/pc80/tpm/tpm.c<br>+++ b/src/drivers/pc80/tpm/tpm.c<br>@@ -125,10 +125,11 @@<br> <br> static const struct device_name infineon_devices[] = {<br>      {0x000b, "SLB9635 TT 1.2"},<br>-        {0x001a, "SLB9660 TT 1.2"},<br> #if IS_ENABLED(CONFIG_TPM2)<br>+  {0x001a, "SLB9665 TT 2.0"},<br>         {0x001b, "SLB9670 TT 2.0"},<br> #else<br>+        {0x001a, "SLB9660 TT 1.2"},<br>         {0x001b, "SLB9670 TT 1.2"},<br> #endif<br>        {0xffff}<br></pre><p>To view, visit <a href="https://review.coreboot.org/21983">change 21983</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/21983"/><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: Ic20b9a65ef6a4ee392a9352f7c9bf01b2496f482 </div>
<div style="display:none"> Gerrit-Change-Number: 21983 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Kamil Wcisło <kamil.wcislo@3mdeb.com> </div>