blob: 06927b0eff869cde53ef4b1682f0ce571e20c8f5 [file] [log] [blame]
Thomas Heijligen819d8722019-03-18 11:32:34 +01001/* SPDX-License-Identifier: GPL-2.0-only */
2
3#include <option.h>
4#include <soc/cnl_memcfg_init.h>
5#include <soc/gpio.h>
6#include <soc/romstage.h>
Felix Singere8774932020-11-24 19:27:47 +00007#include <variant.h>
Felix Singer8ed7faf2020-12-04 09:18:49 +01008#include <variant/gpio.h>
Thomas Heijligen819d8722019-03-18 11:32:34 +01009
Thomas Heijligen819d8722019-03-18 11:32:34 +010010void mainboard_memory_init_params(FSPM_UPD *memupd)
11{
12 uint8_t vtd = 1;
13 const struct cnl_mb_cfg cfg = {
14 .spd = {
15 [0] = { READ_SMBUS, { 0x50 << 1 } },
16 [2] = { READ_SMBUS, { 0x52 << 1 } },
17 },
18 .rcomp_resistor = { 121, 75, 100 },
19 .rcomp_targets = { 50, 25, 20, 20, 26 },
20 .dq_pins_interleaved = 1,
21 .vref_ca_config = 2,
22 .ect = 0,
23 };
24 cannonlake_memcfg_init(&memupd->FspmConfig, &cfg);
25 memupd->FspmConfig.EccSupport = 1;
26 memupd->FspmConfig.UserBd = BOARD_TYPE_MOBILE;
27
28 get_option(&vtd, "vtd");
29 memupd->FspmTestConfig.VtdDisable = !vtd;
30 get_option(&memupd->FspmConfig.HyperThreading, "hyper_threading");
31
Nico Hubere4ab31b2019-07-10 16:42:55 +020032 variant_romstage_params(memupd);
33
Felix Singer8ed7faf2020-12-04 09:18:49 +010034 variant_configure_gpios();
Thomas Heijligen819d8722019-03-18 11:32:34 +010035}
Nico Hubere4ab31b2019-07-10 16:42:55 +020036
37__weak void variant_romstage_params(FSPM_UPD *const mupd)
38{
39}