V Sowmya | 1b150cb | 2021-01-15 14:01:54 +0530 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 2 | |
| 3 | #include <baseboard/gpio.h> |
| 4 | #include <baseboard/variants.h> |
| 5 | #include <commonlib/helpers.h> |
| 6 | |
| 7 | /* Early pad configuration in bootblock */ |
| 8 | static const struct pad_config early_gpio_table[] = { |
| 9 | |
| 10 | /* UART0 RX */ |
| 11 | PAD_CFG_NF(GPP_H10, NONE, DEEP, NF2), |
| 12 | /* UART0 TX */ |
| 13 | PAD_CFG_NF(GPP_H11, NONE, DEEP, NF2), |
| 14 | /* A7 : MEM_STRAP_0 */ |
| 15 | PAD_CFG_GPI(GPP_A7, NONE, DEEP), |
| 16 | /* A17 : MEM_CH_SEL */ |
| 17 | PAD_CFG_GPI(GPP_A17, NONE, DEEP), |
| 18 | /* A19 : MEM_STRAP_2 */ |
| 19 | PAD_CFG_GPI(GPP_A19, NONE, DEEP), |
| 20 | /* A20 : MEM_STRAP_1 */ |
| 21 | PAD_CFG_GPI(GPP_A20, NONE, DEEP), |
| 22 | /* B11 : PCH_WP_OD */ |
| 23 | PAD_CFG_GPI_GPIO_DRIVER(GPP_B11, NONE, DEEP), |
| 24 | |
| 25 | /* C0 : EN_PP3300_WLAN */ |
| 26 | PAD_CFG_GPO(GPP_C0, 1, DEEP), |
| 27 | /* C3 : H1_PCH_INT_ODL */ |
| 28 | PAD_CFG_GPI_APIC(GPP_C3, NONE, PLTRST, LEVEL, INVERT), |
| 29 | |
| 30 | /* D10 : EN_PP3300_WWAN */ |
| 31 | PAD_CFG_GPO(GPP_D10, 1, DEEP), |
| 32 | |
| 33 | /* E10 : PCH_GSPI0_H1_TPM_CS_L */ |
| 34 | PAD_CFG_NF(GPP_E10, NONE, DEEP, NF7), |
| 35 | /* E11 : PCH_GSPI0_H1_TPM_CLK */ |
| 36 | PAD_CFG_NF(GPP_E11, NONE, DEEP, NF7), |
| 37 | /* E12 : PCH_GSPIO_H1_TPM_MISO */ |
| 38 | PAD_CFG_NF(GPP_E12, NONE, DEEP, NF7), |
| 39 | /* E13 : PCH_GSPI0_H1_TPM_MOSI_STRAP */ |
| 40 | PAD_CFG_NF(GPP_E13, NONE, DEEP, NF7), |
| 41 | |
| 42 | /* F14 : WLAN_PERST_L */ |
| 43 | PAD_CFG_GPO(GPP_F14, 1, DEEP), |
| 44 | /* F20 : WWAN_RST_ODL |
| 45 | To meet timing constraints - drive reset low. |
| 46 | Deasserted in ramstage. */ |
| 47 | PAD_CFG_GPO(GPP_F20, 0, DEEP), |
| 48 | }; |
| 49 | |
| 50 | void variant_configure_early_gpio_pads(void) |
| 51 | { |
| 52 | gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table)); |
| 53 | } |