mainboard/intel/avenuecity_crb: Update full IIO configuration
[coreboot2.git] / src / mainboard / google / octopus / variants / fleex / gpio.c
blobf2e6475cfe31c21a3809d5ece61d4f9bfd45d179
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <baseboard/gpio.h>
4 #include <baseboard/variants.h>
5 #include <gpio.h>
7 static const struct pad_config default_override_table[] = {
8 PAD_NC(GPIO_52, UP_20K),
9 PAD_NC(GPIO_53, UP_20K),
10 /* UART2-CTS_B -- EN_PP3300_DX_LTE_SOC */
11 PAD_CFG_GPO(GPIO_67, 1, PWROK),
12 /* PCIE_WAKE1_B -- FULL_CARD_POWER_OFF */
13 PAD_CFG_GPO(GPIO_117, 1, PWROK),
15 /* GPIO_137 -- HP_INT_ODL and would be amend by SSFC. */
16 PAD_CFG_GPI_APIC_IOS(GPIO_137, NONE, DEEP, LEVEL, INVERT, HIZCRx1, DISPUPD),
18 PAD_NC(GPIO_143, UP_20K),
19 /* GPIO_144 -- Codec reset pin. */
20 PAD_CFG_GPO(GPIO_144, 1, PWROK),
21 PAD_NC(GPIO_145, UP_20K),
23 /* EN_PP3300_TOUCHSCREEN */
24 PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_146, 1, DEEP, NONE, Tx0RxDCRx0, DISPUPD),
25 /* GPIO_105 -- TOUCHSCREEN_RST */
26 PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_105, 0, DEEP, NONE, Tx1RxDCRx0, DISPUPD),
27 /* GPIO_140 -- PEN_RESET */
28 PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_140, 0, DEEP, NONE, Tx1RxDCRx0, DISPUPD),
30 /* AVS_I2S1_MCLK -- PLT_RST_LTE_L */
31 PAD_CFG_GPO(GPIO_161, 1, DEEP),
33 PAD_NC(GPIO_213, DN_20K),
34 PAD_NC(GPIO_214, DN_20K),
37 const struct pad_config *variant_override_gpio_table(size_t *num)
39 *num = ARRAY_SIZE(default_override_table);
41 return default_override_table;
44 static const struct pad_config lte_early_override_table[] = {
45 /* UART2-CTS_B -- EN_PP3300_DX_LTE_SOC */
46 PAD_CFG_GPO(GPIO_67, 1, PWROK),
48 /* PCIE_WAKE1_B -- FULL_CARD_POWER_OFF */
49 PAD_CFG_GPO(GPIO_117, 1, PWROK),
51 /* AVS_I2S1_MCLK -- PLT_RST_LTE_L */
52 PAD_CFG_GPO(GPIO_161, 0, DEEP),
55 const struct pad_config *variant_early_override_gpio_table(size_t *num)
57 *num = ARRAY_SIZE(lte_early_override_table);
59 return lte_early_override_table;
62 /* GPIOs needed to be set in romstage. */
63 static const struct pad_config romstage_gpio_table[] = {
64 /* Enable touchscreen, hold in reset */
65 /* EN_PP3300_TOUCHSCREEN */
66 PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_146, 1, DEEP, NONE, Tx0RxDCRx0, DISPUPD),
67 /* GPIO_105 -- TOUCHSCREEN_RST */
68 PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_105, 1, DEEP, NONE, Tx1RxDCRx0, DISPUPD),
69 /* GPIO_140 -- PEN_RESET */
70 PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_140, 1, DEEP, NONE, Tx1RxDCRx0, DISPUPD),
73 const struct pad_config *variant_romstage_gpio_table(size_t *num)
75 *num = ARRAY_SIZE(romstage_gpio_table);
76 return romstage_gpio_table;