blob: dc845bcb7faabf603cf9640eef37547c857db882 [file] [log] [blame]
Furquan Shaikh9bfd8142017-12-04 20:16:55 -08001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright 2017 Google Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#include <baseboard/variants.h>
17
18/* DQ byte map */
19static const u8 dq_map[][12] = {
20 { 0x0F, 0xF0, 0x00, 0xF0, 0x0F, 0xF0,
21 0x0F, 0x00, 0xFF, 0x00, 0xFF, 0x00 },
22 { 0x33, 0xCC, 0x00, 0xCC, 0x33, 0xCC,
23 0x33, 0x00, 0xFF, 0x00, 0xFF, 0x00 }
24};
25
26/* DQS CPU<>DRAM map */
27static const u8 dqs_map[][8] = {
28 { 0, 1, 3, 2, 4, 5, 6, 7 },
29 { 1, 0, 4, 5, 2, 3, 6, 7 },
30};
31
32/* Rcomp resistor */
33static const u16 rcomp_resistor[] = { 200, 81, 162 };
34
35/* Rcomp target */
36static const u16 rcomp_target[] = { 100, 40, 40, 23, 40 };
37
38void variant_memory_params(struct memory_params *p)
39{
Furquan Shaikh48be29e2017-12-05 14:48:44 -080040 p->type = MEMORY_LPDDR3;
Furquan Shaikh9bfd8142017-12-04 20:16:55 -080041 p->dq_map = dq_map;
42 p->dq_map_size = sizeof(dq_map);
43 p->dqs_map = dqs_map;
44 p->dqs_map_size = sizeof(dqs_map);
45 p->rcomp_resistor = rcomp_resistor;
46 p->rcomp_resistor_size = sizeof(rcomp_resistor);
47 p->rcomp_target = rcomp_target;
48 p->rcomp_target_size = sizeof(rcomp_target);
49}