From d3ff66d1fb086eaeff9b53dad4175e99bec59879 Mon Sep 17 00:00:00 2001 From: Kun Liu Date: Mon, 11 Dec 2023 11:15:28 +0800 Subject: mb/google/rex/var/screebo: Change GPP_B14 from UP_20K to NONE Change GPP_B14 from UP_20K to NONE for compatible with DVT1 and DVT2 board BUG=b:272447747 TEST=enable usb OC2 function to ensure USBA work normal Change-Id: Ib7720980335660f423b3a74199ceedc113ec70df Signed-off-by: Kun Liu Reviewed-on: https://review.coreboot.org/c/coreboot/+/79431 Reviewed-by: Subrata Banik Reviewed-by: Kapil Porwal Tested-by: build bot (Jenkins) --- src/mainboard/google/rex/variants/screebo/fw_config.c | 12 ++++++++++++ src/mainboard/google/rex/variants/screebo/gpio.c | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'src/mainboard/google/rex/variants') diff --git a/src/mainboard/google/rex/variants/screebo/fw_config.c b/src/mainboard/google/rex/variants/screebo/fw_config.c index 18b1089dbf..2d37cf23a6 100644 --- a/src/mainboard/google/rex/variants/screebo/fw_config.c +++ b/src/mainboard/google/rex/variants/screebo/fw_config.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include +#include #include #include #include @@ -66,8 +67,19 @@ static const struct pad_config bt_i2s_disable_pads[] = { PAD_NC(GPP_VGPIO37, NONE), }; +static const struct pad_config usb_oc2_gpio_pads[] = { + PAD_CFG_NF_LOCK(GPP_B14, UP_20K, NF1, LOCK_CONFIG), +}; + void fw_config_gpio_padbased_override(struct pad_config *padbased_table) { + uint32_t id = 0; + google_chromeec_get_board_version(&id); + if (id == 2 || id == 1) { + printk(BIOS_INFO, "Configure GPIOs for evt and dvt1.\n"); + GPIO_PADBASED_OVERRIDE(padbased_table, usb_oc2_gpio_pads); + } + if (!fw_config_is_provisioned()) { GPIO_PADBASED_OVERRIDE(padbased_table, i2s_disable_pads); GPIO_PADBASED_OVERRIDE(padbased_table, dmic_disable_pads); diff --git a/src/mainboard/google/rex/variants/screebo/gpio.c b/src/mainboard/google/rex/variants/screebo/gpio.c index 277fb88c3d..1712956442 100644 --- a/src/mainboard/google/rex/variants/screebo/gpio.c +++ b/src/mainboard/google/rex/variants/screebo/gpio.c @@ -76,7 +76,7 @@ static const struct pad_config gpio_table[] = { /* GPP_B13 : [] ==> PLT_RST_L */ PAD_CFG_NF(GPP_B13, NONE, DEEP, NF1), /* GPP_B14 : GPP_B14_STRAP ==> USB_OC2 */ - PAD_CFG_NF_LOCK(GPP_B14, UP_20K, NF1, LOCK_CONFIG), + PAD_CFG_NF_LOCK(GPP_B14, NONE, NF1, LOCK_CONFIG), /* GPP_B15 : [] ==> USB_OC3# */ PAD_CFG_NF_LOCK(GPP_B15, NONE, NF1, LOCK_CONFIG), /* GPP_B16 : [] ==> SOC_HDMI_HPD_L */ -- cgit v1.2.3