<p>Furquan Shaikh has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/22779">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">mb/google/poppy/variants/name: Implement variant_memory_params<br><br>This change provides implementation of variant_memory_params for<br>nami. Since it uses DDR4 memory, DQ-DQS mapping table is not<br>required. Also, Rcomp resistor values are provided based on SDP v/s<br>DDP memory.<br><br>BUG=b:70188937<br><br>Change-Id: Ic1d0cfdb7d8b02fa0be0a4c54b20057a4c2fc3ce<br>Signed-off-by: Furquan Shaikh <furquan@chromium.org><br>---<br>M src/mainboard/google/poppy/variants/nami/Makefile.inc<br>A src/mainboard/google/poppy/variants/nami/memory.c<br>2 files changed, 50 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/79/22779/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/mainboard/google/poppy/variants/nami/Makefile.inc b/src/mainboard/google/poppy/variants/nami/Makefile.inc<br>index 0050a3b..bbcb7d3 100644<br>--- a/src/mainboard/google/poppy/variants/nami/Makefile.inc<br>+++ b/src/mainboard/google/poppy/variants/nami/Makefile.inc<br>@@ -3,5 +3,7 @@<br> <br> bootblock-y += gpio.c<br> <br>+romstage-y += memory.c<br>+<br> ramstage-y += gpio.c<br> ramstage-y += pl2.c<br>diff --git a/src/mainboard/google/poppy/variants/nami/memory.c b/src/mainboard/google/poppy/variants/nami/memory.c<br>new file mode 100644<br>index 0000000..dec7626<br>--- /dev/null<br>+++ b/src/mainboard/google/poppy/variants/nami/memory.c<br>@@ -0,0 +1,48 @@<br>+/*<br>+ * This file is part of the coreboot project.<br>+ *<br>+ * Copyright 2017 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>+#include <baseboard/variants.h><br>+#include <string.h><br>+<br>+/* Rcomp resistor */<br>+static const u16 rcomp_resistor_ddp[] = { 121, 81, 100 };<br>+static const u16 rcomp_resistor_sdp[] = { 200, 81, 100 };<br>+<br>+/* Rcomp target */<br>+static const u16 rcomp_target[] = { 100, 40, 20, 20, 26 };<br>+<br>+/* Memory ids are 1-indexed, so subtract 1 to use 0-indexed values in bitmap. */<br>+#define MEM_ID(x)    (1 << ((x) - 1))<br>+<br>+/* Bitmap to indicate which memory ids are using DDP. */<br>+static const uint16_t ddp_bitmap = MEM_ID(4);<br>+<br>+void variant_memory_params(struct memory_params *p)<br>+{<br>+    memset(p, 0, sizeof(*p));<br>+    p->type = MEMORY_DDR4;<br>+<br>+ /* Rcomp resistor values are different for SDP and DDP. */<br>+   if (ddp_bitmap & MEM_ID(variant_memory_sku())) {<br>+         p->rcomp_resistor = rcomp_resistor_ddp;<br>+           p->rcomp_resistor_size = sizeof(rcomp_resistor_ddp);<br>+      } else {<br>+             p->rcomp_resistor = rcomp_resistor_sdp;<br>+           p->rcomp_resistor_size = sizeof(rcomp_resistor_sdp);<br>+      }<br>+<br>+ p->rcomp_target = rcomp_target;<br>+   p->rcomp_target_size = sizeof(rcomp_target);<br>+}<br></pre><p>To view, visit <a href="https://review.coreboot.org/22779">change 22779</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/22779"/><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: Ic1d0cfdb7d8b02fa0be0a4c54b20057a4c2fc3ce </div>
<div style="display:none"> Gerrit-Change-Number: 22779 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Furquan Shaikh <furquan@google.com> </div>