aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/google/rex
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google/rex')
-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 */