Skip to content

Commit

Permalink
mb/google/poppy/vr/atlas: Add a W/A for Samsung memory init error
Browse files Browse the repository at this point in the history
This patch adds a workaround for Samsung C-die 2G/4G memory chips.
For unknown reasons, some boards with Samsung LP3 memory chips
could not pass early CS/CMD training. MRC has to change the
granularity from 16 ticks to 8 ticks, which implies bad margin
with this memory chip. Another way is to enhance the drive
strength for CS. This patch is to enhance the drive strength for CS
and CMD. Enhancing the drive strength for CMD could gain margin abaout
3 more ticks. Root cause needs to be further investigated with memory
vendor.

BUG=b:131177542
BRANCH=None
TEST=USE=fw_debug emerge-atlas chromeos-mrc coreboot chromeos-bootimage
     & check the MRC log to ensure correct Rcomp values are passed to
     MRC. Tested with board ID #8 and #11.

Change-Id: I9ea3ceda8dc8bf781063d3c16c7c2d9b44e5ddd6
Signed-off-by: Gaggery Tsai <[email protected]>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32695
Tested-by: build bot (Jenkins) <[email protected]>
Reviewed-by: Caveh Jalali <[email protected]>
  • Loading branch information
TsaiGaggery authored and furquan-goog committed May 14, 2019
1 parent 97e9e56 commit d1ad378
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/mainboard/google/poppy/variants/atlas/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
* GNU General Public License for more details.
*/

#include <assert.h>
#include <baseboard/variants.h>

#define SAMSUNG_C_DIE_2G 10
#define SAMSUNG_C_DIE_4G 11
/* DQ byte map */
static const u8 dq_map[][12] = {
{ 0x0F, 0xF0, 0x00, 0xF0, 0x0F, 0xF0,
Expand All @@ -34,16 +37,24 @@ static const u16 rcomp_resistor[] = { 200, 81, 162 };

/* Rcomp target */
static const u16 rcomp_target[] = { 100, 40, 40, 23, 40 };
static const u16 rcomp_target_samsung_c_die[] = { 100, 40, 35, 18, 40 };

void variant_memory_params(struct memory_params *p)
{
int spd_index;

p->type = MEMORY_LPDDR3;
p->dq_map = dq_map;
p->dq_map_size = sizeof(dq_map);
p->dqs_map = dqs_map;
p->dqs_map_size = sizeof(dqs_map);
p->rcomp_resistor = rcomp_resistor;
p->rcomp_resistor_size = sizeof(rcomp_resistor);
p->rcomp_target = rcomp_target;
spd_index = variant_memory_sku();
assert(spd_index >= 0);
if (spd_index == SAMSUNG_C_DIE_2G || spd_index == SAMSUNG_C_DIE_4G)
p->rcomp_target = rcomp_target_samsung_c_die;
else
p->rcomp_target = rcomp_target;
p->rcomp_target_size = sizeof(rcomp_target);
}

0 comments on commit d1ad378

Please sign in to comment.