You-Cheng Syu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30978
Change subject: google/kukui: Support I2C TPM and stop supporting SPI TPM ......................................................................
google/kukui: Support I2C TPM and stop supporting SPI TPM
Kukui TPM is going to move from SPI to I2C. This CL makes coreboot supports I2C TPM on Kukui. To make things easier, SPI TPM on Kukui is no longer supported.
BRANCH=none BUG=b:117916698 TEST=none
Change-Id: I194de167aa946d592ba20cff15f076739e5cc096 Signed-off-by: You-Cheng Syu youcheng@google.com --- M src/mainboard/google/kukui/Kconfig M src/mainboard/google/kukui/verstage.c 2 files changed, 9 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/30978/1
diff --git a/src/mainboard/google/kukui/Kconfig b/src/mainboard/google/kukui/Kconfig index 7635e5f..5de6b5b 100644 --- a/src/mainboard/google/kukui/Kconfig +++ b/src/mainboard/google/kukui/Kconfig @@ -35,7 +35,7 @@ select EC_GOOGLE_CHROMEEC select EC_GOOGLE_CHROMEEC_BOARDID select EC_GOOGLE_CHROMEEC_SPI - select MAINBOARD_HAS_SPI_TPM_CR50 if VBOOT + select MAINBOARD_HAS_I2C_TPM_CR50 if VBOOT select MAINBOARD_HAS_TPM2 if VBOOT
config MAINBOARD_DIR @@ -47,9 +47,13 @@ default "Kukui" if BOARD_GOOGLE_KUKUI default "Flapjack" if BOARD_GOOGLE_FLAPJACK
-config DRIVER_TPM_SPI_BUS +config DRIVER_TPM_I2C_BUS hex - default 0x0 + default 0x6 + +config DRIVER_TPM_I2C_ADDR + hex + default 0x50
config BOOT_DEVICE_SPI_FLASH_BUS int diff --git a/src/mainboard/google/kukui/verstage.c b/src/mainboard/google/kukui/verstage.c index 9bf93bf..f80fcc1 100644 --- a/src/mainboard/google/kukui/verstage.c +++ b/src/mainboard/google/kukui/verstage.c @@ -15,12 +15,12 @@
#include <security/vboot/vboot_common.h> #include <soc/gpio.h> -#include <soc/spi.h> +#include <soc/i2c.h>
#include "gpio.h"
void verstage_mainboard_init(void) { - mtk_spi_init(CONFIG_DRIVER_TPM_SPI_BUS, SPI_PAD0_MASK, 1 * MHz); + mtk_i2c_bus_init(CONFIG_DRIVER_TPM_I2C_BUS); gpio_eint_configure(CR50_IRQ, IRQ_TYPE_EDGE_RISING); }
You-Cheng Syu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30978 )
Change subject: google/kukui: Support I2C TPM and stop supporting SPI TPM ......................................................................
Patch Set 1: Code-Review-1
This doesn't work for now. Still checking.
Hello Tristan Hsieh, Hung-Te Lin, build bot (Jenkins), wang qii, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/30978
to look at the new patch set (#2).
Change subject: google/kukui: Change TPM interface from SPI to I2C ......................................................................
google/kukui: Change TPM interface from SPI to I2C
This CL changes Kukui TPM interface from SPI to I2C. To make things easier, SPI TPM is no longer supported. If older Kukui board is detected, show an error message and halt.
BRANCH=none BUG=b:117916698 TEST='trunks_client --status' shows 'Platform hierarchy enabled: false'
Change-Id: I194de167aa946d592ba20cff15f076739e5cc096 Signed-off-by: You-Cheng Syu youcheng@google.com --- M src/mainboard/google/kukui/Kconfig M src/mainboard/google/kukui/verstage.c 2 files changed, 15 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/30978/2
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30978 )
Change subject: google/kukui: Change TPM interface from SPI to I2C ......................................................................
Patch Set 2: Code-Review+2
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30978 )
Change subject: google/kukui: Change TPM interface from SPI to I2C ......................................................................
Patch Set 2: -Code-Review
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30978 )
Change subject: google/kukui: Change TPM interface from SPI to I2C ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/#/c/30978/2/src/mainboard/google/kukui/verstage.... File src/mainboard/google/kukui/verstage.c:
https://review.coreboot.org/#/c/30978/2/src/mainboard/google/kukui/verstage.... PS2, Line 26: if (IS_ENABLED(CONFIG_BOARD_GOOGLE_KUKUI) && board_id() < 2) { : die("This board is no longer supported. " : "Please use older AP firmware.\n"); : } Seems like talking to EC may have some problem here in verstage.
We should check if P1 units can still enter rom stage without this assertion. If yes, then this can be moved to romstage or even later.
Nicolas Boichat has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30978 )
Change subject: google/kukui: Change TPM interface from SPI to I2C ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/#/c/30978/2/src/mainboard/google/kukui/verstage.... File src/mainboard/google/kukui/verstage.c:
https://review.coreboot.org/#/c/30978/2/src/mainboard/google/kukui/verstage.... PS2, Line 26: if (IS_ENABLED(CONFIG_BOARD_GOOGLE_KUKUI) && board_id() < 2) { : die("This board is no longer supported. " : "Please use older AP firmware.\n"); : }
Seems like talking to EC may have some problem here in verstage. […]
Or just deprecate rev1 (this CL can still be reverted to build FW for rev1 as long as we need them): that's what we're doing on the EC side.
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30978 )
Change subject: google/kukui: Change TPM interface from SPI to I2C ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/#/c/30978/2/src/mainboard/google/kukui/verstage.... File src/mainboard/google/kukui/verstage.c:
https://review.coreboot.org/#/c/30978/2/src/mainboard/google/kukui/verstage.... PS2, Line 26: if (IS_ENABLED(CONFIG_BOARD_GOOGLE_KUKUI) && board_id() < 2) { : die("This board is no longer supported. " : "Please use older AP firmware.\n"); : }
Or just deprecate rev1 (this CL can still be reverted to build FW for rev1 as long as we need them): […]
I think during the transition we do want something to make it easier identifying if people has installed wrong firmware, especially we're recently delivering both P1 and P2 firmware at the same time.
@youcheng, what about moving the board_id check to a separate CL, mark as DO NOT MERGE, and only apply it in your local P2 builds? (i.e., it does not need to live in review.coreboot.org, can be in chromium gerrit)
Hello Tristan Hsieh, Hung-Te Lin, build bot (Jenkins), wang qii, Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/30978
to look at the new patch set (#3).
Change subject: google/kukui: Change TPM interface from SPI to I2C ......................................................................
google/kukui: Change TPM interface from SPI to I2C
This CL changes Kukui TPM interface from SPI to I2C. To make things easier, SPI TPM is no longer supported.
BRANCH=none BUG=b:117916698 TEST='trunks_client --status' shows 'Platform hierarchy enabled: false' on new Kukui boards.
Change-Id: I194de167aa946d592ba20cff15f076739e5cc096 Signed-off-by: You-Cheng Syu youcheng@google.com --- M src/mainboard/google/kukui/Kconfig M src/mainboard/google/kukui/early_init.c 2 files changed, 9 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/30978/3
You-Cheng Syu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30978 )
Change subject: google/kukui: Change TPM interface from SPI to I2C ......................................................................
Patch Set 3: Code-Review-1
This CL depends on MT8183 I2C CLs (30974, 30975, 30976).
You-Cheng Syu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30978 )
Change subject: google/kukui: Change TPM interface from SPI to I2C ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/#/c/30978/2/src/mainboard/google/kukui/verstage.... File src/mainboard/google/kukui/verstage.c:
https://review.coreboot.org/#/c/30978/2/src/mainboard/google/kukui/verstage.... PS2, Line 26: if (IS_ENABLED(CONFIG_BOARD_GOOGLE_KUKUI) && board_id() < 2) { : die("This board is no longer supported. " : "Please use older AP firmware.\n"); : }
I think during the transition we do want something to make it easier identifying if people has insta […]
Uploaded the checking part as a separate CL in http://crosreview.com/1466261
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30978 )
Change subject: google/kukui: Change TPM interface from SPI to I2C ......................................................................
Patch Set 3: Code-Review+1
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30978 )
Change subject: google/kukui: Change TPM interface from SPI to I2C ......................................................................
Patch Set 3: Code-Review-1
We don't have plan to change TPM interface now. Please abandon this change.
You-Cheng Syu has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/30978 )
Change subject: google/kukui: Change TPM interface from SPI to I2C ......................................................................
Abandoned