summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/google/volteer/mainboard.c15
-rw-r--r--src/mainboard/google/volteer/romstage.c8
2 files changed, 23 insertions, 0 deletions
diff --git a/src/mainboard/google/volteer/mainboard.c b/src/mainboard/google/volteer/mainboard.c
index 23c3e92569..1fcd5eb5ac 100644
--- a/src/mainboard/google/volteer/mainboard.c
+++ b/src/mainboard/google/volteer/mainboard.c
@@ -78,6 +78,21 @@ static void mainboard_chip_init(void *chip_info)
override_pads, override_num);
}
+void mainboard_silicon_init_params(FSP_S_CONFIG *params)
+{
+ bool has_usb4;
+
+ /* If device doesn't have USB4 hardware, disable tbt */
+ has_usb4 = (fw_config_probe(FW_CONFIG(DB_USB, USB4_GEN2)) ||
+ fw_config_probe(FW_CONFIG(DB_USB, USB4_GEN3)));
+
+ if (!has_usb4)
+ memset(params->ITbtPcieRootPortEn,
+ 0,
+ ARRAY_SIZE(params->ITbtPcieRootPortEn) *
+ sizeof(*params->ITbtPcieRootPortEn));
+}
+
struct chip_operations mainboard_ops = {
.init = mainboard_chip_init,
.enable_dev = mainboard_enable,
diff --git a/src/mainboard/google/volteer/romstage.c b/src/mainboard/google/volteer/romstage.c
index 720ab7f3a1..315ec2004a 100644
--- a/src/mainboard/google/volteer/romstage.c
+++ b/src/mainboard/google/volteer/romstage.c
@@ -27,4 +27,12 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
mem_cfg->PchHdaEnable = 0;
meminit_ddr(mem_cfg, board_cfg, &spd_info, half_populated);
+
+ /* Disable TBT if no USB4 hardware */
+ if (!(fw_config_probe(FW_CONFIG(DB_USB, USB4_GEN2)) ||
+ fw_config_probe(FW_CONFIG(DB_USB, USB4_GEN3)))) {
+ mem_cfg->TcssDma0En = 0;
+ mem_cfg->TcssItbtPcie0En = 0;
+ mem_cfg->TcssItbtPcie1En = 0;
+ }
}