blob: 023248640339f14ae3f3b50a6f3e682ed4c01c0d [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
Felix Held972d9f22022-02-23 16:32:20 +01003#include <arch/hpet.h>
Tobias Diedrich7a952042017-12-03 10:09:28 +01004#include <stdint.h>
5#include <northbridge/intel/sandybridge/sandybridge.h>
Julius Wernercd49cce2019-03-05 16:53:33 -08006#if CONFIG(USE_NATIVE_RAMINIT)
Tobias Diedrich7a952042017-12-03 10:09:28 +01007#include <northbridge/intel/sandybridge/raminit_native.h>
8#else
9#include <northbridge/intel/sandybridge/raminit.h>
10#endif
Patrick Rudolphda9302a2019-03-24 17:01:41 +010011#include <southbridge/intel/bd82x6x/pch.h>
Tobias Diedrich7a952042017-12-03 10:09:28 +010012
Julius Wernercd49cce2019-03-05 16:53:33 -080013#if !CONFIG(USE_NATIVE_RAMINIT)
Tobias Diedrich7a952042017-12-03 10:09:28 +010014void mainboard_fill_pei_data(struct pei_data *pei_data)
15{
16 struct pei_data pei_data_template = {
17 .pei_version = PEI_VERSION,
Angel Ponsd9e58dc2021-01-20 01:22:20 +010018 .mchbar = CONFIG_FIXED_MCHBAR_MMIO_BASE,
19 .dmibar = CONFIG_FIXED_DMIBAR_MMIO_BASE,
20 .epbar = CONFIG_FIXED_EPBAR_MMIO_BASE,
Shelley Chen4e9bb332021-10-20 15:43:45 -070021 .pciexbar = CONFIG_ECAM_MMCONF_BASE_ADDRESS,
Angel Ponsb21bffa2020-07-03 01:02:28 +020022 .smbusbar = CONFIG_FIXED_SMBUS_IO_BASE,
Tobias Diedrich7a952042017-12-03 10:09:28 +010023 .wdbbar = 0x4000000,
24 .wdbsize = 0x1000,
Felix Held972d9f22022-02-23 16:32:20 +010025 .hpet_address = HPET_BASE_ADDRESS,
Angel Pons92717ff2020-09-14 16:22:22 +020026 .rcba = (uintptr_t)DEFAULT_RCBA,
Tobias Diedrich7a952042017-12-03 10:09:28 +010027 .pmbase = DEFAULT_PMBASE,
28 .gpiobase = DEFAULT_GPIOBASE,
29 .thermalbase = 0xfed08000,
30 .system_type = 0, // 0 Mobile, 1 Desktop/Server
31 .tseg_size = CONFIG_SMM_TSEG_SIZE,
32 .spd_addresses = { 0xa0, 0x00, 0xa2, 0x00 },
33 .ts_addresses = { 0x00, 0x00, 0x00, 0x00 },
34 .ec_present = 0,
35 .gbe_enable = 1,
Tobias Diedrich7a952042017-12-03 10:09:28 +010036 .max_ddr3_freq = 1333,
37 .usb_port_config = {
38#define USB_CONFIG(enabled, current, ocpin) { enabled, ocpin, 0x040 * current }
39#include "usb.h"
40 },
41 };
42 *pei_data = pei_data_template;
43}
44
45int mainboard_should_reset_usb(int s3resume)
46{
47 return !s3resume;
48}
49#endif