Aaron Durbin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/52030 )
Change subject: mb/google/dedede: add discrete TPM 2.0 configuration ......................................................................
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 dededde configuration along these lines so future mainboard variants can take advantage of them.
BUG=b:184151664
Change-Id: I2bdb1ca4fd78cc0628256d49678ea042c55f6fba Signed-off-by: Aaron Durbin adurbin@chromium.org --- M src/mainboard/google/dedede/Kconfig M src/mainboard/google/dedede/Kconfig.name M src/mainboard/google/dedede/mainboard.c M src/mainboard/google/dedede/variants/baseboard/gpio.c 4 files changed, 68 insertions(+), 30 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/30/52030/1
diff --git a/src/mainboard/google/dedede/Kconfig b/src/mainboard/google/dedede/Kconfig index 9f19dea..acc4e20 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 @@ 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,23 @@ 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_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 +54,7 @@ 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 +80,6 @@ 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 +123,6 @@ 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 +150,22 @@ 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 0361e85..5b6a41f 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_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_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_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_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_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 fabdc5e..26afb69 100644 --- a/src/mainboard/google/dedede/mainboard.c +++ b/src/mainboard/google/dedede/mainboard.c @@ -40,7 +40,8 @@ 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 c162ac3..79bae96 100644 --- a/src/mainboard/google/dedede/variants/baseboard/gpio.c +++ b/src/mainboard/google/dedede/variants/baseboard/gpio.c @@ -72,6 +72,7 @@ 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 @@ 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 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 @@ 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),