devmaster64 | 3f888ef | 2019-01-09 11:42:32 +0530 | [diff] [blame] | 1 | /* |
| 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 | |
Arthur Heymans | fa5d0f8 | 2019-11-12 19:11:50 +0100 | [diff] [blame^] | 18 | #include <bootblock_common.h> |
devmaster64 | 3f888ef | 2019-01-09 11:42:32 +0530 | [diff] [blame] | 19 | #include <northbridge/intel/sandybridge/sandybridge.h> |
Kyösti Mälkki | f1b58b7 | 2019-03-01 13:43:02 +0200 | [diff] [blame] | 20 | #include <device/pci_ops.h> |
Kyösti Mälkki | 3855c01 | 2019-03-03 08:45:19 +0200 | [diff] [blame] | 21 | #include <device/pnp_ops.h> |
devmaster64 | 3f888ef | 2019-01-09 11:42:32 +0530 | [diff] [blame] | 22 | #include <northbridge/intel/sandybridge/raminit_native.h> |
| 23 | #include <southbridge/intel/bd82x6x/pch.h> |
| 24 | #include <superio/nuvoton/common/nuvoton.h> |
| 25 | #include <superio/nuvoton/nct6779d/nct6779d.h> |
| 26 | |
| 27 | #define SIO_PORT 0x2e |
| 28 | #define SIO_DEV PNP_DEV(SIO_PORT, 0) |
| 29 | #define ACPI_DEV PNP_DEV(SIO_PORT, NCT6779D_ACPI) |
| 30 | |
devmaster64 | 3f888ef | 2019-01-09 11:42:32 +0530 | [diff] [blame] | 31 | const struct southbridge_usb_port mainboard_usb_ports[] = { |
| 32 | { 1, 0, 0 }, |
| 33 | { 1, 0, 0 }, |
| 34 | { 1, 0, 1 }, |
| 35 | { 1, 0, 1 }, |
| 36 | { 1, 0, 2 }, |
| 37 | { 1, 0, 2 }, |
| 38 | { 1, 0, 3 }, |
| 39 | { 1, 0, 3 }, |
| 40 | { 1, 0, 4 }, |
| 41 | { 1, 0, 4 }, |
| 42 | { 1, 0, 6 }, |
| 43 | { 1, 0, 5 }, |
| 44 | { 1, 0, 5 }, |
| 45 | { 1, 0, 6 }, |
| 46 | }; |
| 47 | |
Arthur Heymans | fa5d0f8 | 2019-11-12 19:11:50 +0100 | [diff] [blame^] | 48 | void bootblock_mainboard_early_init(void) |
devmaster64 | 3f888ef | 2019-01-09 11:42:32 +0530 | [diff] [blame] | 49 | { |
| 50 | nuvoton_pnp_enter_conf_state(SIO_DEV); |
| 51 | pnp_set_logical_device(ACPI_DEV); |
| 52 | pnp_write_config(ACPI_DEV, 0xe4, 0x10); |
| 53 | nuvoton_pnp_exit_conf_state(SIO_DEV); |
| 54 | } |
| 55 | |
| 56 | void mainboard_get_spd(spd_raw_data *spd, bool id_only) |
| 57 | { |
| 58 | read_spd(&spd[0], 0x50, id_only); |
| 59 | read_spd(&spd[2], 0x52, id_only); |
| 60 | } |