coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
memory.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <baseboard/variants.h>
4
#include <baseboard/gpio.h>
5
#include <
soc/cnl_memcfg_init.h
>
6
#include <
string.h
>
7
8
static
const
struct
cnl_mb_cfg
baseboard_memcfg
= {
9
/*
10
* The dqs_map arrays map the SoC pins to the lpddr3 pins
11
* for both channels.
12
*
13
* "The index of the array is CPU byte number, the values are DRAM byte
14
* numbers." - doc #573387
15
*
16
* the index = pin number on SoC
17
* the value = pin number on lpddr3 part
18
*/
19
.
dqs_map
[
DDR_CH0
] = {0, 1, 3, 2, 5, 7, 6, 4},
20
.dqs_map[
DDR_CH1
] = {1, 3, 2, 0, 5, 7, 6, 4},
21
22
.dq_map[
DDR_CH0
] = {
23
{0xf, 0xf0},
24
{0x0, 0xf0},
25
{0xf, 0xf0},
26
{0xf, 0x0},
27
{0xff, 0x0},
28
{0xff, 0x0}
29
},
30
.dq_map[
DDR_CH1
] = {
31
{0xf, 0xf0},
32
{0x0, 0xf0},
33
{0xf, 0xf0},
34
{0xf, 0x0},
35
{0xff, 0x0},
36
{0xff, 0x0}
37
},
38
39
/* Nightfury uses 200, 80.6 and 162 rcomp resistors */
40
.rcomp_resistor = {200, 81, 162},
41
42
/* Nightfury Rcomp target values */
43
.rcomp_targets = {100, 40, 40, 23, 40},
44
45
/* Set CaVref config to 0 for LPDDR3 */
46
.vref_ca_config = 0,
47
48
/* Disable Early Command Training */
49
.ect = 0,
50
};
51
52
void
variant_memory_params
(
struct
cnl_mb_cfg
*bcfg)
53
{
54
memcpy
(bcfg, &
baseboard_memcfg
,
sizeof
(
baseboard_memcfg
));
55
}
memcpy
void * memcpy(void *dest, const void *src, size_t n)
Definition:
memcpy.c:7
cnl_memcfg_init.h
DDR_CH0
@ DDR_CH0
Definition:
cnl_memcfg_init.h:23
DDR_CH1
@ DDR_CH1
Definition:
cnl_memcfg_init.h:24
variant_memory_params
const struct mb_cfg *__weak variant_memory_params(void)
Definition:
memory.c:67
baseboard_memcfg
static const struct cnl_mb_cfg baseboard_memcfg
Definition:
memory.c:8
string.h
cnl_mb_cfg
Definition:
cnl_memcfg_init.h:55
cnl_mb_cfg::dqs_map
uint8_t dqs_map[DDR_NUM_CHANNELS][DQ_BITS_PER_DQS]
Definition:
cnl_memcfg_init.h:83
src
mainboard
google
hatch
variants
nightfury
memory.c
Generated by
1.9.1