aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/lenovo
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/lenovo')
-rw-r--r--src/mainboard/lenovo/x220/devicetree.cb19
-rw-r--r--src/mainboard/lenovo/x220/early_init.c42
2 files changed, 22 insertions, 39 deletions
diff --git a/src/mainboard/lenovo/x220/devicetree.cb b/src/mainboard/lenovo/x220/devicetree.cb
index 7a9959931e..049eea6d84 100644
--- a/src/mainboard/lenovo/x220/devicetree.cb
+++ b/src/mainboard/lenovo/x220/devicetree.cb
@@ -15,6 +15,25 @@ chip northbridge/intel/sandybridge
register "gpu_cpu_backlight" = "0x1155"
register "gpu_pch_backlight" = "0x06100610"
+ register "ec_present" = "1" # I have an embedded controller
+ register "max_mem_clock_mhz" = "666" # So DDR3 freq = 1333
+
+ register "usb_port_config" = "{
+ { 1, 0, 0x0040 },
+ { 1, 1, 0x0080 },
+ { 1, 3, 0x0080 },
+ { 1, 3, 0x0080 },
+ { 1, 0, 0x0080 },
+ { 1, 0, 0x0080 },
+ { 1, 2, 0x0040 },
+ { 1, 2, 0x0040 },
+ { 1, 6, 0x0080 },
+ { 1, 5, 0x0080 },
+ { 1, 6, 0x0080 },
+ { 1, 6, 0x0080 },
+ { 1, 7, 0x0080 },
+ { 1, 6, 0x0080 },}"
+
device domain 0 on
subsystemid 0x17aa 0x21db inherit
diff --git a/src/mainboard/lenovo/x220/early_init.c b/src/mainboard/lenovo/x220/early_init.c
index 78112eb9b0..8edb0dd735 100644
--- a/src/mainboard/lenovo/x220/early_init.c
+++ b/src/mainboard/lenovo/x220/early_init.c
@@ -9,45 +9,9 @@
void mainboard_fill_pei_data(struct pei_data *pei_data)
{
- struct pei_data pei_data_template = {
- .pei_version = PEI_VERSION,
- .mchbar = CONFIG_FIXED_MCHBAR_MMIO_BASE,
- .dmibar = CONFIG_FIXED_DMIBAR_MMIO_BASE,
- .epbar = CONFIG_FIXED_EPBAR_MMIO_BASE,
- .pciexbar = CONFIG_ECAM_MMCONF_BASE_ADDRESS,
- .smbusbar = CONFIG_FIXED_SMBUS_IO_BASE,
- .wdbbar = 0x4000000,
- .wdbsize = 0x1000,
- .hpet_address = HPET_BASE_ADDRESS,
- .rcba = (uintptr_t)DEFAULT_RCBA,
- .pmbase = DEFAULT_PMBASE,
- .gpiobase = DEFAULT_GPIOBASE,
- .thermalbase = 0xfed08000,
- .system_type = 0, // 0 Mobile, 1 Desktop/Server
- .tseg_size = CONFIG_SMM_TSEG_SIZE,
- .spd_addresses = { 0xa0, 0x00,0xa2,0x00 },
- .ts_addresses = { 0x00, 0x00, 0x00, 0x00 },
- .ec_present = 1,
- .gbe_enable = 1,
- .max_ddr3_freq = 1333,
- .usb_port_config = {
- { 1, 0, 0x0040 },
- { 1, 1, 0x0080 },
- { 1, 3, 0x0080 },
- { 1, 3, 0x0080 },
- { 1, 0, 0x0080 },
- { 1, 0, 0x0080 },
- { 1, 2, 0x0040 },
- { 1, 2, 0x0040 },
- { 1, 6, 0x0080 },
- { 1, 5, 0x0080 },
- { 1, 6, 0x0080 },
- { 1, 6, 0x0080 },
- { 1, 7, 0x0080 },
- { 1, 6, 0x0080 },
- },
- };
- *pei_data = pei_data_template;
+ const uint8_t spdaddr[] = {0xa0, 0x00, 0xa2, 0x00};
+
+ memcpy(pei_data->spd_addresses, &spdaddr, sizeof(pei_data->spd_addresses));
}
void mainboard_get_spd(spd_raw_data *spd, bool id_only)