mb/google/fatcat/var/fatcat: Refactor GPIO programming for UFS support
[coreboot.git] / src / mainboard / google / brya / variants / xivu / fw_config.c
blob0016a0ca752d371044b934c9ccb04058d6a39645
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
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 wfc_disable_pads[] = {
9 /* D3 : WCAM_RST_L */
10 PAD_NC_LOCK(GPP_D3, NONE, LOCK_CONFIG),
11 /* D15 : EN_PP2800_WCAM_X */
12 PAD_NC_LOCK(GPP_D15, NONE, LOCK_CONFIG),
13 /* D16 : EN_PP1800_PP1200_WCAM_X */
14 PAD_NC_LOCK(GPP_D16, NONE, LOCK_CONFIG),
15 /* H22 : WCAM_MCLK_R */
16 PAD_NC(GPP_H22, NONE),
19 void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
21 if (fw_config_probe(FW_CONFIG(WFC, WFC_ABSENT))) {
22 printk(BIOS_INFO, "Disable MIPI WFC GPIO pins.\n");
23 gpio_padbased_override(padbased_table, wfc_disable_pads,
24 ARRAY_SIZE(wfc_disable_pads));