From b80a691f1521785d52566bfc38f1755b269c5e7b Mon Sep 17 00:00:00 2001 From: Poornima Tom Date: Fri, 14 Jun 2024 04:24:34 +0530 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/83077 Tested-by: build bot (Jenkins) Reviewed-by: Eric Lai Reviewed-by: Kapil Porwal --- src/mainboard/google/brya/variants/nivviks/fw_config.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/mainboard') diff --git a/src/mainboard/google/brya/variants/nivviks/fw_config.c b/src/mainboard/google/brya/variants/nivviks/fw_config.c index 8a4655bc36..5f008921bc 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 @@ 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, -- cgit v1.2.3