Angel Pons | 08b5280 | 2020-04-05 13:22:20 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Furquan Shaikh | ae2cf49 | 2018-11-21 14:02:59 -0800 | [diff] [blame] | 2 | |
| 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. */ |
| 9 | static 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 | /* |
| 28 | * ESPI_IO1 acts as ALERT# (which is open-drain) and requies a weak |
| 29 | * 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 | |
| 36 | const struct pad_config *variant_early_gpio_table(size_t *num) |
| 37 | { |
| 38 | *num = ARRAY_SIZE(early_gpio_table); |
| 39 | return early_gpio_table; |
| 40 | } |