summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKun Liu <liukun11@huaqin.corp-partner.google.com>2023-12-11 11:15:28 +0800
committerFelix Held <felix-coreboot@felixheld.de>2023-12-14 13:08:59 +0000
commitd3ff66d1fb086eaeff9b53dad4175e99bec59879 (patch)
tree1db26ba29ac0e19e2361ada814a93b144bd70d1c /src
parent2d1b5c21f66d8fd177fec470a3ee6affa7bb1835 (diff)
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 <liukun11@huaqin.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79431 Reviewed-by: Subrata Banik <subratabanik@google.com> Reviewed-by: Kapil Porwal <kapilporwal@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/rex/variants/screebo/fw_config.c12
-rw-r--r--src/mainboard/google/rex/variants/screebo/gpio.c2
2 files changed, 13 insertions, 1 deletions
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 <baseboard/variants.h>
+#include <ec/google/chromeec/ec.h>
#include <bootstate.h>
#include <console/console.h>
#include <fw_config.h>
@@ -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 */