blob: eb2d29e8cfda1a9620b9a7a416a18250bec912c3 [file] [log] [blame]
Philipp Deppenwiese714baa12017-01-02 17:58:09 +01001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2017 Patrick Rudolph <siro@das-labor.org>
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 <arch/io.h>
17#include <device/pci_def.h>
18#include <northbridge/intel/sandybridge/raminit_native.h>
19#include <southbridge/intel/bd82x6x/pch.h>
20#include <ec/lenovo/pmh7/pmh7.h>
21
22void pch_enable_lpc(void)
23{
24 /* EC Decode Range Port60/64, Port62/66 */
25 /* Enable TPM, EC, PS/2 Keyboard/Mouse */
26 pci_write_config16(PCH_LPC_DEV, LPC_EN,
27 CNF2_LPC_EN | MC_LPC_EN | KBC_LPC_EN);
28
29 pci_write_config32(PCH_LPC_DEV, LPC_GEN1_DEC,
30 (0x0c << 16) | EC_LENOVO_PMH7_BASE | 1);
31}
32
33void rcba_config(void)
34{
35 /* Disable unused devices (board specific, reserved only).
36 * FIXME: Test if reserved bits are read only. */
37 RCBA32(FD) = PCH_DISABLE_ALWAYS | 0x10001fe0;
38}
39
40/* FIXME: used T530 values here */
41const struct southbridge_usb_port mainboard_usb_ports[] = {
42 { 1, 1, 0 },
43 { 1, 1, 1 },
44 { 1, 2, 3 },
45 { 1, 1, -1 },
46 { 1, 1, 2 },
47 { 1, 0, -1 },
48 { 0, 0, -1 },
49 { 1, 2, -1 },
50 { 1, 0, -1 },
51 { 1, 1, 5 },
52 { 1, 0, -1 },
53 { 1, 0, -1 },
54 { 1, 3, -1 },
55 { 1, 1, -1 },
56};
57
58void mainboard_early_init(int s3resume)
59{
60}
61
62void mainboard_config_superio(void)
63{
64}
65
66void mainboard_get_spd(spd_raw_data *spd, bool id_only)
67{
68 read_spd(&spd[0], 0x50, id_only);
69 read_spd(&spd[2], 0x51, id_only);
70}