blob: a0083fb3547a99b4b86a777608a2e51ec55245c6 [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
18#include <northbridge/intel/sandybridge/sandybridge.h>
Kyösti Mälkkif1b58b72019-03-01 13:43:02 +020019#include <device/pci_ops.h>
devmaster643f888ef2019-01-09 11:42:32 +053020#include <northbridge/intel/sandybridge/raminit_native.h>
21#include <southbridge/intel/bd82x6x/pch.h>
22#include <superio/nuvoton/common/nuvoton.h>
23#include <superio/nuvoton/nct6779d/nct6779d.h>
24
25#define SIO_PORT 0x2e
26#define SIO_DEV PNP_DEV(SIO_PORT, 0)
27#define ACPI_DEV PNP_DEV(SIO_PORT, NCT6779D_ACPI)
28
29void pch_enable_lpc(void)
30{
31 pci_write_config16(PCH_LPC_DEV, LPC_EN, CNF1_LPC_EN | KBC_LPC_EN);
32}
33
34void mainboard_rcba_config(void)
35{
36}
37
38const struct southbridge_usb_port mainboard_usb_ports[] = {
39 { 1, 0, 0 },
40 { 1, 0, 0 },
41 { 1, 0, 1 },
42 { 1, 0, 1 },
43 { 1, 0, 2 },
44 { 1, 0, 2 },
45 { 1, 0, 3 },
46 { 1, 0, 3 },
47 { 1, 0, 4 },
48 { 1, 0, 4 },
49 { 1, 0, 6 },
50 { 1, 0, 5 },
51 { 1, 0, 5 },
52 { 1, 0, 6 },
53};
54
55void mainboard_early_init(int s3resume)
56{
57}
58
59void mainboard_config_superio(void)
60{
61 nuvoton_pnp_enter_conf_state(SIO_DEV);
62 pnp_set_logical_device(ACPI_DEV);
63 pnp_write_config(ACPI_DEV, 0xe4, 0x10);
64 nuvoton_pnp_exit_conf_state(SIO_DEV);
65}
66
67void mainboard_get_spd(spd_raw_data *spd, bool id_only)
68{
69 read_spd(&spd[0], 0x50, id_only);
70 read_spd(&spd[2], 0x52, id_only);
71}