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