blob: 54034d1f3a2ab862e9054f5e2fece47ef186ae0e [file] [log] [blame]
devmaster643f888ef2019-01-09 11:42:32 +05301/*
2 * This file is part of the coreboot project.
3 *
devmaster643f888ef2019-01-09 11:42:32 +05304 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; version 2 of
8 * the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
Arthur Heymansfa5d0f82019-11-12 19:11:50 +010016#include <bootblock_common.h>
devmaster643f888ef2019-01-09 11:42:32 +053017#include <northbridge/intel/sandybridge/sandybridge.h>
Kyösti Mälkki3855c012019-03-03 08:45:19 +020018#include <device/pnp_ops.h>
devmaster643f888ef2019-01-09 11:42:32 +053019#include <northbridge/intel/sandybridge/raminit_native.h>
20#include <southbridge/intel/bd82x6x/pch.h>
21#include <superio/nuvoton/common/nuvoton.h>
22#include <superio/nuvoton/nct6779d/nct6779d.h>
23
24#define SIO_PORT 0x2e
25#define SIO_DEV PNP_DEV(SIO_PORT, 0)
26#define ACPI_DEV PNP_DEV(SIO_PORT, NCT6779D_ACPI)
27
devmaster643f888ef2019-01-09 11:42:32 +053028const struct southbridge_usb_port mainboard_usb_ports[] = {
29 { 1, 0, 0 },
30 { 1, 0, 0 },
31 { 1, 0, 1 },
32 { 1, 0, 1 },
33 { 1, 0, 2 },
34 { 1, 0, 2 },
35 { 1, 0, 3 },
36 { 1, 0, 3 },
37 { 1, 0, 4 },
38 { 1, 0, 4 },
39 { 1, 0, 6 },
40 { 1, 0, 5 },
41 { 1, 0, 5 },
42 { 1, 0, 6 },
43};
44
Arthur Heymansfa5d0f82019-11-12 19:11:50 +010045void bootblock_mainboard_early_init(void)
devmaster643f888ef2019-01-09 11:42:32 +053046{
47 nuvoton_pnp_enter_conf_state(SIO_DEV);
48 pnp_set_logical_device(ACPI_DEV);
49 pnp_write_config(ACPI_DEV, 0xe4, 0x10);
50 nuvoton_pnp_exit_conf_state(SIO_DEV);
51}
52
53void mainboard_get_spd(spd_raw_data *spd, bool id_only)
54{
55 read_spd(&spd[0], 0x50, id_only);
56 read_spd(&spd[2], 0x52, id_only);
57}