Robert Chen has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/78253?usp=email )
Change subject: mb/google/nissa/var/quandiso: Disable SD card GPIOs with fw_config ......................................................................
mb/google/nissa/var/quandiso: Disable SD card GPIOs with fw_config
BUG=b:29656936 BRANCH=firmware-nissa-15217.B TEST=emerge-nissa coreboot
Change-Id: Iad6789d42b9a3f9b979fd481a88cc7d69db2dcfe Signed-off-by: Robert Chen robert.chen@quanta.corp-partner.google.com --- M src/mainboard/google/brya/variants/quandiso/fw_config.c M src/mainboard/google/brya/variants/quandiso/gpio.c 2 files changed, 17 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/53/78253/1
diff --git a/src/mainboard/google/brya/variants/quandiso/fw_config.c b/src/mainboard/google/brya/variants/quandiso/fw_config.c index e9a81a4..dcaa237 100644 --- a/src/mainboard/google/brya/variants/quandiso/fw_config.c +++ b/src/mainboard/google/brya/variants/quandiso/fw_config.c @@ -57,6 +57,17 @@ PAD_NC_LOCK(GPP_F15, NONE, LOCK_CONFIG), };
+static const struct pad_config sd_disable_pads[] = { + /* D8 : SD_CLKREQ_ODL */ + PAD_NC(GPP_D8, NONE), + /* D17 : SD_WAKE_N */ + PAD_NC_LOCK(GPP_D17, NONE, LOCK_CONFIG), + /* H12 : SD_PERST_L */ + PAD_NC_LOCK(GPP_H12, NONE, LOCK_CONFIG), + /* H13 : EN_PP3300_SD_X */ + PAD_NC_LOCK(GPP_H13, NONE, LOCK_CONFIG), +}; + static const struct pad_config disable_wifi_pch_susclk[] = { /* GPD8 ==> NC */ PAD_NC(GPD8, NONE), @@ -79,6 +90,11 @@ gpio_padbased_override(padbased_table, stylus_disable_pads, ARRAY_SIZE(stylus_disable_pads)); } + 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, + ARRAY_SIZE(sd_disable_pads)); + } if (fw_config_probe(FW_CONFIG(WIFI_SAR_ID, SAR_ID_3))) { printk(BIOS_INFO, "Disable PCH SUSCLK.\n"); gpio_padbased_override(padbased_table, disable_wifi_pch_susclk, diff --git a/src/mainboard/google/brya/variants/quandiso/gpio.c b/src/mainboard/google/brya/variants/quandiso/gpio.c index f98b5f8..633d2d0 100644 --- a/src/mainboard/google/brya/variants/quandiso/gpio.c +++ b/src/mainboard/google/brya/variants/quandiso/gpio.c @@ -90,7 +90,7 @@ /* C1 : SMBDATA ==> USI_RST_L */ PAD_CFG_GPO(GPP_C1, 0, DEEP), /* H12 : UART0_RTS# ==> SD_PERST_L */ - PAD_CFG_GPO(GPP_H12, 0, DEEP), + PAD_CFG_GPO(GPP_H12, 1, DEEP), /* H20 : IMGCLKOUT1 ==> WLAN_PERST_L */ PAD_CFG_GPO(GPP_H20, 1, DEEP), };