blob: f1cd176641d769df6d52dd04148192b6aacd486b [file] [log] [blame]
Angel Pons963500f2018-04-29 19:56:49 +02001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2018 Angel Pons <th3fanbus@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of 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
16#include <northbridge/intel/sandybridge/raminit_native.h>
17#include <northbridge/intel/sandybridge/sandybridge.h>
18#include <southbridge/intel/bd82x6x/pch.h>
19#include <superio/ite/common/ite.h>
20#include <superio/ite/it8728f/it8728f.h>
21
22#define SUPERIO_GPIO PNP_DEV(0x2e, IT8728F_GPIO)
23#define SERIAL_DEV PNP_DEV(0x2e, 0x01)
24
25void pch_enable_lpc(void)
26{
27 pci_write_config16(PCH_LPC_DEV, LPC_EN, KBC_LPC_EN |
28 CNF1_LPC_EN | CNF2_LPC_EN | COMA_LPC_EN);
29
30 pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x10);
31}
32
33void mainboard_rcba_config(void)
34{
35}
36
37const struct southbridge_usb_port mainboard_usb_ports[] = {
38 { 1, 0, 0 },
39 { 1, 0, 0 },
40 { 1, 0, 1 },
41 { 1, 0, 1 },
42 { 1, 0, 2 },
43 { 1, 0, 2 },
44 { 1, 0, 3 },
45 { 1, 0, 3 },
46 { 1, 0, 4 },
47 { 1, 0, 4 },
48 { 1, 0, 6 },
49 { 1, 0, 5 },
50 { 1, 0, 5 },
51 { 1, 0, 6 },
52};
53
54void mainboard_early_init(int s3resume)
55{
56}
57
58void mainboard_config_superio(void)
59{
Angel Pons940bb4e2018-06-24 12:02:59 +020060 /* Enable serial port */
Angel Pons963500f2018-04-29 19:56:49 +020061 ite_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE);
62
Angel Pons940bb4e2018-06-24 12:02:59 +020063 /* Disable SIO WDT which kicks in DualBIOS */
64 ite_reg_write(SUPERIO_GPIO, 0xEF, 0x7E);
Angel Pons963500f2018-04-29 19:56:49 +020065}
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}