blob: e97fc4d986c87c70a2d4b66664d7f13e5141477b [file] [log] [blame]
Jonathon Halla86704a2023-09-14 14:41:20 -04001/* SPDX-License-Identifier: GPL-2.0-only */
2
3#include <bootblock_common.h>
Jonathon Halla86704a2023-09-14 14:41:20 -04004#include <delay.h>
5#include <device/pci_ops.h>
6#include <ec/acpi/ec.h>
7#include <gpio.h>
8#include <soc/pci_devs.h>
9
10static const struct pad_config early_gpio_table[] = {
11 PAD_CFG_NF(GPP_C20, NONE, DEEP, NF1), /* UART2_RXD */
12 PAD_CFG_NF(GPP_C21, NONE, DEEP, NF1), /* UART2_TXD */
13};
14
15void bootblock_mainboard_early_init(void)
16{
17 gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table));
18}
19
20void bootblock_mainboard_init(void)
21{
22 /*
23 * Ensure the panel is powered on. ACPI _PTS disables it, if the system
24 * is powered up again we need to turn it on.
25 */
26 ec_write(0xa3, 0);
27}