Nick Vaccaro has uploaded this change for review.

View Change

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)));
+}

To view, visit change 45946. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iab23c07e15f754ca807f128b9edad7fdc9a44b9d
Gerrit-Change-Number: 45946
Gerrit-PatchSet: 1
Gerrit-Owner: Nick Vaccaro <nvaccaro@google.com>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-MessageType: newchange