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