1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <baseboard/gpio.h>
4 #include <baseboard/variants.h>
7 static const struct pad_config default_override_table
[] = {
8 PAD_NC(GPIO_50
, UP_20K
), /* PCH_I2C_PEN_SDA -- unused */
9 PAD_NC(GPIO_51
, UP_20K
), /* PCH_I2C_PEN_SCL -- unused */
10 PAD_NC(GPIO_52
, UP_20K
), /* PCH_I2C_P_SENSOR_SDA -- unused */
11 PAD_NC(GPIO_53
, UP_20K
), /* PCH_I2C_P_SENSOR_SCL -- unused */
13 PAD_NC(GPIO_67
, UP_20K
), /* EN_PP3300_DX_LTE_SOC -- unused */
15 PAD_NC(GPIO_117
, UP_20K
), /* PCIE_WAKE1_B -- LTE_WAKE_L - No LTE*/
17 PAD_NC(GPIO_138
, UP_20K
), /* PEN_PDCT_ODL -- unused */
18 PAD_NC(GPIO_139
, UP_20K
), /* PEN_INT_ODL -- unused */
19 PAD_NC(GPIO_140
, UP_20K
), /* PEN_RESET -- unused */
21 PAD_NC(GPIO_143
, UP_20K
), /* LTE_SAR_ODL -- unused */
22 PAD_NC(GPIO_144
, UP_20K
), /* PEN_EJECT(wake) -- unused */
23 PAD_NC(GPIO_145
, UP_20K
), /* PEN_EJECT(notification) -- unused */
25 PAD_NC(GPIO_161
, UP_20K
), /* LTE_OFF_ODL -- unused */
27 /* GPIO_137 -- HP_INT_ODL and would be amend by SSFC. */
28 PAD_CFG_GPI_APIC_IOS(GPIO_137
, NONE
, DEEP
, LEVEL
, INVERT
, HIZCRx1
,
31 /* GPIO_105 -- TOUCHSCREEN_RST */
32 PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_105
, 0, DEEP
, NONE
, Tx1RxDCRx0
, DISPUPD
),
33 /* EN_PP3300_TOUCHSCREEN */
34 PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_146
, 1, DEEP
, NONE
, Tx0RxDCRx0
,
38 const struct pad_config
*variant_override_gpio_table(size_t *num
)
40 *num
= ARRAY_SIZE(default_override_table
);
41 return default_override_table
;
44 /* GPIOs needed to be set in romstage. */
45 static const struct pad_config romstage_gpio_table
[] = {
46 /* Enable touchscreen, hold in reset */
47 /* EN_PP3300_TOUCHSCREEN */
48 PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_146
, 1, DEEP
, NONE
, Tx0RxDCRx0
, DISPUPD
),
49 /* GPIO_105 -- TOUCHSCREEN_RST */
50 PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_105
, 1, DEEP
, NONE
, Tx1RxDCRx0
, DISPUPD
),
53 const struct pad_config
*variant_romstage_gpio_table(size_t *num
)
55 *num
= ARRAY_SIZE(romstage_gpio_table
);
56 return romstage_gpio_table
;