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>
This commit is contained in:
Poornima Tom 2024-06-14 04:24:34 +05:30 committed by Subrata Banik
parent a4756e3890
commit b80a691f15

View File

@ -94,6 +94,15 @@ static const struct pad_config nvme_disable_pads[] = {
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 @@ void fw_config_gpio_padbased_override(struct pad_config *padbased_table)
}
}
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,