blob: 775811ba013aec5a20f42ee44822828810d87fd7 [file] [log] [blame]
Angel Pons08b52802020-04-05 13:22:20 +02001/* SPDX-License-Identifier: GPL-2.0-only */
2/* This file is part of the coreboot project. */
Furquan Shaikhae2cf492018-11-21 14:02:59 -08003
4#include <baseboard/gpio.h>
5#include <baseboard/variants.h>
6#include <gpio.h>
7#include <soc/gpio.h>
8
9/* GPIOs needed prior to ramstage. */
10static const struct pad_config early_gpio_table[] = {
11 PAD_CFG_GPI(GPIO_190, NONE, DEEP), /* PCH_WP_OD */
12 /* GSPI0_INT */
13 PAD_CFG_GPI_APIC_IOS(GPIO_63, NONE, DEEP, LEVEL, INVERT, TxDRxE,
14 DISPUPD), /* H1_PCH_INT_ODL */
15 /* GSPI0_CLK */
16 PAD_CFG_NF(GPIO_79, NONE, DEEP, NF1), /* H1_SLAVE_SPI_CLK_R */
17 /* GSPI0_CS# */
18 PAD_CFG_NF(GPIO_80, NONE, DEEP, NF1), /* H1_SLAVE_SPI_CS_L_R */
19 /* GSPI0_MISO */
20 PAD_CFG_NF(GPIO_82, NONE, DEEP, NF1), /* H1_SLAVE_SPI_MISO */
21 /* GSPI0_MOSI */
22 PAD_CFG_NF(GPIO_83, NONE, DEEP, NF1), /* H1_SLAVE_SPI_MOSI_R */
23
24 /* Enable power to wifi early in bootblock and de-assert PERST#. */
25 PAD_CFG_GPO(GPIO_178, 1, DEEP), /* EN_PP3300_WLAN */
26 PAD_CFG_GPO(GPIO_164, 0, DEEP), /* WLAN_PE_RST */
27
28 /*
29 * ESPI_IO1 acts as ALERT# (which is open-drain) and requies a weak
30 * pull-up for proper operation. Since there is no external pull present
31 * on this platform, configure an internal weak pull-up.
32 */
33 PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_151, UP_20K, DEEP, NF2, HIZCRx1,
34 ENPU), /* ESPI_IO1 */
35};
36
37const struct pad_config *variant_early_gpio_table(size_t *num)
38{
39 *num = ARRAY_SIZE(early_gpio_table);
40 return early_gpio_table;
41}