Shaunak Saha (shaunak.saha(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15325
-gerrit
commit c68a82e3b34d08d653fa84bef1c9de74db186459
Author: Shaunak Saha <shaunak.saha(a)intel.com>
Date: Fri Jun 10 19:36:49 2016 -0700
intel/amenia: Add GPE routing settings
This patch sets the devicetree for gpe0_dw configuration
and also configures the GPIO lines for SCI. EC_SCI_GPI
is configured to proper value.
BUG = chrome-os-partner:53438
TEST = Toggle pch_sci_l from ec console using gpioset command
and see that the sci counter increases in /sys/firmware/acpi/interrupt
and also 9 in /proc/interrupt
Change-Id: I3ae9ef7c6a3c8688bcb6cb4c73f5618e7cde342c
Signed-off-by: Shaunak Saha <shaunak.saha(a)intel.com>
---
src/mainboard/intel/amenia/devicetree.cb | 9 +++++++++
src/mainboard/intel/amenia/ec.h | 8 +++++---
src/mainboard/intel/amenia/gpio.h | 2 +-
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/src/mainboard/intel/amenia/devicetree.cb b/src/mainboard/intel/amenia/devicetree.cb
index 2080d6f..711b96d 100644
--- a/src/mainboard/intel/amenia/devicetree.cb
+++ b/src/mainboard/intel/amenia/devicetree.cb
@@ -15,6 +15,15 @@ chip soc/intel/apollolake
# 0x1A[6:0] stands for 26*125 = 3250 pSec delay for SDR104/HS200
register "emmc_tx_data_cntl1" = "0x1A1A" # HS400 required
+ # GPE configuration
+ # Note that GPE events called out in ASL code rely on this
+ # route, i.e., If this route changes then the affected GPE
+ # offset bits also needs to be changed. This sets the PMC register
+ # GPE_CFG fields.
+ register "gpe0_dw1" = "PMC_GPE_N_31_0"
+ register "gpe0_dw2" = "PMC_GPE_N_63_32"
+ register "gpe0_dw3" = "PMC_GPE_SW_31_0"
+
device domain 0 on
device pci 00.0 on end # - Host Bridge
device pci 00.1 on end # - DPTF
diff --git a/src/mainboard/intel/amenia/ec.h b/src/mainboard/intel/amenia/ec.h
index 91890fd..ba3962a 100644
--- a/src/mainboard/intel/amenia/ec.h
+++ b/src/mainboard/intel/amenia/ec.h
@@ -20,9 +20,11 @@
#include <ec/google/chromeec/ec_commands.h>
-/* This is the GPE status bit.
- TODO: Fix this to proper bit matching GPE routing table */
-#define EC_SCI_GPI 15
+/*
+ * GPIO_11 for SCI is routed to GPE0_DW1 and maps to group GPIO_GPE_N_31_0
+ * which is North community
+ */
+#define EC_SCI_GPI GPE0_DW1_11
#define MAINBOARD_EC_SCI_EVENTS \
(EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED) |\
diff --git a/src/mainboard/intel/amenia/gpio.h b/src/mainboard/intel/amenia/gpio.h
index 87d6190..a39cca3 100644
--- a/src/mainboard/intel/amenia/gpio.h
+++ b/src/mainboard/intel/amenia/gpio.h
@@ -239,7 +239,7 @@ static const struct pad_config gpio_table[] = {
PAD_CFG_NF(GPIO_8, NATIVE, DEEP, NF1),
PAD_CFG_GPI(GPIO_9, UP_20K, DEEP), /* SPI_TPM_IRQ_N */
PAD_NC(GPIO_10, DN_20K), /* RSVD for MIPI (unused) */
- PAD_CFG_GPI_SCI(GPIO_11, UP_20K, DEEP, LEVEL, NONE),
+ PAD_CFG_GPI_SCI(GPIO_11, UP_20K, DEEP, EDGE_SINGLE, INVERT),
/* SOC_WAKE_SCI_N */
PAD_NC(GPIO_12, DN_20K),
PAD_NC(GPIO_13, DN_20K),
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15584
-gerrit
commit 014ca2c634b2bd86692607be5b9fc6efe93289c7
Author: Shelley Chen <shchen(a)chromium.org>
Date: Thu Jun 30 09:39:12 2016 -0700
google/gru: enable EC software sync
Enable CONFIG_EC_SOFTWARE_SYNC. Crossystem needs this to get ec RW/RO
info.
BUG=chrome-os-partner:54566
BRANCH=None
TEST=1. apreset from ec console. Check for
"VbEcSoftwareSync() check for RW update"
string in ap console.
2. Run "ectool version" from OS to check
that RO/RW version are different and
that we're in RW:
RO version: kevin_v1.1.4818-8243672
RW version: kevin_v1.1.4762-1957187
Firmware copy: RW
3. Run crossystem ecfw_act. check for
RW return value.
Change-Id: If6524f2cca4a6223ab9704d0af827e8c1072670f
Signed-off-by: Martin Roth <martinroth(a)chromium.org>
Original-Commit-Id: 0deb0e1c69d6bf21acf7640bf76f9196e14437d7
Original-Change-Id: I0db8235cf7d472f0aa642eea1998282d010d3433
Original-Signed-off-by: Shelley Chen <shchen(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/357811
Original-Reviewed-by: Vadim Bendebury <vbendeb(a)chromium.org>
---
src/mainboard/google/gru/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/mainboard/google/gru/Kconfig b/src/mainboard/google/gru/Kconfig
index 1b42059..56b362f 100644
--- a/src/mainboard/google/gru/Kconfig
+++ b/src/mainboard/google/gru/Kconfig
@@ -39,6 +39,7 @@ config BOARD_SPECIFIC_OPTIONS
config CHROMEOS
select CHROMEOS_VBNV_FLASH
+ select EC_SOFTWARE_SYNC
select VBOOT2_MOCK_SECDATA
select VIRTUAL_DEV_SWITCH
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15580
-gerrit
commit 500837c19b2e49d87798aee54af3df10e8e32705
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Mon Jun 27 19:05:41 2016 -0700
tpm: use 4 byte quantities when retrieving firmware version
The CR50 device is capable of reporting its firmware version in 4 byte
quantities, but the recently introduced code retrieves the version one
byte at a time.
With this fix the version is retrieved in 4 byte chunks.
BRANCH=none
BUG=none
TEST=the version is still reported properly, as reported by the AP
firmware console log:
localhost ~ # grep cr50 /sys/firmware/log
Firmware version: cr50_v1.1.4804-c64cf24
localhost ~ #
Change-Id: Ia7461b758be2287e69a1ba6f038c257f50338199
Signed-off-by: Martin Roth <martinroth(a)chromium.org>
Original-Commit-Id: 3111537e7b66d8507b6608ef665e4cde76403818
Original-Change-Id: I04116881a30001e35e989e51ec1567263f9149a6
Original-Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/356542
Original-Reviewed-by: Andrey Pronin <apronin(a)chromium.org>
---
src/drivers/spi/tpm/tpm.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/drivers/spi/tpm/tpm.c b/src/drivers/spi/tpm/tpm.c
index 1b43bfb..4de62d9 100644
--- a/src/drivers/spi/tpm/tpm.c
+++ b/src/drivers/spi/tpm/tpm.c
@@ -359,7 +359,8 @@ int tpm2_init(struct spi_slave *spi_if)
/* Let's report device FW version if available. */
if (tpm_info.vendor_id == 0x1ae0) {
int chunk_count = 0;
- char vstr[sizeof(cmd) + 1]; /* room for 4 chars + zero */
+ uint32_t chunk = 0;
+ char vstr[sizeof(chunk) + 1]; /* room for 4 chars + zero */
printk(BIOS_INFO, "Firmware version: ");
@@ -367,12 +368,12 @@ int tpm2_init(struct spi_slave *spi_if)
* Does not really matter what's written, this just makes sure
* the version is reported from the beginning.
*/
- tpm2_write_reg(TPM_FW_VER, &cmd, sizeof(cmd));
+ tpm2_write_reg(TPM_FW_VER, &chunk, sizeof(chunk));
/* Print it out in 4 byte chunks. */
vstr[sizeof(vstr) - 1] = 0;
do {
- tpm2_read_reg(TPM_FW_VER, vstr, sizeof(cmd));
+ tpm2_read_reg(TPM_FW_VER, vstr, sizeof(chunk));
printk(BIOS_INFO, "%s", vstr);
/*
@@ -381,7 +382,7 @@ int tpm2_init(struct spi_slave *spi_if)
* This is likely result in one extra printk()
* invocation with an empty string, not a big deal.
*/
- } while (vstr[0] && (chunk_count++ < (200 / sizeof(cmd))));
+ } while (vstr[0] && (chunk_count++ < (200 / sizeof(chunk))));
printk(BIOS_INFO, "\n");
}