Tristan Corrick | 921a4cf | 2018-08-02 19:41:08 +1200 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2018 Tristan Corrick <tristan@corrick.kiwi> |
| 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, either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | */ |
| 16 | |
Tristan Corrick | 921a4cf | 2018-08-02 19:41:08 +1200 | [diff] [blame] | 17 | #include <device/pci_ops.h> |
| 18 | #include <device/dram/ddr3.h> |
| 19 | #include <northbridge/intel/sandybridge/raminit_native.h> |
| 20 | #include <northbridge/intel/sandybridge/sandybridge.h> |
| 21 | #include <southbridge/intel/bd82x6x/pch.h> |
| 22 | #include <superio/nuvoton/common/nuvoton.h> |
| 23 | #include <superio/nuvoton/nct6776/nct6776.h> |
| 24 | |
| 25 | #define SERIAL_DEV PNP_DEV(0x2e, NCT6776_SP1) |
| 26 | |
| 27 | const struct southbridge_usb_port mainboard_usb_ports[] = { |
| 28 | { 1, 0, 0 }, |
| 29 | { 1, 0, 0 }, |
| 30 | { 1, 0, 1 }, |
| 31 | { 1, 0, 1 }, |
| 32 | { 1, 0, 2 }, |
| 33 | { 1, 0, 2 }, |
| 34 | { 1, 0, 3 }, |
| 35 | { 1, 0, 3 }, |
| 36 | { 1, 0, 4 }, |
| 37 | { 1, 0, 4 }, |
| 38 | { 1, 0, 5 }, |
| 39 | { 1, 0, 5 }, |
| 40 | { 1, 0, 6 }, |
| 41 | { 1, 0, 6 }, |
| 42 | }; |
| 43 | |
Arthur Heymans | 2b28a16 | 2019-11-12 17:21:08 +0100 | [diff] [blame^] | 44 | void mainboard_pch_lpc_setup(void) |
Tristan Corrick | 921a4cf | 2018-08-02 19:41:08 +1200 | [diff] [blame] | 45 | { |
| 46 | pci_or_config16(PCH_LPC_DEV, LPC_EN, |
| 47 | CNF1_LPC_EN | KBC_LPC_EN | LPT_LPC_EN | COMA_LPC_EN); |
| 48 | } |
| 49 | |
Tristan Corrick | 921a4cf | 2018-08-02 19:41:08 +1200 | [diff] [blame] | 50 | void mainboard_config_superio(void) |
| 51 | { |
| 52 | nuvoton_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE); |
| 53 | } |
| 54 | |
| 55 | void mainboard_get_spd(spd_raw_data *spd, bool id_only) |
| 56 | { |
| 57 | read_spd(&spd[0], 0x50, id_only); |
| 58 | read_spd(&spd[2], 0x52, id_only); |
| 59 | } |