summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/sarien/Kconfig5
-rw-r--r--src/mainboard/google/sarien/variants/sarien/Makefile.inc2
-rw-r--r--src/mainboard/google/sarien/variants/sarien/devicetree.cb13
-rw-r--r--src/mainboard/google/sarien/variants/sarien/ramstage.c73
4 files changed, 1 insertions, 92 deletions
diff --git a/src/mainboard/google/sarien/Kconfig b/src/mainboard/google/sarien/Kconfig
index 9d658fa3a2..f1046ec952 100644
--- a/src/mainboard/google/sarien/Kconfig
+++ b/src/mainboard/google/sarien/Kconfig
@@ -100,11 +100,6 @@ config DEVICETREE
string
default "variants/$(CONFIG_VARIANT_DIR)/devicetree.cb"
-config TOUCHSCREEN_HID
- string "Specify the touchscreen HID enabled for the OS"
- default "WCOM48E2" if BOARD_GOOGLE_ARCADA
- default "ELAN900C" if BOARD_GOOGLE_SARIEN
-
config VBOOT
select HAS_RECOVERY_MRC_CACHE
select MRC_CLEAR_NORMAL_CACHE_ON_RECOVERY_RETRAIN
diff --git a/src/mainboard/google/sarien/variants/sarien/Makefile.inc b/src/mainboard/google/sarien/variants/sarien/Makefile.inc
index fa5b2ea36a..2bf028eb1f 100644
--- a/src/mainboard/google/sarien/variants/sarien/Makefile.inc
+++ b/src/mainboard/google/sarien/variants/sarien/Makefile.inc
@@ -14,6 +14,6 @@
##
bootblock-y += gpio.c
-ramstage-y += gpio.c ramstage.c
+ramstage-y += gpio.c
romstage-y += gpio.c
verstage-y += gpio.c
diff --git a/src/mainboard/google/sarien/variants/sarien/devicetree.cb b/src/mainboard/google/sarien/variants/sarien/devicetree.cb
index 12e5dea4aa..d5e8afbc34 100644
--- a/src/mainboard/google/sarien/variants/sarien/devicetree.cb
+++ b/src/mainboard/google/sarien/variants/sarien/devicetree.cb
@@ -306,19 +306,6 @@ chip soc/intel/cannonlake
device pci 14.5 off end # SDCard
device pci 15.0 on
chip drivers/i2c/hid
- register "generic.hid" = ""ACPI0C50""
- register "generic.desc" = ""Touchscreen""
- register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_C23_IRQ)"
- register "generic.probed" = "1"
- register "generic.enable_gpio" =
- "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_E7)"
- register "generic.enable_delay_ms" = "5"
- register "generic.enable_off_delay_ms" = "100"
- register "generic.has_power_resource" = "1"
- register "hid_desc_reg_offset" = "0x0"
- device i2c 10 on end
- end
- chip drivers/i2c/hid
register "generic.hid" = ""ELAN900C""
register "generic.desc" = ""ELAN Touchscreen""
register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_C23_IRQ)"
diff --git a/src/mainboard/google/sarien/variants/sarien/ramstage.c b/src/mainboard/google/sarien/variants/sarien/ramstage.c
deleted file mode 100644
index d20260cc91..0000000000
--- a/src/mainboard/google/sarien/variants/sarien/ramstage.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2019 Google LLC
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#include <bootstate.h>
-#include <console/console.h>
-#include <device/device.h>
-#include <drivers/i2c/hid/chip.h>
-#include <drivers/vpd/vpd.h>
-#include <soc/pci_devs.h>
-#include <string.h>
-
-/*
- * This board may have different touchscreen devices that are at the
- * same I2C slave address but need different drivers or ACPI configuration.
- *
- * The default touchscreen to be enabled is specified in Kconfig by the
- * ACPI HID of the device. If a board is connected to a different
- * touchscreen device it can be enabled in Kconfig or by setting the
- * VPD key 'touchscreen_hid'.
- */
-
-#define TOUCHSCREEN_I2C_ADDR 0x10
-#define TOUCHSCREEN_VPD_KEY "touchscreen_hid"
-
-static void disable_unused_touchscreen(void *unused)
-{
- struct device *i2c0 = PCH_DEV_I2C0;
- struct bus *i2c_slaves = i2c0->link_list;
- struct device *slave = i2c_slaves->children;
- char touchscreen_hid[9] = CONFIG_TOUCHSCREEN_HID;
- struct drivers_i2c_hid_config *info;
-
- /* Look for VPD key that indicates which touchscreen is present */
- if (CONFIG(VPD) &&
- !vpd_gets(TOUCHSCREEN_VPD_KEY, touchscreen_hid,
- ARRAY_SIZE(touchscreen_hid), VPD_ANY))
- printk(BIOS_INFO, "%s: VPD key '%s' not found, default to %s\n",
- __func__, TOUCHSCREEN_VPD_KEY, touchscreen_hid);
-
- /* Go through all I2C slave devices on this bus */
- while (slave) {
- /* Find all the I2C slaves with the matching address */
- if (slave->path.type == DEVICE_PATH_I2C &&
- slave->path.i2c.device == TOUCHSCREEN_I2C_ADDR) {
- info = slave->chip_info;
- /* Disable all devices except the matching HID */
- if (strncmp(info->generic.hid, touchscreen_hid,
- ARRAY_SIZE(touchscreen_hid))) {
- printk(BIOS_INFO, "%s: Disable %s\n", __func__,
- info->generic.hid);
- slave->enabled = 0;
- } else {
- printk(BIOS_INFO, "%s: Enable %s\n", __func__,
- info->generic.hid);
- }
- }
- slave = slave->sibling;
- }
-}
-BOOT_STATE_INIT_ENTRY(BS_WRITE_TABLES, BS_ON_ENTRY,
- disable_unused_touchscreen, NULL);