Angel Pons | 89ab250 | 2020-04-03 01:22:28 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Vladimir Serbinenko | 94930e2 | 2014-08-24 22:40:33 +0200 | [diff] [blame] | 2 | |
| 3 | #include <stdint.h> |
Furquan Shaikh | 76cedd2 | 2020-05-02 10:24:23 -0700 | [diff] [blame] | 4 | #include <acpi/acpi.h> |
Edward O'Callaghan | 77757c2 | 2015-01-04 21:33:39 +1100 | [diff] [blame] | 5 | #include <northbridge/intel/sandybridge/sandybridge.h> |
Arthur Heymans | 4c81d44 | 2018-01-29 12:14:37 +0100 | [diff] [blame] | 6 | #include <northbridge/intel/sandybridge/raminit.h> |
Edward O'Callaghan | 77757c2 | 2015-01-04 21:33:39 +1100 | [diff] [blame] | 7 | #include <northbridge/intel/sandybridge/raminit_native.h> |
| 8 | #include <southbridge/intel/bd82x6x/pch.h> |
Patrick Rudolph | e8e66f4 | 2016-02-06 17:42:42 +0100 | [diff] [blame] | 9 | #include <southbridge/intel/common/gpio.h> |
Vladimir Serbinenko | 94930e2 | 2014-08-24 22:40:33 +0200 | [diff] [blame] | 10 | |
Arthur Heymans | 4c81d44 | 2018-01-29 12:14:37 +0100 | [diff] [blame] | 11 | void mainboard_fill_pei_data(struct pei_data *pei_data) |
| 12 | { |
| 13 | struct pei_data pei_data_template = { |
| 14 | .pei_version = PEI_VERSION, |
Angel Pons | d9e58dc | 2021-01-20 01:22:20 +0100 | [diff] [blame] | 15 | .mchbar = CONFIG_FIXED_MCHBAR_MMIO_BASE, |
| 16 | .dmibar = CONFIG_FIXED_DMIBAR_MMIO_BASE, |
| 17 | .epbar = CONFIG_FIXED_EPBAR_MMIO_BASE, |
Shelley Chen | 4e9bb33 | 2021-10-20 15:43:45 -0700 | [diff] [blame] | 18 | .pciexbar = CONFIG_ECAM_MMCONF_BASE_ADDRESS, |
Angel Pons | b21bffa | 2020-07-03 01:02:28 +0200 | [diff] [blame] | 19 | .smbusbar = CONFIG_FIXED_SMBUS_IO_BASE, |
Arthur Heymans | 4c81d44 | 2018-01-29 12:14:37 +0100 | [diff] [blame] | 20 | .wdbbar = 0x4000000, |
| 21 | .wdbsize = 0x1000, |
| 22 | .hpet_address = CONFIG_HPET_ADDRESS, |
Angel Pons | 92717ff | 2020-09-14 16:22:22 +0200 | [diff] [blame] | 23 | .rcba = (uintptr_t)DEFAULT_RCBA, |
Arthur Heymans | 4c81d44 | 2018-01-29 12:14:37 +0100 | [diff] [blame] | 24 | .pmbase = DEFAULT_PMBASE, |
| 25 | .gpiobase = DEFAULT_GPIOBASE, |
| 26 | .thermalbase = 0xfed08000, |
| 27 | .system_type = 0, // 0 Mobile, 1 Desktop/Server |
| 28 | .tseg_size = CONFIG_SMM_TSEG_SIZE, |
| 29 | .spd_addresses = { 0xa0, 0x00,0xa2,0x00 }, |
| 30 | .ts_addresses = { 0x00, 0x00, 0x00, 0x00 }, |
| 31 | .ec_present = 1, |
| 32 | .gbe_enable = 1, |
Arthur Heymans | 4c81d44 | 2018-01-29 12:14:37 +0100 | [diff] [blame] | 33 | .max_ddr3_freq = 1333, |
| 34 | .usb_port_config = { |
| 35 | { 1, 0, 0x0040 }, |
| 36 | { 1, 1, 0x0080 }, |
| 37 | { 1, 3, 0x0080 }, |
| 38 | { 1, 3, 0x0080 }, |
| 39 | { 1, 0, 0x0080 }, |
| 40 | { 1, 0, 0x0080 }, |
| 41 | { 1, 2, 0x0040 }, |
| 42 | { 1, 2, 0x0040 }, |
| 43 | { 1, 6, 0x0080 }, |
| 44 | { 1, 5, 0x0080 }, |
| 45 | { 1, 6, 0x0080 }, |
| 46 | { 1, 6, 0x0080 }, |
| 47 | { 1, 7, 0x0080 }, |
| 48 | { 1, 6, 0x0080 }, |
| 49 | }, |
| 50 | }; |
| 51 | *pei_data = pei_data_template; |
| 52 | } |
| 53 | |
Kyösti Mälkki | e258b9a | 2016-11-18 19:59:23 +0200 | [diff] [blame] | 54 | void mainboard_get_spd(spd_raw_data *spd, bool id_only) |
Jan Tatje | b874308 | 2016-06-04 19:29:03 +0200 | [diff] [blame] | 55 | { |
Kyösti Mälkki | e258b9a | 2016-11-18 19:59:23 +0200 | [diff] [blame] | 56 | read_spd (&spd[0], 0x50, id_only); |
| 57 | read_spd (&spd[2], 0x51, id_only); |
Vladimir Serbinenko | 94930e2 | 2014-08-24 22:40:33 +0200 | [diff] [blame] | 58 | } |
Vladimir Serbinenko | 609bd94 | 2016-01-31 14:00:54 +0100 | [diff] [blame] | 59 | |
Arthur Heymans | 4c81d44 | 2018-01-29 12:14:37 +0100 | [diff] [blame] | 60 | int mainboard_should_reset_usb(int s3resume) |
| 61 | { |
| 62 | return !s3resume; |
| 63 | } |