blob: b4d44291c90a6155cec1fe68692a18fcfd5af990 [file] [log] [blame]
Angel Pons09481b12020-04-03 01:21:13 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Tristan Corrick36932942018-10-31 03:02:11 +13002
3#include <stdint.h>
Tristan Corrick36932942018-10-31 03:02:11 +13004#include <cpu/intel/haswell/haswell.h>
Kyösti Mälkki3855c012019-03-03 08:45:19 +02005#include <device/pnp_ops.h>
Tristan Corrick36932942018-10-31 03:02:11 +13006#include <northbridge/intel/haswell/haswell.h>
7#include <northbridge/intel/haswell/pei_data.h>
Angel Pons45f448f2020-07-03 14:46:47 +02008#include <northbridge/intel/haswell/raminit.h>
Tristan Corrick09a53232018-12-30 00:59:04 +13009#include <southbridge/intel/common/gpio.h>
Tristan Corrick36932942018-10-31 03:02:11 +130010#include <southbridge/intel/lynxpoint/pch.h>
Tristan Corrick36932942018-10-31 03:02:11 +130011
Angel Pons6e1c4712020-07-03 13:05:10 +020012void mainboard_config_rcba(void)
13{
14 RCBA16(D31IR) = DIR_ROUTE(PIRQA, PIRQD, PIRQC, PIRQA);
15 RCBA16(D29IR) = DIR_ROUTE(PIRQH, PIRQD, PIRQA, PIRQC);
16 RCBA16(D28IR) = DIR_ROUTE(PIRQA, PIRQB, PIRQC, PIRQD);
17 RCBA16(D27IR) = DIR_ROUTE(PIRQG, PIRQB, PIRQC, PIRQD);
18 RCBA16(D26IR) = DIR_ROUTE(PIRQA, PIRQF, PIRQC, PIRQD);
19 RCBA16(D25IR) = DIR_ROUTE(PIRQE, PIRQF, PIRQG, PIRQH);
20 RCBA16(D22IR) = DIR_ROUTE(PIRQA, PIRQD, PIRQC, PIRQB);
21 RCBA16(D20IR) = DIR_ROUTE(PIRQA, PIRQB, PIRQC, PIRQD);
22}
Tristan Corrick36932942018-10-31 03:02:11 +130023
Angel Pons45f448f2020-07-03 14:46:47 +020024void mainboard_fill_pei_data(struct pei_data *pei_data)
Tristan Corrick36932942018-10-31 03:02:11 +130025{
Angel Pons45f448f2020-07-03 14:46:47 +020026 struct pei_data mainboard_pei_data = {
Tristan Corrick36932942018-10-31 03:02:11 +130027 .pei_version = PEI_VERSION,
28 .mchbar = (uintptr_t)DEFAULT_MCHBAR,
29 .dmibar = (uintptr_t)DEFAULT_DMIBAR,
30 .epbar = DEFAULT_EPBAR,
Kyösti Mälkki503d3242019-03-05 07:54:28 +020031 .pciexbar = CONFIG_MMCONF_BASE_ADDRESS,
Tristan Corrick36932942018-10-31 03:02:11 +130032 .smbusbar = SMBUS_IO_BASE,
Tristan Corrick36932942018-10-31 03:02:11 +130033 .hpet_address = HPET_ADDR,
34 .rcba = (uintptr_t)DEFAULT_RCBA,
35 .pmbase = DEFAULT_PMBASE,
36 .gpiobase = DEFAULT_GPIOBASE,
37 .temp_mmio_base = 0xfed08000,
38 .system_type = 1, /* desktop/server */
39 .tseg_size = CONFIG_SMM_TSEG_SIZE,
40 .spd_addresses = { 0xa0, 0x00, 0xa4, 0x00 },
41 .ec_present = 0,
42 .dimm_channel0_disabled = 2, /* Disable DIMM 1 on channel 0. */
43 .dimm_channel1_disabled = 2, /* Disable DIMM 1 on channel 1. */
44 .max_ddr3_freq = 1600,
45 .usb2_ports = {
46 /* Length, Enable, OCn#, Location */
47 { 0x0040, 1, 0, USB_PORT_BACK_PANEL },
48 { 0x0040, 1, 0, USB_PORT_BACK_PANEL },
49 { 0x0040, 1, 1, USB_PORT_BACK_PANEL },
50 { 0x0040, 1, 1, USB_PORT_BACK_PANEL },
51 { 0x0040, 1, 2, USB_PORT_BACK_PANEL },
52 { 0x0040, 1, 2, USB_PORT_BACK_PANEL },
53 { 0x0040, 0, USB_OC_PIN_SKIP, USB_PORT_SKIP },
54 { 0x0040, 0, USB_OC_PIN_SKIP, USB_PORT_SKIP },
55 { 0x0040, 1, 4, USB_PORT_BACK_PANEL },
56 { 0x0040, 1, 4, USB_PORT_BACK_PANEL },
57 { 0x0040, 1, 5, USB_PORT_BACK_PANEL },
58 { 0x0040, 1, 5, USB_PORT_BACK_PANEL },
59 { 0x0040, 0, USB_OC_PIN_SKIP, USB_PORT_SKIP },
60 { 0x0040, 0, USB_OC_PIN_SKIP, USB_PORT_SKIP },
61 },
62 .usb3_ports = {
63 /* Enable, OCn# */
64 { 1, 0 },
65 { 1, 0 },
66 { 0, USB_OC_PIN_SKIP },
67 { 0, USB_OC_PIN_SKIP },
68 { 0, USB_OC_PIN_SKIP },
69 { 0, USB_OC_PIN_SKIP },
70 },
71 };
72
Angel Pons45f448f2020-07-03 14:46:47 +020073 *pei_data = mainboard_pei_data; /* FIXME: Do not overwrite everything */
Tristan Corrick36932942018-10-31 03:02:11 +130074}