| 1 |
|
| 2 |
|
| 3 |
#include <baseboard/variants.h> |
| 4 |
#include <baseboard/gpio.h> |
| 5 |
#include <console/console.h> |
| 6 |
#include <gpio.h> |
| 7 |
#include <soc/meminit.h> |
| 8 |
#include <soc/romstage.h> |
| 9 |
|
| 10 |
static const struct mb_cfg jslrvp_ddr4_memcfg_cfg = { |
| 11 |
.dq_map[DDR_CH0] = { |
| 12 |
{0xf, 0xf0}, |
| 13 |
{0xf, 0xf0}, |
| 14 |
{0xff, 0x0}, |
| 15 |
{0x0, 0x0}, |
| 16 |
{0x0, 0x0}, |
| 17 |
{0x0, 0x0} |
| 18 |
}, |
| 19 |
|
| 20 |
.dq_map[DDR_CH1] = { |
| 21 |
{0xf, 0xf0}, |
| 22 |
{0xf, 0xf0}, |
| 23 |
{0xff, 0x0}, |
| 24 |
{0x0, 0x0}, |
| 25 |
{0x00, 0x0}, |
| 26 |
{0x00, 0x0} |
| 27 |
}, |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
.dqs_map[DDR_CH0] = {0, 1, 3, 2, 4, 5, 6, 7}, |
| 37 |
.dqs_map[DDR_CH1] = {1, 0, 4, 5, 2, 3, 6, 7}, |
| 38 |
|
| 39 |
|
| 40 |
.rcomp_resistor = {100, 100, 100}, |
| 41 |
|
| 42 |
|
| 43 |
.rcomp_targets = {0, 0, 0, 0, 0}, |
| 44 |
|
| 45 |
|
| 46 |
.ect = 1, |
| 47 |
|
| 48 |
|
| 49 |
.UserBd = BOARD_TYPE_MOBILE, |
| 50 |
}; |
| 51 |
|
| 52 |
static const struct mb_cfg jslrvp_lpddr4_memcfg_cfg = { |
| 53 |
.dq_map[DDR_CH0] = { |
| 54 |
{0xf, 0xf0}, |
| 55 |
{0xf, 0xf0}, |
| 56 |
{0xff, 0x0}, |
| 57 |
{0x0, 0x0}, |
| 58 |
{0x0, 0x0}, |
| 59 |
{0x0, 0x0} |
| 60 |
}, |
| 61 |
|
| 62 |
.dq_map[DDR_CH1] = { |
| 63 |
{0xf, 0xf0}, |
| 64 |
{0xf, 0xf0}, |
| 65 |
{0xff, 0x0}, |
| 66 |
{0x0, 0x0}, |
| 67 |
{0x00, 0x0}, |
| 68 |
{0x00, 0x0} |
| 69 |
}, |
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
.dqs_map[DDR_CH0] = {0, 3, 2, 1, 7, 5, 4, 6}, |
| 79 |
.dqs_map[DDR_CH1] = {3, 1, 2, 0, 4, 7, 6, 5}, |
| 80 |
|
| 81 |
|
| 82 |
.rcomp_resistor = {100, 100, 100}, |
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
.rcomp_targets = {80, 40, 40, 40, 30}, |
| 88 |
|
| 89 |
|
| 90 |
.ect = 1, |
| 91 |
|
| 92 |
|
| 93 |
.UserBd = BOARD_TYPE_ULT_ULX, |
| 94 |
}; |
| 95 |
|
| 96 |
const struct mb_cfg *variant_memcfg_config(uint8_t board_id) |
| 97 |
{ |
| 98 |
if (board_id == jsl_ddr4) |
| 99 |
return &jslrvp_ddr4_memcfg_cfg; |
| 100 |
else if (board_id == jsl_lpddr4) |
| 101 |
return &jslrvp_lpddr4_memcfg_cfg; |
| 102 |
|
| 103 |
die("unsupported board id : 0x%x\n", board_id); |
| 104 |
} |