blob: da1d4da7023701cbbf1339314b60f03e087dc1af [file] [log] [blame]
Angel Pons89ab2502020-04-03 01:22:28 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Vladimir Serbinenko94930e22014-08-24 22:40:33 +02002
Felix Held972d9f22022-02-23 16:32:20 +01003#include <arch/hpet.h>
Vladimir Serbinenko94930e22014-08-24 22:40:33 +02004#include <stdint.h>
Arthur Heymans4c81d442018-01-29 12:14:37 +01005#include <northbridge/intel/sandybridge/raminit.h>
Edward O'Callaghan77757c22015-01-04 21:33:39 +11006#include <northbridge/intel/sandybridge/raminit_native.h>
7#include <southbridge/intel/bd82x6x/pch.h>
Patrick Rudolphe8e66f42016-02-06 17:42:42 +01008#include <southbridge/intel/common/gpio.h>
Vladimir Serbinenko94930e22014-08-24 22:40:33 +02009
Arthur Heymans4c81d442018-01-29 12:14:37 +010010void mainboard_fill_pei_data(struct pei_data *pei_data)
11{
12 struct pei_data pei_data_template = {
13 .pei_version = PEI_VERSION,
Angel Ponsd9e58dc2021-01-20 01:22:20 +010014 .mchbar = CONFIG_FIXED_MCHBAR_MMIO_BASE,
15 .dmibar = CONFIG_FIXED_DMIBAR_MMIO_BASE,
16 .epbar = CONFIG_FIXED_EPBAR_MMIO_BASE,
Shelley Chen4e9bb332021-10-20 15:43:45 -070017 .pciexbar = CONFIG_ECAM_MMCONF_BASE_ADDRESS,
Angel Ponsb21bffa2020-07-03 01:02:28 +020018 .smbusbar = CONFIG_FIXED_SMBUS_IO_BASE,
Arthur Heymans4c81d442018-01-29 12:14:37 +010019 .wdbbar = 0x4000000,
20 .wdbsize = 0x1000,
Felix Held972d9f22022-02-23 16:32:20 +010021 .hpet_address = HPET_BASE_ADDRESS,
Angel Pons92717ff2020-09-14 16:22:22 +020022 .rcba = (uintptr_t)DEFAULT_RCBA,
Arthur Heymans4c81d442018-01-29 12:14:37 +010023 .pmbase = DEFAULT_PMBASE,
24 .gpiobase = DEFAULT_GPIOBASE,
25 .thermalbase = 0xfed08000,
26 .system_type = 0, // 0 Mobile, 1 Desktop/Server
27 .tseg_size = CONFIG_SMM_TSEG_SIZE,
28 .spd_addresses = { 0xa0, 0x00,0xa2,0x00 },
29 .ts_addresses = { 0x00, 0x00, 0x00, 0x00 },
30 .ec_present = 1,
31 .gbe_enable = 1,
Arthur Heymans4c81d442018-01-29 12:14:37 +010032 .max_ddr3_freq = 1333,
33 .usb_port_config = {
34 { 1, 0, 0x0040 },
35 { 1, 1, 0x0080 },
36 { 1, 3, 0x0080 },
37 { 1, 3, 0x0080 },
38 { 1, 0, 0x0080 },
39 { 1, 0, 0x0080 },
40 { 1, 2, 0x0040 },
41 { 1, 2, 0x0040 },
42 { 1, 6, 0x0080 },
43 { 1, 5, 0x0080 },
44 { 1, 6, 0x0080 },
45 { 1, 6, 0x0080 },
46 { 1, 7, 0x0080 },
47 { 1, 6, 0x0080 },
48 },
49 };
50 *pei_data = pei_data_template;
51}
52
Kyösti Mälkkie258b9a2016-11-18 19:59:23 +020053void mainboard_get_spd(spd_raw_data *spd, bool id_only)
Jan Tatjeb8743082016-06-04 19:29:03 +020054{
Kyösti Mälkkie258b9a2016-11-18 19:59:23 +020055 read_spd (&spd[0], 0x50, id_only);
56 read_spd (&spd[2], 0x51, id_only);
Vladimir Serbinenko94930e22014-08-24 22:40:33 +020057}