mb/google/nissa/var/nivviks: Enable PCIe Wifi GPIOs based on fw_config

PCIe based GPIOs of Wifi7 module are enabled based on firmware config.

BUG=b:345596420
BRANCH=NONE
TEST= Based on fw config configured, wifi6 or wifi7 along with
bluetooth ports are detected.

Change-Id: If0584e91b5143c6df742961657d242c046409b3a
Signed-off-by: Poornima Tom <poornima.tom@intel.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83077
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
diff --git a/src/mainboard/google/brya/variants/nivviks/fw_config.c b/src/mainboard/google/brya/variants/nivviks/fw_config.c
index 8a4655b..5f00892 100644
--- a/src/mainboard/google/brya/variants/nivviks/fw_config.c
+++ b/src/mainboard/google/brya/variants/nivviks/fw_config.c
@@ -94,6 +94,15 @@
 	PAD_NC_LOCK(GPP_E17, NONE, LOCK_CONFIG),
 };
 
+static const struct pad_config wifi_pcie_enable_pad[] = {
+	/* H3 : SX_EXIT_HOLDOFF => WLAN_PCIE_WAKE_ODL */
+	PAD_CFG_GPI_IRQ_WAKE(GPP_H3, NONE, PLTRST, LEVEL, INVERT),
+	/* D7  : SRCCLKREQ2# ==> WLAN_CLKREQ_ODL */
+	PAD_CFG_NF(GPP_D7, NONE, DEEP, NF1),
+	/* H20 : IMGCLKOUT1 ==> WLAN_PERST_L */
+	PAD_CFG_GPO_LOCK(GPP_H20, 1, LOCK_CONFIG),
+};
+
 static const struct pad_config stylus_disable_pads[] = {
 	/* F13 : SOC_PEN_DETECT_R_ODL */
 	PAD_NC_LOCK(GPP_F13, NONE, LOCK_CONFIG),
@@ -117,6 +126,12 @@
 		}
 	}
 
+	if (fw_config_probe(FW_CONFIG(WIFI_CATEGORY, WIFI_7))) {
+		printk(BIOS_INFO, "Enable PCie based Wifi GPIO pins.\n");
+		gpio_padbased_override(padbased_table, wifi_pcie_enable_pad,
+						ARRAY_SIZE(wifi_pcie_enable_pad));
+	}
+
 	if (fw_config_probe(FW_CONFIG(SD_CARD, SD_ABSENT))) {
 		printk(BIOS_INFO, "Disable SD card GPIO pins.\n");
 		gpio_padbased_override(padbased_table, sd_disable_pads,