mb/google/fatcat/var/fatcat: Refactor GPIO programming for UFS support
[coreboot.git] / src / mainboard / google / brya / variants / dochi / fw_config.c
blob59013d0126b424e7f84a3cf9cc841c8ad43da12f
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <baseboard/gpio.h>
4 #include <baseboard/variants.h>
5 #include <console/console.h>
6 #include <fw_config.h>
8 static const struct pad_config fp_disable_pads[] = {
9 PAD_NC(GPP_D0, NONE), /* D0 : ISH_GP0 ==> PCH_FP_BOOT0 */
10 PAD_NC(GPP_D1, NONE), /* D1 : ISH_GP1 ==> FP_RST_ODL */
11 PAD_NC(GPP_D2, NONE), /* D2 : ISH_GP2 ==> EN_FP_PWR */
14 void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
16 if (fw_config_probe(FW_CONFIG(FP_MCU, FP_ABSENT))) {
17 printk(BIOS_INFO, "Configure GPIOs for no FP module.\n");
18 gpio_padbased_override(padbased_table, fp_disable_pads, ARRAY_SIZE(fp_disable_pads));