blob: 7c75356977997a7d70c72c3dbe6573f35fa2be55 [file] [log] [blame]
Angel Pons8dcc8182020-04-03 01:21:52 +02001/* SPDX-License-Identifier: GPL-2.0-only */
2/* This file is part of the coreboot project. */
Angel Pons963500f2018-04-29 19:56:49 +02003
Arthur Heymansfa5d0f82019-11-12 19:11:50 +01004#include <bootblock_common.h>
Angel Pons963500f2018-04-29 19:56:49 +02005#include <northbridge/intel/sandybridge/raminit_native.h>
6#include <northbridge/intel/sandybridge/sandybridge.h>
7#include <southbridge/intel/bd82x6x/pch.h>
8#include <superio/ite/common/ite.h>
9#include <superio/ite/it8728f/it8728f.h>
10
11#define SUPERIO_GPIO PNP_DEV(0x2e, IT8728F_GPIO)
12#define SERIAL_DEV PNP_DEV(0x2e, 0x01)
13
Angel Pons963500f2018-04-29 19:56:49 +020014const struct southbridge_usb_port mainboard_usb_ports[] = {
15 { 1, 0, 0 },
16 { 1, 0, 0 },
17 { 1, 0, 1 },
18 { 1, 0, 1 },
19 { 1, 0, 2 },
20 { 1, 0, 2 },
21 { 1, 0, 3 },
22 { 1, 0, 3 },
23 { 1, 0, 4 },
24 { 1, 0, 4 },
25 { 1, 0, 6 },
26 { 1, 0, 5 },
27 { 1, 0, 5 },
28 { 1, 0, 6 },
29};
30
Arthur Heymansfa5d0f82019-11-12 19:11:50 +010031void bootblock_mainboard_early_init(void)
Angel Pons963500f2018-04-29 19:56:49 +020032{
Angel Ponsc6b44cd2019-03-10 13:21:12 +010033 if (!CONFIG(NO_UART_ON_SUPERIO)) {
34 /* Enable serial port */
35 ite_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
36 }
Angel Pons963500f2018-04-29 19:56:49 +020037
Angel Pons940bb4e2018-06-24 12:02:59 +020038 /* Disable SIO WDT which kicks in DualBIOS */
39 ite_reg_write(SUPERIO_GPIO, 0xEF, 0x7E);
Angel Pons963500f2018-04-29 19:56:49 +020040}
41
42void mainboard_get_spd(spd_raw_data *spd, bool id_only)
43{
44 read_spd(&spd[0], 0x50, id_only);
45 read_spd(&spd[2], 0x52, id_only);
46}