[coreboot-gerrit] Change in coreboot[master]: mainboard/google/poppy: Add support for cr50 SPI TPM

Furquan Shaikh (Code Review) gerrit at coreboot.org
Tue Apr 11 06:48:50 CEST 2017


Furquan Shaikh has uploaded a new change for review. ( https://review.coreboot.org/19238 )

Change subject: mainboard/google/poppy: Add support for cr50 SPI TPM
......................................................................

mainboard/google/poppy: Add support for cr50 SPI TPM

Put all the configs required for enabling cr50 SPI TPM on poppy under
POPPY_USE_SPI_TPM so that it can be enabled any time for testing SPI
TPM on this board.

Also, add required callback for irq status and devicetree config for
GSPI0.

BUG=b:36873582

Change-Id: I67793093c006c1325fc16f669a96126525f83243
Signed-off-by: Furquan Shaikh <furquan at chromium.org>
---
M src/mainboard/google/poppy/Kconfig
M src/mainboard/google/poppy/chromeos.c
M src/mainboard/google/poppy/devicetree.cb
3 files changed, 24 insertions(+), 0 deletions(-)


  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/38/19238/1

diff --git a/src/mainboard/google/poppy/Kconfig b/src/mainboard/google/poppy/Kconfig
index fc68edf..c6ac413 100644
--- a/src/mainboard/google/poppy/Kconfig
+++ b/src/mainboard/google/poppy/Kconfig
@@ -48,3 +48,14 @@
 	select NHLT_MAX98927
 	select NHLT_RT5663
 endif
+
+config POPPY_USE_SPI_TPM
+	bool
+	default n
+	select MAINBOARD_HAS_SPI_TPM_CR50
+	select MAINBOARD_HAS_TPM2
+	select SPI_TPM
+	select TPM2
+
+config DRIVER_TPM_SPI_BUS
+	default 0x1
diff --git a/src/mainboard/google/poppy/chromeos.c b/src/mainboard/google/poppy/chromeos.c
index 8004d7b..b7877aa 100644
--- a/src/mainboard/google/poppy/chromeos.c
+++ b/src/mainboard/google/poppy/chromeos.c
@@ -13,9 +13,12 @@
  * GNU General Public License for more details.
  */
 
+#include <arch/acpi.h>
 #include <gpio.h>
 #include <rules.h>
+#include <soc/gpe.h>
 #include <soc/gpio.h>
+#include <tpm.h>
 #include <vendorcode/google/chromeos/chromeos.h>
 
 #include "gpio.h"
@@ -53,3 +56,8 @@
 {
 	chromeos_acpi_gpio_generate(cros_gpios, ARRAY_SIZE(cros_gpios));
 }
+
+int tis_plat_irq_status(void)
+{
+	return acpi_get_gpe(GPE0_DW2_00);
+}
diff --git a/src/mainboard/google/poppy/devicetree.cb b/src/mainboard/google/poppy/devicetree.cb
index fcf1066..4c7971c 100644
--- a/src/mainboard/google/poppy/devicetree.cb
+++ b/src/mainboard/google/poppy/devicetree.cb
@@ -157,6 +157,11 @@
 	register "i2c_voltage[4]" = "I2C_VOLTAGE_1V8"		# Camera
 	register "i2c_voltage[5]" = "I2C_VOLTAGE_1V8"		# Audio
 
+	register "gspi[0]" = "{
+		 .speed_mhz = 1,
+		 .early_init = 1,
+	}"
+
 	# Must leave UART0 enabled or SD/eMMC will not work as PCI
 	register "SerialIoDevMode" = "{
 		[PchSerialIoIndexI2C0]  = PchSerialIoPci,

-- 
To view, visit https://review.coreboot.org/19238
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I67793093c006c1325fc16f669a96126525f83243
Gerrit-PatchSet: 1
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Furquan Shaikh <furquan at google.com>



More information about the coreboot-gerrit mailing list