blob: c0d84f5127e00bece90d570550c5f2c77091f832 [file] [log] [blame]
Angel Pons381c4eb2020-04-03 01:22:06 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Patrick Rudolph05284b62019-06-04 15:56:44 +02002
Arthur Heymansfa5d0f82019-11-12 19:11:50 +01003#include <bootblock_common.h>
Patrick Rudolph05284b62019-06-04 15:56:44 +02004#include <superio/nuvoton/npcd378/npcd378.h>
5#include <superio/nuvoton/common/nuvoton.h>
Patrick Rudolph05284b62019-06-04 15:56:44 +02006#include <northbridge/intel/sandybridge/raminit_native.h>
7#include <southbridge/intel/bd82x6x/pch.h>
8
9#define SERIAL_DEV PNP_DEV(0x2e, NPCD378_SP2)
10
Patrick Rudolph05284b62019-06-04 15:56:44 +020011const struct southbridge_usb_port mainboard_usb_ports[] = {
12 { 1, 0, 0 },
13 { 1, 0, 0 },
14 { 1, 0, 0 },
15 { 1, 0, 0 },
16 { 1, 0, 3 },
17 { 1, 0, 3 },
18 { 1, 0, 3 },
19 { 1, 0, 3 },
20 { 1, 1, 5 },
21 { 1, 0, 5 },
22 { 1, 0, 5 },
23 { 1, 0, 5 },
24 { 1, 0, 7 },
25 { 1, 0, 7 },
26};
27
Arthur Heymansfa5d0f82019-11-12 19:11:50 +010028void bootblock_mainboard_early_init(void)
Patrick Rudolph05284b62019-06-04 15:56:44 +020029{
30 if (CONFIG(CONSOLE_SERIAL))
31 nuvoton_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
32}
33
34void mainboard_get_spd(spd_raw_data *spd, bool id_only)
35{
36 /* BTX mainboard: Reversed mapping */
37 read_spd(&spd[3], 0x50, id_only);
38 read_spd(&spd[2], 0x51, id_only);
39 read_spd(&spd[1], 0x52, id_only);
40 read_spd(&spd[0], 0x53, id_only);
41}