blob: 745cb82cb3185d8a232070e684b098e228efcb6b [file] [log] [blame]
Michał Żygowski83565de2019-03-27 11:35:48 +01001/* SPDX-License-Identifier: GPL-2.0-or-later */
Michał Żygowski83565de2019-03-27 11:35:48 +01002
3#include <device/pci_ops.h>
4#include <soc/lpc.h>
5#include <soc/pci_devs.h>
6#include <soc/romstage.h>
7#include <superio/ite/common/ite.h>
8#include <superio/ite/it8613e/it8613e.h>
9
10#define SERIAL1_DEV PNP_DEV(0x2e, IT8613E_SP1)
11
12void mainboard_after_memory_init(void)
13{
14 /*
Martin Roth50863da2021-10-01 14:37:30 -060015 * FSP enables internal UART. Disable it and re-enable Super I/O UART to
Michał Żygowski83565de2019-03-27 11:35:48 +010016 * prevent loss of debug information on serial.
17 */
Elyes Haouas486240f2022-11-18 15:21:03 +010018 pci_write_config32(PCI_DEV(0, LPC_DEV, 0), UART_CONT, (u32)0);
Michał Żygowski83565de2019-03-27 11:35:48 +010019 ite_enable_serial(SERIAL1_DEV, CONFIG_TTYS0_BASE);
20}
21
22void mainboard_memory_init_params(struct romstage_params *params,
23 MEMORY_INIT_UPD *memory_params)
24{
25 /*
26 * Set SPD and memory configuration:
27 * Memory type: 0=DimmInstalled,
28 * 1=SolderDownMemory,
29 * 2=DimmDisabled
30 */
31 memory_params->PcdMemChannel0Config = 0;
32 memory_params->PcdMemChannel1Config = 2;
33}