summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/brox/variants/brox/gpio.c23
-rw-r--r--src/mainboard/google/brox/variants/brox/ramstage.c10
-rw-r--r--src/mainboard/google/brox/variants/brox/variant.c7
3 files changed, 40 insertions, 0 deletions
diff --git a/src/mainboard/google/brox/variants/brox/gpio.c b/src/mainboard/google/brox/variants/brox/gpio.c
index 5af355231a..3f6767e1ae 100644
--- a/src/mainboard/google/brox/variants/brox/gpio.c
+++ b/src/mainboard/google/brox/variants/brox/gpio.c
@@ -1,11 +1,34 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
+#include <baseboard/gpio.h>
#include <baseboard/variants.h>
#include <boardid.h>
#include <soc/gpio.h>
+/* Pad configuration in ramstage */
+static const struct pad_config override_gpio_table[] = {
+ /* GPP_F7 : [NF6: USB_C_GPP_F7] ==> NC */
+ PAD_NC(GPP_F7, NONE),
+ /* GPP_F16 : [NF1: GSXCLK NF3: THC1_SPI2_CS# NF4: GSPI1_CS0# NF6: USB_C_GPP_F16] ==> NC */
+ PAD_NC(GPP_F16, NONE),
+ /* GPP_F17 : [NF3: THC1_SPI2_RST# NF6: USB_C_GPP_F17] ==> NC */
+ PAD_NC(GPP_F17, NONE),
+ /* GPP_F18 : [NF3: THC1_SPI2_INT# NF6: USB_C_GPP_F18] ==> NC */
+ PAD_NC(GPP_F18, NONE),
+ /* GPP_H6 : [NF1: I2C1_SDA NF6: USB_C_GPP_H6] ==> NC */
+ PAD_NC(GPP_H6, NONE),
+ /* GPP_H7 : [NF1: I2C1_SCL NF6: USB_C_GPP_H7] ==> NC */
+ PAD_NC(GPP_H7, NONE),
+};
+
const struct pad_config *variant_gpio_override_table(size_t *num)
{
+ uint32_t board_version = board_id();
+
*num = 0;
+ if (board_version >= 1) {
+ *num = ARRAY_SIZE(override_gpio_table);
+ return override_gpio_table;
+ }
return NULL;
}
diff --git a/src/mainboard/google/brox/variants/brox/ramstage.c b/src/mainboard/google/brox/variants/brox/ramstage.c
index 86418da2ad..c81dd7e8be 100644
--- a/src/mainboard/google/brox/variants/brox/ramstage.c
+++ b/src/mainboard/google/brox/variants/brox/ramstage.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <baseboard/variants.h>
+#include <boardid.h>
#include <device/pci_ids.h>
#include <ec/google/chromeec/ec.h>
#include <intelblocks/power_limit.h>
@@ -44,6 +45,7 @@ const struct psys_config psys_config = {
void __weak variant_devtree_update(void)
{
+ uint32_t board_version = board_id();
printk(BIOS_DEBUG, "WEAK: %s/%s called\n", __FILE__, __func__);
const struct cpu_power_limits *limits = performance_efficient_limits;
@@ -51,4 +53,12 @@ void __weak variant_devtree_update(void)
variant_update_power_limits(limits, limits_size);
variant_update_psys_power_limits(limits, sys_limits, limits_size, &psys_config);
+
+ /* Disable I2C bus device for Touchscreen */
+ if (board_version >= 1) {
+ struct device *i2c1_dev = DEV_PTR(i2c1);
+
+ if (i2c1_dev)
+ i2c1_dev->enabled = false;
+ }
}
diff --git a/src/mainboard/google/brox/variants/brox/variant.c b/src/mainboard/google/brox/variants/brox/variant.c
index e085a86ff8..332d152a8e 100644
--- a/src/mainboard/google/brox/variants/brox/variant.c
+++ b/src/mainboard/google/brox/variants/brox/variant.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <assert.h>
+#include <boardid.h>
#include <baseboard/variants.h>
#include <chip.h>
#include <fw_config.h>
@@ -8,10 +9,16 @@
void variant_update_soc_chip_config(struct soc_intel_alderlake_config *config)
{
+ uint32_t board_version = board_id();
+
if (fw_config_probe(FW_CONFIG(WIFI_BT, WIFI_BT_CNVI))) {
printk(BIOS_INFO, "CNVi bluetooth enabled by fw_config\n");
config->cnvi_bt_core = true;
}
+
+ /* Disable I2C bus device for Touchscreen for board version 1*/
+ if (board_version >= 1)
+ config->serial_io_i2c_mode[PchSerialIoIndexI2C1] = PchSerialIoDisabled;
}
const char *get_wifi_sar_cbfs_filename(void)