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