coreboot-kgpe-d16/src/mainboard/google/gru/Kconfig
Jes B. Klinke c6b041a12e tpm: Refactor TPM Kconfig dimensions
Break TPM related Kconfig into the following dimensions:

TPM transport support:
config CRB_TPM
config I2C_TPM
config SPI_TPM
config MEMORY_MAPPED_TPM (new)

TPM brand, not defining any of these is valid, and result in "generic" support:
config TPM_ATMEL (new)
config TPM_GOOGLE (new)
config TPM_GOOGLE_CR50 (new, implies TPM_GOOGLE)
config TPM_GOOGLE_TI50 (new to be used later, implies TPM_GOOGLE)

What protocol the TPM chip supports:
config MAINBOARD_HAS_TPM1
config MAINBOARD_HAS_TPM2

What the user chooses to compile (restricted by the above):
config NO_TPM
config TPM1
config TPM2

The following Kconfigs will be replaced as indicated:
config TPM_CR50 -> TPM_GOOGLE
config MAINBOARD_HAS_CRB_TPM -> CRB_TPM
config MAINBOARD_HAS_I2C_TPM_ATMEL -> I2C_TPM && TPM_ATMEL
config MAINBOARD_HAS_I2C_TPM_CR50 -> I2C_TPM && TPM_GOOGLE
config MAINBOARD_HAS_I2C_TPM_GENERIC -> I2C_TPM && !TPM_GOOGLE && !TPM_ATMEL
config MAINBOARD_HAS_LPC_TPM -> MEMORY_MAPPED_TPM
config MAINBOARD_HAS_SPI_TPM -> SPI_TPM && !TPM_GOOGLE && !TPM_ATMEL
config MAINBOARD_HAS_SPI_TPM_CR50 -> SPI_TPM && TPM_GOOGLE

Signed-off-by: Jes B. Klinke <jbk@chromium.org>
Change-Id: I4656b2b90363b8dfd008dc281ad591862fe2cc9e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63424
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-04-21 23:07:20 +00:00

99 lines
2.4 KiB
Text

## SPDX-License-Identifier: GPL-2.0-only
config BOARD_GOOGLE_GRU_COMMON # Umbrella option to be selected by variant boards.
def_bool n
if BOARD_GOOGLE_GRU_COMMON
# Most Grus have TPM2 but later Kevins don't... decide this in one place for
# convenience. Explicitly override it when building for earlier Kevins.
config GRU_HAS_TPM2
bool "Build for a board revision with a SPI TPM 2.0"
default n if BOARD_GOOGLE_KEVIN
default y
config GRU_HAS_CENTERLOG_PWM
bool
default y if BOARD_GOOGLE_GRU || BOARD_GOOGLE_KEVIN || BOARD_GOOGLE_BOB
default n
config GRU_HAS_WLAN_RESET
bool
default y if BOARD_GOOGLE_GRU || BOARD_GOOGLE_KEVIN || BOARD_GOOGLE_BOB
default n
config GRU_BASEBOARD_SCARLET
bool
default y if BOARD_GOOGLE_SCARLET || BOARD_GOOGLE_RAINIER
default n
config BOARD_SPECIFIC_OPTIONS
def_bool y
select BOARD_ROMSIZE_KB_8192
select COMMON_CBFS_SPI_WRAPPER
select EC_GOOGLE_CHROMEEC
select EC_GOOGLE_CHROMEEC_RTC
select EC_GOOGLE_CHROMEEC_SPI
select MAINBOARD_FORCE_NATIVE_VGA_INIT
select MAINBOARD_HAS_CHROMEOS
select MAINBOARD_HAS_NATIVE_VGA_INIT
select RK3399_SPREAD_SPECTRUM_DDR if BOARD_GOOGLE_BOB
select RTC
select SOC_ROCKCHIP_RK3399
select SPI_FLASH
select SPI_FLASH_GIGADEVICE
select SPI_FLASH_WINBOND
select I2C_TPM if !GRU_HAS_TPM2
select TPM_GOOGLE_CR50 if GRU_HAS_TPM2
select SPI_TPM if GRU_HAS_TPM2
select MAINBOARD_HAS_TPM1 if !GRU_HAS_TPM2
select MAINBOARD_HAS_TPM2 if GRU_HAS_TPM2
config VBOOT
select EC_GOOGLE_CHROMEEC_SWITCHES
select VBOOT_VBNV_FLASH
config MAINBOARD_DIR
default "google/gru"
config EC_GOOGLE_CHROMEEC_SPI_BUS
hex
default 0x5
config BOOT_DEVICE_SPI_FLASH_BUS
int
default 1
config DRIVER_TPM_I2C_BUS
hex
default 0x0
config DRIVER_TPM_I2C_ADDR
hex
default 0x20
config DRIVER_TPM_SPI_BUS
hex
default 0x2 if GRU_BASEBOARD_SCARLET
default 0x0
config CONSOLE_SERIAL_UART_ADDRESS
hex
depends on DRIVERS_UART
default 0xFF1A0000
##########################################################
#### Update below when adding a new derivative board. ####
##########################################################
config DEVICETREE
default "devicetree.scarlet.cb" if BOARD_GOOGLE_SCARLET
config MAINBOARD_PART_NUMBER
default "Scarlet" if BOARD_GOOGLE_SCARLET
default "Bob" if BOARD_GOOGLE_BOB
default "Gru" if BOARD_GOOGLE_GRU
default "Kevin" if BOARD_GOOGLE_KEVIN
default "Nefario" if BOARD_GOOGLE_NEFARIO
default "Rainier" if BOARD_GOOGLE_RAINIER
endif # BOARD_GOOGLE_GRU_COMMON