Angel Pons | 8dcc818 | 2020-04-03 01:21:52 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | /* This file is part of the coreboot project. */ |
Angel Pons | 963500f | 2018-04-29 19:56:49 +0200 | [diff] [blame] | 3 | |
Arthur Heymans | fa5d0f8 | 2019-11-12 19:11:50 +0100 | [diff] [blame] | 4 | #include <bootblock_common.h> |
Angel Pons | 963500f | 2018-04-29 19:56:49 +0200 | [diff] [blame] | 5 | #include <northbridge/intel/sandybridge/raminit_native.h> |
| 6 | #include <northbridge/intel/sandybridge/sandybridge.h> |
| 7 | #include <southbridge/intel/bd82x6x/pch.h> |
| 8 | #include <superio/ite/common/ite.h> |
| 9 | #include <superio/ite/it8728f/it8728f.h> |
| 10 | |
| 11 | #define SUPERIO_GPIO PNP_DEV(0x2e, IT8728F_GPIO) |
| 12 | #define SERIAL_DEV PNP_DEV(0x2e, 0x01) |
| 13 | |
Angel Pons | 963500f | 2018-04-29 19:56:49 +0200 | [diff] [blame] | 14 | const struct southbridge_usb_port mainboard_usb_ports[] = { |
| 15 | { 1, 0, 0 }, |
| 16 | { 1, 0, 0 }, |
| 17 | { 1, 0, 1 }, |
| 18 | { 1, 0, 1 }, |
| 19 | { 1, 0, 2 }, |
| 20 | { 1, 0, 2 }, |
| 21 | { 1, 0, 3 }, |
| 22 | { 1, 0, 3 }, |
| 23 | { 1, 0, 4 }, |
| 24 | { 1, 0, 4 }, |
| 25 | { 1, 0, 6 }, |
| 26 | { 1, 0, 5 }, |
| 27 | { 1, 0, 5 }, |
| 28 | { 1, 0, 6 }, |
| 29 | }; |
| 30 | |
Arthur Heymans | fa5d0f8 | 2019-11-12 19:11:50 +0100 | [diff] [blame] | 31 | void bootblock_mainboard_early_init(void) |
Angel Pons | 963500f | 2018-04-29 19:56:49 +0200 | [diff] [blame] | 32 | { |
Angel Pons | c6b44cd | 2019-03-10 13:21:12 +0100 | [diff] [blame] | 33 | if (!CONFIG(NO_UART_ON_SUPERIO)) { |
| 34 | /* Enable serial port */ |
| 35 | ite_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE); |
| 36 | } |
Angel Pons | 963500f | 2018-04-29 19:56:49 +0200 | [diff] [blame] | 37 | |
Angel Pons | 940bb4e | 2018-06-24 12:02:59 +0200 | [diff] [blame] | 38 | /* Disable SIO WDT which kicks in DualBIOS */ |
| 39 | ite_reg_write(SUPERIO_GPIO, 0xEF, 0x7E); |
Angel Pons | 963500f | 2018-04-29 19:56:49 +0200 | [diff] [blame] | 40 | } |
| 41 | |
| 42 | void mainboard_get_spd(spd_raw_data *spd, bool id_only) |
| 43 | { |
| 44 | read_spd(&spd[0], 0x50, id_only); |
| 45 | read_spd(&spd[2], 0x52, id_only); |
| 46 | } |