Felix Singer has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31660
Change subject: inteltool: Skylake GPIOs #2
......................................................................
inteltool: Skylake GPIOs #2
Used Intel documents:
- 332995-001EN
- 332996-002EN
Change-Id: Ic006d9c094f9fe1ad419cb0168ada45b7dd81732
Signed-off-by: Felix Singer <migy(a)darmstadt.ccc.de>
---
M util/inteltool/gpio.c
M util/inteltool/gpio_groups.c
2 files changed, 6 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/31660/1
diff --git a/util/inteltool/gpio.c b/util/inteltool/gpio.c
index a87ae35..52eae09 100644
--- a/util/inteltool/gpio.c
+++ b/util/inteltool/gpio.c
@@ -1027,6 +1027,9 @@
case PCI_DEVICE_ID_INTEL_B150:
case PCI_DEVICE_ID_INTEL_CM236:
case PCI_DEVICE_ID_INTEL_DNV_LPC:
+ case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_BASE_1:
+ case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_PREM_1:
+ case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_Y_PREM_1:
case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_BASE_2:
case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_PREM_2:
case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_Y_PREM_2:
diff --git a/util/inteltool/gpio_groups.c b/util/inteltool/gpio_groups.c
index d61438b..5abb570 100644
--- a/util/inteltool/gpio_groups.c
+++ b/util/inteltool/gpio_groups.c
@@ -908,6 +908,9 @@
communities = sunrise_communities;
pcr_init(sb);
break;
+ case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_BASE_1:
+ case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_PREM_1:
+ case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_Y_PREM_1:
case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_BASE_2:
case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_PREM_2:
case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_Y_PREM_2:
--
To view, visit https://review.coreboot.org/c/coreboot/+/31660
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ic006d9c094f9fe1ad419cb0168ada45b7dd81732
Gerrit-Change-Number: 31660
Gerrit-PatchSet: 1
Gerrit-Owner: Felix Singer <migy(a)darmstadt.ccc.de>
Gerrit-MessageType: newchange
Gaggery Tsai has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30754
Change subject: mb/google/poppy/variant/atlas: enable USB acpi
......................................................................
mb/google/poppy/variant/atlas: enable USB acpi
Main objective for this change is to export the bluetooth reset
gpio to the kernel for use in an rf-kill operation.
To do so, we enable USB acpi and define all of the USB2 devices,
which includes bluetooth's reset gpio information.
BUG=b:122540489
BRANCH=None
TEST=emerge-atlas coreboot chromeos-bootimage
$cat sys/firmware/acpi/tables/SSDT > /tmp/ssdt.dat &
retrieve ssdt.dat from DUT &
$iasl -d ./ssdt.dat & check the HS03 node is with "reset-gpio"
under _DSD object
Change-Id: I411ef707782655361bd1b8ac2b914b8ae64defeb
Signed-off-by: Gaggery Tsai <gaggery.tsai(a)intel.com>
---
M src/mainboard/google/poppy/Kconfig
M src/mainboard/google/poppy/variants/atlas/devicetree.cb
2 files changed, 25 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/54/30754/1
diff --git a/src/mainboard/google/poppy/Kconfig b/src/mainboard/google/poppy/Kconfig
index 59abe72..197986d 100644
--- a/src/mainboard/google/poppy/Kconfig
+++ b/src/mainboard/google/poppy/Kconfig
@@ -150,6 +150,7 @@
select DRIVERS_I2C_MAX98373
select DRIVERS_I2C_DA7219
select DRIVERS_SPI_ACPI
+ select DRIVERS_USB_ACPI
select EXCLUDE_NATIVE_SD_INTERFACE
select MAINBOARD_HAS_SPI_TPM_CR50
select VARIANT_HAS_CAMERA_ACPI
diff --git a/src/mainboard/google/poppy/variants/atlas/devicetree.cb b/src/mainboard/google/poppy/variants/atlas/devicetree.cb
index f8a6e6d..97c10b0 100644
--- a/src/mainboard/google/poppy/variants/atlas/devicetree.cb
+++ b/src/mainboard/google/poppy/variants/atlas/devicetree.cb
@@ -268,7 +268,30 @@
device pci 00.0 on end # Host Bridge
device pci 02.0 on end # Integrated Graphics Device
device pci 13.0 off end # Integrated Sensor Hub
- device pci 14.0 on end # USB xHCI
+ device pci 14.0 on
+ chip drivers/usb/acpi
+ register "desc" = ""Root Hub""
+ register "type" = "UPC_TYPE_HUB"
+ device usb 0.0 on
+ chip drivers/usb/acpi
+ register "desc" = ""USB Type C Port 1""
+ register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
+ device usb 2.0 on end
+ end
+ chip drivers/usb/acpi
+ register "desc" = ""Bluetooth""
+ register "type" = "UPC_TYPE_INTERNAL"
+ register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_E2)"
+ device usb 2.2 on end
+ end
+ chip drivers/usb/acpi
+ register "desc" = ""USB Type C Port 2""
+ register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
+ device usb 2.4 on end
+ end
+ end
+ end
+ end # USB xHCI
device pci 14.1 on end # USB xDCI (OTG)
device pci 14.2 on end # Thermal Subsystem
device pci 15.0 on
--
To view, visit https://review.coreboot.org/c/coreboot/+/30754
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I411ef707782655361bd1b8ac2b914b8ae64defeb
Gerrit-Change-Number: 30754
Gerrit-PatchSet: 1
Gerrit-Owner: Gaggery Tsai <gaggery.tsai(a)intel.com>
Gerrit-MessageType: newchange
Tim Wawrzynczak has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32006
Change subject: fleex: Add VPD entry for deciding which touchscreen ACPI nodes to generate.
......................................................................
fleex: Add VPD entry for deciding which touchscreen ACPI nodes to generate.
Fleex has the option of two different touchscreens, WDT or Elan. A new
VPD entry will go along with this (key="touchscreen", value="wdt" or "elan").
If the VPD entry exists, only one ACPI node will be generated for that I2C bus.
If no entry exists, or no tag is specified in the device tree, then both
nodes will be generated and it will be up to the kernel to probe for them.
Change-Id: I0e0a9f96f3d3de9be36b218600268711b80c18b9
Signed-off-by: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
---
M src/drivers/i2c/generic/chip.h
M src/drivers/i2c/generic/generic.c
M src/mainboard/google/octopus/variants/fleex/overridetree.cb
M src/vendorcode/google/chromeos/Makefile.inc
A src/vendorcode/google/chromeos/vpd_ssdt.c
A src/vendorcode/google/chromeos/vpd_ssdt.h
6 files changed, 88 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/32006/1
diff --git a/src/drivers/i2c/generic/chip.h b/src/drivers/i2c/generic/chip.h
index 9e2abb9..7cf04cd 100644
--- a/src/drivers/i2c/generic/chip.h
+++ b/src/drivers/i2c/generic/chip.h
@@ -75,6 +75,8 @@
/* Generic properties for exporting device-specific data to the OS */
struct acpi_dp property_list[MAX_GENERIC_PROPERTY_LIST];
int property_count;
+ const char *vpd_string_tag;
+ const char *vpd_string_value;
};
/*
diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c
index 598f211..75a365f 100644
--- a/src/drivers/i2c/generic/generic.c
+++ b/src/drivers/i2c/generic/generic.c
@@ -22,6 +22,8 @@
#include <gpio.h>
#include <stdint.h>
#include <string.h>
+#include <vendorcode/google/chromeos/vpd_ssdt.h>
+
#include "chip.h"
#if CONFIG(HAVE_ACPI_TABLES)
@@ -79,6 +81,11 @@
return;
}
+ if (config->vpd_string_tag && config->vpd_string_value &&
+ !vpd_should_generate_ssdt(config->vpd_string_tag,
+ config->vpd_string_value))
+ return;
+
/* Device */
acpigen_write_scope(scope);
acpigen_write_device(acpi_device_name(dev));
diff --git a/src/mainboard/google/octopus/variants/fleex/overridetree.cb b/src/mainboard/google/octopus/variants/fleex/overridetree.cb
index 19246e0..a368598 100644
--- a/src/mainboard/google/octopus/variants/fleex/overridetree.cb
+++ b/src/mainboard/google/octopus/variants/fleex/overridetree.cb
@@ -122,6 +122,8 @@
register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_146)"
register "enable_delay_ms" = "1"
register "has_power_resource" = "1"
+ register "vpd_string_tag" = ""touchscreen""
+ register "vpd_string_value" = ""elan""
device i2c 10 on end
end
chip drivers/i2c/hid
@@ -136,6 +138,8 @@
register "generic.has_power_resource" = "1"
register "generic.disable_gpio_export_in_crs" = "1"
register "hid_desc_reg_offset" = "0x20"
+ register "generic.vpd_string_tag" = ""touchscreen""
+ register "generic.vpd_string_value" = ""wdt""
device i2c 2c on end
end
end # - I2C 7
diff --git a/src/vendorcode/google/chromeos/Makefile.inc b/src/vendorcode/google/chromeos/Makefile.inc
index 000d056..6776c5f 100644
--- a/src/vendorcode/google/chromeos/Makefile.inc
+++ b/src/vendorcode/google/chromeos/Makefile.inc
@@ -18,6 +18,7 @@
ramstage-$(CONFIG_HAVE_ACPI_TABLES) += acpi.c
ramstage-$(CONFIG_CHROMEOS_RAMOOPS) += ramoops.c
ramstage-y += vpd_mac.c vpd_serialno.c vpd_calibration.c
+ramstage-$(CONFIG_HAVE_ACPI_TABLES) += vpd_ssdt.c
ramstage-$(CONFIG_CHROMEOS_DISABLE_PLATFORM_HIERARCHY_ON_RESUME) += tpm2.c
ramstage-$(CONFIG_HAVE_REGULATORY_DOMAIN) += wrdd.c
ramstage-$(CONFIG_USE_SAR) += sar.c
diff --git a/src/vendorcode/google/chromeos/vpd_ssdt.c b/src/vendorcode/google/chromeos/vpd_ssdt.c
new file mode 100644
index 0000000..7ed0199
--- /dev/null
+++ b/src/vendorcode/google/chromeos/vpd_ssdt.c
@@ -0,0 +1,53 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2019 Google Inc.
+ *
+ * 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 <boot/coreboot_tables.h>
+#include <drivers/vpd/vpd.h>
+
+#include <string.h>
+
+#include "vpd_ssdt.h"
+
+/*
+ * For multi-sourced components, we may decide to store the presence
+ * of one or the other in the VPD area. If that's the case, we can
+ * decide to only populate the ACPI SSDT table with the one that's
+ * actually in the device in question. In that case, we'll search
+ * the VPD tables to find a matching entry; if there is an entry
+ * with the appropriate tag, return true if the value matches, false
+ * otherwise. If there is no entry, then return true as well, meaning
+ * we don't know which component is being used, so the entry should be
+ * available in the SSDT and the kernel can probe for both.
+ */
+int vpd_should_generate_ssdt(const char *key, const char *value)
+{
+ const void *vpd_entry;
+ int size;
+ int keys_cmp;
+
+ vpd_entry = vpd_find(key, &size, VPD_RO);
+
+ /* If no entry was found, then generate an SSDT node */
+ if (!vpd_entry)
+ return 1;
+
+ /* If an entry was found, then compare values */
+ keys_cmp = strncmp((char *)vpd_entry, value, size);
+
+ if (keys_cmp == 0)
+ return 1;
+ else
+ return 0;
+}
diff --git a/src/vendorcode/google/chromeos/vpd_ssdt.h b/src/vendorcode/google/chromeos/vpd_ssdt.h
new file mode 100644
index 0000000..37e887e
--- /dev/null
+++ b/src/vendorcode/google/chromeos/vpd_ssdt.h
@@ -0,0 +1,21 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2019 Google Inc.
+ *
+ * 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.
+ */
+
+#ifndef VPD_ACPI_H
+#define VPD_ACPI_H
+
+int vpd_should_generate_ssdt(const char *key, const char *value);
+
+#endif /* VPD_ACPI_H */
--
To view, visit https://review.coreboot.org/c/coreboot/+/32006
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0e0a9f96f3d3de9be36b218600268711b80c18b9
Gerrit-Change-Number: 32006
Gerrit-PatchSet: 1
Gerrit-Owner: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-MessageType: newchange