diff --git a/src/mainboard/google/brya/variants/pujjolo/Makefile.mk b/src/mainboard/google/brya/variants/pujjolo/Makefile.mk index 4a6700c6ec..d57029b334 100644 --- a/src/mainboard/google/brya/variants/pujjolo/Makefile.mk +++ b/src/mainboard/google/brya/variants/pujjolo/Makefile.mk @@ -8,3 +8,4 @@ ramstage-y += gpio.c ramstage-y += variant.c ramstage-y += ramstage.c ramstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_HDA_VERB) += hda_verb.c +ramstage-$(CONFIG_FW_CONFIG) += fw_config.c diff --git a/src/mainboard/google/brya/variants/pujjolo/fw_config.c b/src/mainboard/google/brya/variants/pujjolo/fw_config.c new file mode 100644 index 0000000000..02e159d14d --- /dev/null +++ b/src/mainboard/google/brya/variants/pujjolo/fw_config.c @@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include +#include +#include +#include + +static const struct pad_config ish_disable_pads[] = { + /* B3 : ISH_IMU_INT_L */ + PAD_NC_LOCK(GPP_B3, NONE, LOCK_CONFIG), + /* B4 : ISH_ACC_INT_L */ + PAD_NC_LOCK(GPP_B4, NONE, LOCK_CONFIG), + /* B5 : EC_I2C_SENSOR_SDA_SOC */ + PAD_NC_LOCK(GPP_B5, NONE, LOCK_CONFIG), + /* B6 : EC_I2C_SENSOR_SCL_SOC */ + PAD_NC_LOCK(GPP_B6, NONE, LOCK_CONFIG), +}; + +void fw_config_gpio_padbased_override(struct pad_config *padbased_table) +{ + if (fw_config_probe(FW_CONFIG(TABLET_MODE, TABLET_MODE_DISABLE))) { + printk(BIOS_INFO, "Disable ISH-related GPIO pins.\n"); + gpio_padbased_override(padbased_table, ish_disable_pads, + ARRAY_SIZE(ish_disable_pads)); + } +}