blob: ada0a5cac7a1d514b49b0dbe0129be581863fdcc [file] [log] [blame]
Angel Pons60ec3652020-04-03 01:22:13 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Tobias Diedrich7a952042017-12-03 10:09:28 +01002
3#include <stdint.h>
4#include <northbridge/intel/sandybridge/sandybridge.h>
Julius Wernercd49cce2019-03-05 16:53:33 -08005#if CONFIG(USE_NATIVE_RAMINIT)
Tobias Diedrich7a952042017-12-03 10:09:28 +01006#include <northbridge/intel/sandybridge/raminit_native.h>
7#else
8#include <northbridge/intel/sandybridge/raminit.h>
9#endif
Patrick Rudolphda9302a2019-03-24 17:01:41 +010010#include <southbridge/intel/bd82x6x/pch.h>
Tobias Diedrich7a952042017-12-03 10:09:28 +010011
Julius Wernercd49cce2019-03-05 16:53:33 -080012#if !CONFIG(USE_NATIVE_RAMINIT)
Tobias Diedrich7a952042017-12-03 10:09:28 +010013void mainboard_fill_pei_data(struct pei_data *pei_data)
14{
15 struct pei_data pei_data_template = {
16 .pei_version = PEI_VERSION,
Angel Ponsd9e58dc2021-01-20 01:22:20 +010017 .mchbar = CONFIG_FIXED_MCHBAR_MMIO_BASE,
18 .dmibar = CONFIG_FIXED_DMIBAR_MMIO_BASE,
19 .epbar = CONFIG_FIXED_EPBAR_MMIO_BASE,
Shelley Chen4e9bb332021-10-20 15:43:45 -070020 .pciexbar = CONFIG_ECAM_MMCONF_BASE_ADDRESS,
Angel Ponsb21bffa2020-07-03 01:02:28 +020021 .smbusbar = CONFIG_FIXED_SMBUS_IO_BASE,
Tobias Diedrich7a952042017-12-03 10:09:28 +010022 .wdbbar = 0x4000000,
23 .wdbsize = 0x1000,
24 .hpet_address = CONFIG_HPET_ADDRESS,
Angel Pons92717ff2020-09-14 16:22:22 +020025 .rcba = (uintptr_t)DEFAULT_RCBA,
Tobias Diedrich7a952042017-12-03 10:09:28 +010026 .pmbase = DEFAULT_PMBASE,
27 .gpiobase = DEFAULT_GPIOBASE,
28 .thermalbase = 0xfed08000,
29 .system_type = 0, // 0 Mobile, 1 Desktop/Server
30 .tseg_size = CONFIG_SMM_TSEG_SIZE,
31 .spd_addresses = { 0xa0, 0x00, 0xa2, 0x00 },
32 .ts_addresses = { 0x00, 0x00, 0x00, 0x00 },
33 .ec_present = 0,
34 .gbe_enable = 1,
Tobias Diedrich7a952042017-12-03 10:09:28 +010035 .max_ddr3_freq = 1333,
36 .usb_port_config = {
37#define USB_CONFIG(enabled, current, ocpin) { enabled, ocpin, 0x040 * current }
38#include "usb.h"
39 },
40 };
41 *pei_data = pei_data_template;
42}
43
44int mainboard_should_reset_usb(int s3resume)
45{
46 return !s3resume;
47}
48#endif