summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2021-03-31 14:35:26 -0600
committerAaron Durbin <adurbin@chromium.org>2021-04-05 14:31:08 +0000
commit7164ad74bf1f2006b85670e9e74aefdf643173a8 (patch)
tree42a47da3020cde9152b2605bec822f046592b878 /src/mainboard/google
parentf7f715dff38c4a629139b2493ed6e0d7cc2eb36f (diff)
mb/google/dedede: add discrete TPM 2.0 configuration
There are forthcoming designs that will be utilizing a discrete TPM 2.0 solution. Split the existing dedede configuration options so future mainboard variants can easily select the appropriate Kconfig option using the newly introduced options: - BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50 - BOARD_GOOGLE_BASEBOARD_DEDEDE_TPM2 The existing variants all select the former option, BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50 since all those designs currently utilize Cr50. BUG=b:184151664 Change-Id: I2bdb1ca4fd78cc0628256d49678ea042c55f6fba Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/52030 Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Aseda Aboagye <aaboagye@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/dedede/Kconfig41
-rw-r--r--src/mainboard/google/dedede/Kconfig.name38
-rw-r--r--src/mainboard/google/dedede/mainboard.c3
-rw-r--r--src/mainboard/google/dedede/variants/baseboard/gpio.c10
4 files changed, 62 insertions, 30 deletions
diff --git a/src/mainboard/google/dedede/Kconfig b/src/mainboard/google/dedede/Kconfig
index 9f19dea484..66541b66bc 100644
--- a/src/mainboard/google/dedede/Kconfig
+++ b/src/mainboard/google/dedede/Kconfig
@@ -1,7 +1,6 @@
config BOARD_GOOGLE_BASEBOARD_DEDEDE
def_bool n
select BOARD_ROMSIZE_KB_16384 if !BOARD_ROMSIZE_KB_32768
- select CR50_USE_LONG_INTERRUPT_PULSES
select DPTF_USE_EISA_HID
select DRIVERS_GENERIC_GPIO_KEYS
select DRIVERS_I2C_GENERIC
@@ -22,7 +21,6 @@ config BOARD_GOOGLE_BASEBOARD_DEDEDE
select HAVE_ACPI_TABLES
select INTEL_LPSS_UART_FOR_CONSOLE
select MAINBOARD_HAS_CHROMEOS
- select MAINBOARD_HAS_SPI_TPM_CR50
select MAINBOARD_HAS_TPM2
select SOC_INTEL_JASPERLAKE
select SOC_INTEL_COMMON_BLOCK_DTT
@@ -32,6 +30,17 @@ config BOARD_GOOGLE_BASEBOARD_DEDEDE
select SOC_INTEL_COMMON_BLOCK_IPU
select DRIVERS_GENERIC_ALC1015
+config BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
+ def_bool n
+ select CR50_USE_LONG_INTERRUPT_PULSES
+ select MAINBOARD_HAS_SPI_TPM_CR50
+ select BOARD_GOOGLE_BASEBOARD_DEDEDE
+
+config BOARD_GOOGLE_BASEBOARD_DEDEDE_TPM2
+ def_bool n
+ select MAINBOARD_HAS_LPC_TPM
+ select BOARD_GOOGLE_BASEBOARD_DEDEDE
+
if BOARD_GOOGLE_BASEBOARD_DEDEDE
config BASEBOARD_DEDEDE_LAPTOP
@@ -39,7 +48,7 @@ config BASEBOARD_DEDEDE_LAPTOP
select SYSTEM_TYPE_LAPTOP
config CHROMEOS
- select CHROMEOS_CSE_BOARD_RESET_OVERRIDE
+ select CHROMEOS_CSE_BOARD_RESET_OVERRIDE if BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
select CHROMEOS_DRAM_PART_NUMBER_IN_CBI
select EC_GOOGLE_CHROMEEC_SWITCHES
select GBB_FLAG_FORCE_DEV_SWITCH_ON
@@ -65,9 +74,6 @@ config DIMM_SPD_SIZE
int
default 512
-config DRIVER_TPM_SPI_BUS
- default 0x1
-
config FMDFILE
string
default "src/mainboard/\$(CONFIG_MAINBOARD_DIR)/chromeos-dedede-16MiB.fmd" if BOARD_ROMSIZE_KB_16384
@@ -111,10 +117,6 @@ config OVERRIDE_DEVICETREE
string
default "variants/\$(CONFIG_VARIANT_DIR)/overridetree.cb" if !BOARD_GOOGLE_DEDEDE
-config TPM_TIS_ACPI_INTERRUPT
- int
- default 4 # GPE0_DW0_4 (GPP_B4)
-
config UART_FOR_CONSOLE
int
default 2
@@ -142,3 +144,22 @@ config VARIANT_DIR
default "cret" if BOARD_GOOGLE_CRET
endif #BOARD_GOOGLE_BASEBOARD_DEDEDE
+
+if BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
+
+config DRIVER_TPM_SPI_BUS
+ default 0x1
+
+config TPM_TIS_ACPI_INTERRUPT
+ int
+ default 4 # GPE0_DW0_4 (GPP_B4)
+
+endif #BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
+
+if BOARD_GOOGLE_BASEBOARD_DEDEDE_TPM2
+
+config TPM_PIRQ
+ hex
+ default 0x24 # GPP_B4_IRQ
+
+endif #BOARD_GOOGLE_BASEBOARD_DEDEDE_TPM2
diff --git a/src/mainboard/google/dedede/Kconfig.name b/src/mainboard/google/dedede/Kconfig.name
index 0361e8523c..5b6a41f305 100644
--- a/src/mainboard/google/dedede/Kconfig.name
+++ b/src/mainboard/google/dedede/Kconfig.name
@@ -1,24 +1,24 @@
config BOARD_GOOGLE_BOTEN
bool "Boten"
- select BOARD_GOOGLE_BASEBOARD_DEDEDE
+ select BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
select BASEBOARD_DEDEDE_LAPTOP
select GEO_SAR_ENABLE if CHROMEOS_WIFI_SAR
config BOARD_GOOGLE_BOTEN_LEGACY
bool "Boten (Legacy)"
- select BOARD_GOOGLE_BASEBOARD_DEDEDE
+ select BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
select BASEBOARD_DEDEDE_LAPTOP
select BOARD_ROMSIZE_KB_32768
config BOARD_GOOGLE_DEDEDE
bool "Dedede"
- select BOARD_GOOGLE_BASEBOARD_DEDEDE
+ select BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
select BASEBOARD_DEDEDE_LAPTOP
select BOARD_ROMSIZE_KB_32768
config BOARD_GOOGLE_DRAWCIA
bool "Drawcia"
- select BOARD_GOOGLE_BASEBOARD_DEDEDE
+ select BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
select BASEBOARD_DEDEDE_LAPTOP
select DRIVERS_GENERIC_MAX98357A
select GEO_SAR_ENABLE if CHROMEOS_WIFI_SAR
@@ -27,7 +27,7 @@ config BOARD_GOOGLE_DRAWCIA
config BOARD_GOOGLE_DRAWCIA_LEGACY
bool "Drawcia (Legacy)"
- select BOARD_GOOGLE_BASEBOARD_DEDEDE
+ select BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
select BASEBOARD_DEDEDE_LAPTOP
select BOARD_ROMSIZE_KB_32768
select DRIVERS_GENERIC_MAX98357A
@@ -36,14 +36,14 @@ config BOARD_GOOGLE_DRAWCIA_LEGACY
config BOARD_GOOGLE_MADOO
bool "-> Madoo"
- select BOARD_GOOGLE_BASEBOARD_DEDEDE
+ select BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
select BASEBOARD_DEDEDE_LAPTOP
select DRIVERS_GENERIC_MAX98357A
select GEO_SAR_ENABLE if CHROMEOS_WIFI_SAR
config BOARD_GOOGLE_WADDLEDOO
bool "Waddledoo"
- select BOARD_GOOGLE_BASEBOARD_DEDEDE
+ select BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
select BASEBOARD_DEDEDE_LAPTOP
select BOARD_ROMSIZE_KB_32768
select DRIVERS_GENERIC_MAX98357A
@@ -53,18 +53,18 @@ config BOARD_GOOGLE_WADDLEDOO
config BOARD_GOOGLE_WADDLEDEE
bool "Waddledee"
- select BOARD_GOOGLE_BASEBOARD_DEDEDE
+ select BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
select BASEBOARD_DEDEDE_LAPTOP
select BOARD_ROMSIZE_KB_32768
config BOARD_GOOGLE_WHEELIE
bool "Wheelie"
- select BOARD_GOOGLE_BASEBOARD_DEDEDE
+ select BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
select BASEBOARD_DEDEDE_LAPTOP
config BOARD_GOOGLE_MAGOLOR
bool "-> Magolor"
- select BOARD_GOOGLE_BASEBOARD_DEDEDE
+ select BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
select BASEBOARD_DEDEDE_LAPTOP
select DRIVERS_INTEL_MIPI_CAMERA
select GEO_SAR_ENABLE if CHROMEOS_WIFI_SAR
@@ -72,24 +72,24 @@ config BOARD_GOOGLE_MAGOLOR
config BOARD_GOOGLE_METAKNIGHT
bool "-> Metaknight"
- select BOARD_GOOGLE_BASEBOARD_DEDEDE
+ select BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
select BASEBOARD_DEDEDE_LAPTOP
config BOARD_GOOGLE_LANTIS
bool "-> Lantis"
- select BOARD_GOOGLE_BASEBOARD_DEDEDE
+ select BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
select BASEBOARD_DEDEDE_LAPTOP
select DRIVERS_GENERIC_MAX98357A
config BOARD_GOOGLE_GALTIC
bool "-> Galtic"
- select BOARD_GOOGLE_BASEBOARD_DEDEDE
+ select BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
select BASEBOARD_DEDEDE_LAPTOP
select GEO_SAR_ENABLE if CHROMEOS_WIFI_SAR
config BOARD_GOOGLE_SASUKE
bool "-> Sasuke"
- select BOARD_GOOGLE_BASEBOARD_DEDEDE
+ select BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
select BASEBOARD_DEDEDE_LAPTOP
select DRIVERS_GENERIC_MAX98357A
select DRIVERS_I2C_DA7219
@@ -97,30 +97,30 @@ config BOARD_GOOGLE_SASUKE
config BOARD_GOOGLE_STORO
bool "-> Storo"
- select BOARD_GOOGLE_BASEBOARD_DEDEDE
+ select BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
select BASEBOARD_DEDEDE_LAPTOP
select DRIVERS_INTEL_MIPI_CAMERA
select SOC_INTEL_COMMON_BLOCK_IPU
config BOARD_GOOGLE_SASUKETTE
bool "-> Sasukette"
- select BOARD_GOOGLE_BASEBOARD_DEDEDE
+ select BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
select BASEBOARD_DEDEDE_LAPTOP
config BOARD_GOOGLE_KRACKO
bool "-> Kracko"
- select BOARD_GOOGLE_BASEBOARD_DEDEDE
+ select BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
select BASEBOARD_DEDEDE_LAPTOP
select DRIVERS_GENERIC_MAX98357A
config BOARD_GOOGLE_BLIPPER
bool "-> Blipper"
- select BOARD_GOOGLE_BASEBOARD_DEDEDE
+ select BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
select BASEBOARD_DEDEDE_LAPTOP
config BOARD_GOOGLE_CRET
bool "-> Cret"
- select BOARD_GOOGLE_BASEBOARD_DEDEDE
+ select BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50
select BASEBOARD_DEDEDE_LAPTOP
select DRIVERS_GENERIC_MAX98357A
select DRIVERS_I2C_DA7219
diff --git a/src/mainboard/google/dedede/mainboard.c b/src/mainboard/google/dedede/mainboard.c
index fabdc5e7cc..26afb6974b 100644
--- a/src/mainboard/google/dedede/mainboard.c
+++ b/src/mainboard/google/dedede/mainboard.c
@@ -40,7 +40,8 @@ static void mainboard_init(void *chip_info)
gpio_configure_pads_with_override(base_pads, base_num,
override_pads, override_num);
- mainboard_update_soc_chip_config();
+ if (CONFIG(BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50))
+ mainboard_update_soc_chip_config();
}
static void mainboard_dev_init(struct device *dev)
diff --git a/src/mainboard/google/dedede/variants/baseboard/gpio.c b/src/mainboard/google/dedede/variants/baseboard/gpio.c
index c162ac3780..79bae96476 100644
--- a/src/mainboard/google/dedede/variants/baseboard/gpio.c
+++ b/src/mainboard/google/dedede/variants/baseboard/gpio.c
@@ -72,6 +72,7 @@ static const struct pad_config gpio_table[] = {
PAD_CFG_NF(GPP_B13, NONE, DEEP, NF1),
/* B14 : SPKR/GSPI0_CS1_N */
PAD_NC(GPP_B14, NONE),
+#if CONFIG(BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50)
/* B15 : H1_SLAVE_SPI_CS_L */
PAD_CFG_NF(GPP_B15, NONE, DEEP, NF1),
/* B16 : H1_SLAVE_SPI_CLK */
@@ -80,6 +81,13 @@ static const struct pad_config gpio_table[] = {
PAD_CFG_NF(GPP_B17, NONE, DEEP, NF1),
/* B18 : H1_SLAVE_SPI_MOSI_R */
PAD_CFG_NF(GPP_B18, NONE, DEEP, NF1),
+#else /* BOARD_GOOGLE_BASEBOARD_DEDEDE_TPM2 */
+ /* Nothing connected on GSPI1 */
+ PAD_NC(GPP_B15, NONE),
+ PAD_NC(GPP_B16, NONE),
+ PAD_NC(GPP_B17, NONE),
+ PAD_NC(GPP_B18, NONE),
+#endif
/* B19 : GSPI1_CS0_N */
PAD_NC(GPP_B19, NONE),
/* B20 : GSPI1_CLK */
@@ -389,6 +397,7 @@ static const struct pad_config gpio_table[] = {
static const struct pad_config early_gpio_table[] = {
/* B4 : H1_PCH_INT_ODL */
PAD_CFG_GPI_APIC(GPP_B4, NONE, PLTRST, LEVEL, INVERT),
+#if CONFIG(BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50)
/* B15 : H1_SLAVE_SPI_CS_L */
PAD_CFG_NF(GPP_B15, NONE, DEEP, NF1),
/* B16 : H1_SLAVE_SPI_CLK */
@@ -397,6 +406,7 @@ static const struct pad_config early_gpio_table[] = {
PAD_CFG_NF(GPP_B17, NONE, DEEP, NF1),
/* B18 : H1_SLAVE_SPI_MOSI_R */
PAD_CFG_NF(GPP_B18, NONE, DEEP, NF1),
+#endif
/* C0 : RAM_STRAP_0 */
PAD_CFG_GPI(GPP_C0, NONE, DEEP),