Nick Vaccaro has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/45946 )
Change subject: mb/google/volteer: add mainboard_supports_usb4() ......................................................................
mb/google/volteer: add mainboard_supports_usb4()
Implement mainboard_supports_usb4() to allow soc code to disable the USB4/TBT in the cases where we're on SKUs without USB4 hardware.
BUG=b:167983038 TEST=none
Change-Id: Iab23c07e15f754ca807f128b9edad7fdc9a44b9d Signed-off-by: Nick Vaccaro nvaccaro@google.com --- M src/mainboard/google/volteer/Makefile.inc A src/mainboard/google/volteer/mainboard_support.c 2 files changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/45946/1
diff --git a/src/mainboard/google/volteer/Makefile.inc b/src/mainboard/google/volteer/Makefile.inc index c01f993..d07588b 100644 --- a/src/mainboard/google/volteer/Makefile.inc +++ b/src/mainboard/google/volteer/Makefile.inc @@ -4,12 +4,14 @@ bootblock-y += bootblock.c
romstage-$(CONFIG_CHROMEOS) += chromeos.c +romstage-y += mainboard_support.c romstage-y += romstage.c
ramstage-$(CONFIG_CHROMEOS) += chromeos.c ramstage-y += ec.c ramstage-$(CONFIG_FW_CONFIG) += fw_config.c ramstage-y += mainboard.c +ramstage-y += mainboard_support.c
smm-y += smihandler.c
diff --git a/src/mainboard/google/volteer/mainboard_support.c b/src/mainboard/google/volteer/mainboard_support.c new file mode 100644 index 0000000..9be2e51 --- /dev/null +++ b/src/mainboard/google/volteer/mainboard_support.c @@ -0,0 +1,8 @@ +#include <soc/mainboard_support.h> +#include <fw_config.h> + +bool mainboard_supports_usb4(void) +{ + return (fw_config_probe(FW_CONFIG(DB_USB, USB4_GEN2)) || + fw_config_probe(FW_CONFIG(DB_USB, USB4_GEN3))); +}
Nick Vaccaro has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45946 )
Change subject: mb/google/volteer: add mainboard_supports_usb4() ......................................................................
Patch Set 4:
This change is ready for review.
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Duncan Laurie, Derek Huang,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45946
to look at the new patch set (#5).
Change subject: mb/google/volteer: add strong version of mainboard_supports_usb4() ......................................................................
mb/google/volteer: add strong version of mainboard_supports_usb4()
Implement mainboard_supports_usb4() to instruct soc code to disable USB4/TBT in cases where USB4 hardware is not available.
BUG=b:167983038 TEST=none
Change-Id: Iab23c07e15f754ca807f128b9edad7fdc9a44b9d Signed-off-by: Nick Vaccaro nvaccaro@google.com --- M src/mainboard/google/volteer/Makefile.inc A src/mainboard/google/volteer/mainboard_support.c 2 files changed, 12 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/45946/5
Hello build bot (Jenkins), Furquan Shaikh, Patrick Georgi, Martin Roth, Duncan Laurie, Derek Huang,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45946
to look at the new patch set (#8).
Change subject: mb/google/volteer: disable TBT if no USB4 hardware available ......................................................................
mb/google/volteer: disable TBT if no USB4 hardware available
Implement mainboard_silicon_init_params() to allow for disabling of TBT root ports if the device does not have usb4 hardware.
BUG=b:167983038 TEST=none
Change-Id: Iab23c07e15f754ca807f128b9edad7fdc9a44b9d Signed-off-by: Nick Vaccaro nvaccaro@google.com --- M src/mainboard/google/volteer/mainboard.c M src/mainboard/google/volteer/romstage.c 2 files changed, 27 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/45946/8
Nick Vaccaro has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/45946 )
Change subject: mb/google/volteer: disable TBT if no USB4 hardware available ......................................................................
Abandoned
abandoned for 45961 and 45946
Nick Vaccaro has restored this change. ( https://review.coreboot.org/c/coreboot/+/45946 )
Change subject: mb/google/volteer: disable TBT if no USB4 hardware available ......................................................................
Restored
Hello build bot (Jenkins), Furquan Shaikh, Patrick Georgi, Martin Roth, Duncan Laurie, Derek Huang,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45946
to look at the new patch set (#9).
Change subject: mb/google/volteer: disable TBT if no USB4 hardware available ......................................................................
mb/google/volteer: disable TBT if no USB4 hardware available
Implement mainboard_silicon_init_params() to allow for disabling of TBT root ports if the device does not have usb4 hardware.
Add code to mainboard_memory_init_params() to disable memory-related settings associated with TBT in cases where no usb4 is available.
BUG=b:167983038 TEST=none
Change-Id: Iab23c07e15f754ca807f128b9edad7fdc9a44b9d Signed-off-by: Nick Vaccaro nvaccaro@google.com --- M src/mainboard/google/volteer/mainboard.c M src/mainboard/google/volteer/romstage.c 2 files changed, 27 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/45946/9
Duncan Laurie has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45946 )
Change subject: mb/google/volteer: disable TBT if no USB4 hardware available ......................................................................
Patch Set 9:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45946/9/src/mainboard/google/voltee... File src/mainboard/google/volteer/mainboard.c:
https://review.coreboot.org/c/coreboot/+/45946/9/src/mainboard/google/voltee... PS9, Line 92: ITbtPcieRootPortEn I wonder if you could just memset this whole array to 0? or is the dev check important?
Hello build bot (Jenkins), Furquan Shaikh, Patrick Georgi, Martin Roth, Duncan Laurie, Derek Huang,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45946
to look at the new patch set (#10).
Change subject: mb/google/volteer: disable TBT if no USB4 hardware available ......................................................................
mb/google/volteer: disable TBT if no USB4 hardware available
Implement mainboard_silicon_init_params() to allow for disabling of TBT root ports if the device does not have usb4 hardware.
Add code to mainboard_memory_init_params() to disable memory-related settings associated with TBT in cases where no usb4 is available.
BUG=b:167983038 TEST=none
Change-Id: Iab23c07e15f754ca807f128b9edad7fdc9a44b9d Signed-off-by: Nick Vaccaro nvaccaro@google.com --- M src/mainboard/google/volteer/mainboard.c M src/mainboard/google/volteer/romstage.c 2 files changed, 23 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/45946/10
Nick Vaccaro has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45946 )
Change subject: mb/google/volteer: disable TBT if no USB4 hardware available ......................................................................
Patch Set 10:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45946/9/src/mainboard/google/voltee... File src/mainboard/google/volteer/mainboard.c:
https://review.coreboot.org/c/coreboot/+/45946/9/src/mainboard/google/voltee... PS9, Line 92: ITbtPcieRootPortEn
I wonder if you could just memset this whole array to 0? or is the dev check important?
Good suggestion. Given this logic never set it to 1, only to 0, whether or not dev is enabled isn't really important here (original logic in soc set to 1 or 0, so it was important that it made sure dev was active before setting to 1, but the new logic doesn't need it).
Duncan Laurie has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45946 )
Change subject: mb/google/volteer: disable TBT if no USB4 hardware available ......................................................................
Patch Set 10: Code-Review+2
Duncan Laurie has submitted this change. ( https://review.coreboot.org/c/coreboot/+/45946 )
Change subject: mb/google/volteer: disable TBT if no USB4 hardware available ......................................................................
mb/google/volteer: disable TBT if no USB4 hardware available
Implement mainboard_silicon_init_params() to allow for disabling of TBT root ports if the device does not have usb4 hardware.
Add code to mainboard_memory_init_params() to disable memory-related settings associated with TBT in cases where no usb4 is available.
BUG=b:167983038 TEST=none
Change-Id: Iab23c07e15f754ca807f128b9edad7fdc9a44b9d Signed-off-by: Nick Vaccaro nvaccaro@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/45946 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Duncan Laurie dlaurie@chromium.org --- M src/mainboard/google/volteer/mainboard.c M src/mainboard/google/volteer/romstage.c 2 files changed, 23 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Duncan Laurie: Looks good to me, approved
diff --git a/src/mainboard/google/volteer/mainboard.c b/src/mainboard/google/volteer/mainboard.c index 23c3e92..1fcd5eb 100644 --- a/src/mainboard/google/volteer/mainboard.c +++ b/src/mainboard/google/volteer/mainboard.c @@ -78,6 +78,21 @@ 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 720ab7f..315ec20 100644 --- a/src/mainboard/google/volteer/romstage.c +++ b/src/mainboard/google/volteer/romstage.c @@ -27,4 +27,12 @@ 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; + } }