devmaster64 | 3f888ef | 2019-01-09 11:42:32 +0530 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
devmaster64 | 3f888ef | 2019-01-09 11:42:32 +0530 | [diff] [blame] | 4 | * |
| 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU General Public License as |
| 7 | * published by the Free Software Foundation; version 2 of |
| 8 | * 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 | |
Arthur Heymans | fa5d0f8 | 2019-11-12 19:11:50 +0100 | [diff] [blame] | 16 | #include <bootblock_common.h> |
devmaster64 | 3f888ef | 2019-01-09 11:42:32 +0530 | [diff] [blame] | 17 | #include <northbridge/intel/sandybridge/sandybridge.h> |
Kyösti Mälkki | 3855c01 | 2019-03-03 08:45:19 +0200 | [diff] [blame] | 18 | #include <device/pnp_ops.h> |
devmaster64 | 3f888ef | 2019-01-09 11:42:32 +0530 | [diff] [blame] | 19 | #include <northbridge/intel/sandybridge/raminit_native.h> |
| 20 | #include <southbridge/intel/bd82x6x/pch.h> |
| 21 | #include <superio/nuvoton/common/nuvoton.h> |
| 22 | #include <superio/nuvoton/nct6779d/nct6779d.h> |
| 23 | |
| 24 | #define SIO_PORT 0x2e |
| 25 | #define SIO_DEV PNP_DEV(SIO_PORT, 0) |
| 26 | #define ACPI_DEV PNP_DEV(SIO_PORT, NCT6779D_ACPI) |
| 27 | |
devmaster64 | 3f888ef | 2019-01-09 11:42:32 +0530 | [diff] [blame] | 28 | const struct southbridge_usb_port mainboard_usb_ports[] = { |
| 29 | { 1, 0, 0 }, |
| 30 | { 1, 0, 0 }, |
| 31 | { 1, 0, 1 }, |
| 32 | { 1, 0, 1 }, |
| 33 | { 1, 0, 2 }, |
| 34 | { 1, 0, 2 }, |
| 35 | { 1, 0, 3 }, |
| 36 | { 1, 0, 3 }, |
| 37 | { 1, 0, 4 }, |
| 38 | { 1, 0, 4 }, |
| 39 | { 1, 0, 6 }, |
| 40 | { 1, 0, 5 }, |
| 41 | { 1, 0, 5 }, |
| 42 | { 1, 0, 6 }, |
| 43 | }; |
| 44 | |
Arthur Heymans | fa5d0f8 | 2019-11-12 19:11:50 +0100 | [diff] [blame] | 45 | void bootblock_mainboard_early_init(void) |
devmaster64 | 3f888ef | 2019-01-09 11:42:32 +0530 | [diff] [blame] | 46 | { |
| 47 | nuvoton_pnp_enter_conf_state(SIO_DEV); |
| 48 | pnp_set_logical_device(ACPI_DEV); |
| 49 | pnp_write_config(ACPI_DEV, 0xe4, 0x10); |
| 50 | nuvoton_pnp_exit_conf_state(SIO_DEV); |
| 51 | } |
| 52 | |
| 53 | void mainboard_get_spd(spd_raw_data *spd, bool id_only) |
| 54 | { |
| 55 | read_spd(&spd[0], 0x50, id_only); |
| 56 | read_spd(&spd[2], 0x52, id_only); |
| 57 | } |