From 7dccc596f0768651f03701257d1cd1307dfe5257 Mon Sep 17 00:00:00 2001 From: Wisley Chen Date: Fri, 1 Sep 2023 16:17:13 +0800 Subject: mb/google/nissa/var/yaviks: Disable AUX pins based on FW_CONFIG Configure the AUX pins as NC based on the FW_CONFIG setting when the C1 port is not present. BUG=b:294456574 BRANCH=firmware-nissa-15217.B TEST=emerge-nissa coreboot Change-Id: I24fb8f16c2e3b05edf1056b5687ae5ea28c022c0 Signed-off-by: Wisley Chen Reviewed-on: https://review.coreboot.org/c/coreboot/+/77604 Tested-by: build bot (Jenkins) Reviewed-by: Derek Huang Reviewed-by: Eric Lai --- src/mainboard/google/brya/variants/yaviks/fw_config.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/mainboard/google/brya/variants/yaviks') diff --git a/src/mainboard/google/brya/variants/yaviks/fw_config.c b/src/mainboard/google/brya/variants/yaviks/fw_config.c index c889c43cdf..544511eba6 100644 --- a/src/mainboard/google/brya/variants/yaviks/fw_config.c +++ b/src/mainboard/google/brya/variants/yaviks/fw_config.c @@ -66,6 +66,13 @@ static const struct pad_config disable_wifi_pch_susclk[] = { PAD_NC(GPD8, NONE), }; +static const struct pad_config disable_usbc1_pins[] = { + /* GPP_A21: USB_C1_AUX_DC_P => NC */ + PAD_NC(GPP_A21, NONE), + /* GPP_A22: USB_C1_AUX_DC_N => NC */ + PAD_NC(GPP_A22, NONE), +}; + void fw_config_gpio_padbased_override(struct pad_config *padbased_table) { if (fw_config_is_provisioned() && !fw_config_probe(FW_CONFIG(STORAGE, STORAGE_EMMC))) { @@ -73,6 +80,11 @@ void fw_config_gpio_padbased_override(struct pad_config *padbased_table) gpio_padbased_override(padbased_table, emmc_disable_pads, ARRAY_SIZE(emmc_disable_pads)); } + if (fw_config_is_provisioned() && fw_config_probe(FW_CONFIG(DB_USB, DB_1A))) { + printk(BIOS_INFO, "Disable USBC1 AUX Pins.\n"); + gpio_padbased_override(padbased_table, disable_usbc1_pins, + ARRAY_SIZE(disable_usbc1_pins)); + } if (!fw_config_probe(FW_CONFIG(DB_USB, DB_1C_LTE))) { printk(BIOS_INFO, "Disable LTE-related GPIO pins on yavilla.\n"); gpio_padbased_override(padbased_table, lte_disable_pads_yavilla, -- cgit v1.2.3