Attention is currently required from: Tim Wawrzynczak. Nick Vaccaro has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/57070 )
Change subject: mb/google/volteer: write tcss config to coreboot tables ......................................................................
mb/google/volteer: write tcss config to coreboot tables
Add variant_get_tcss_sysinfo() to all volteer variants so that the board's tcss configuration information (usb2 and usb3 port number assigments and orientation configuration for SBU and HSL) will be written to the coreboot table, allowing depthcharge access to this information.
BUG=b:149830546 TEST='emerge-volteer coreboot chromeos-bootimage', flash and boot volteer2 to kernel, log in and verify that it wrote the correct tcss information for volteer2 to the coreboot tables: localhost ~ # cbmem -c | grep tcss Passing conn0 tcss info to payload: usb2:9 usb3:1 sbu:0 hsl:0 Passing conn1 tcss info to payload: usb2:4 usb3:2 sbu:0 hsl:0
Change-Id: I5c28d8487f7abb92a19a3140d56a8bd437306a5d Signed-off-by: Nick Vaccaro nvaccaro@google.com --- M src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h A src/mainboard/google/volteer/variants/chronicler/variant.c A src/mainboard/google/volteer/variants/collis/variant.c M src/mainboard/google/volteer/variants/copano/Makefile.inc A src/mainboard/google/volteer/variants/copano/variant.c M src/mainboard/google/volteer/variants/delbin/Makefile.inc A src/mainboard/google/volteer/variants/delbin/variant.c M src/mainboard/google/volteer/variants/drobit/Makefile.inc A src/mainboard/google/volteer/variants/drobit/variant.c A src/mainboard/google/volteer/variants/eldrid/variant.c M src/mainboard/google/volteer/variants/elemi/Makefile.inc A src/mainboard/google/volteer/variants/elemi/variant.c M src/mainboard/google/volteer/variants/lindar/Makefile.inc M src/mainboard/google/volteer/variants/lindar/variant.c M src/mainboard/google/volteer/variants/terrador/Makefile.inc A src/mainboard/google/volteer/variants/terrador/variant.c A src/mainboard/google/volteer/variants/todor/variant.c M src/mainboard/google/volteer/variants/voema/Makefile.inc A src/mainboard/google/volteer/variants/voema/variant.c M src/mainboard/google/volteer/variants/volet/Makefile.inc A src/mainboard/google/volteer/variants/volet/variant.c M src/mainboard/google/volteer/variants/volteer2/variant.c M src/mainboard/google/volteer/variants/voxel/variant.c 23 files changed, 400 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/70/57070/1
diff --git a/src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h index ba4bf7f..5f4424c 100644 --- a/src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/volteer/variants/baseboard/include/baseboard/variants.h @@ -29,4 +29,11 @@ /* Perform variant specific initialization early on in ramstage */ void variant_ramstage_init(void);
+/* + * Get board-specific tcss config information from variant. + * Returns number of ports supported (i.e. number of tcss_config_info records + * filled in). + */ +int variant_get_tcss_sysinfo(struct tcss_config_info *info); + #endif /* __BASEBOARD_VARIANTS_H__ */ diff --git a/src/mainboard/google/volteer/variants/chronicler/variant.c b/src/mainboard/google/volteer/variants/chronicler/variant.c new file mode 100644 index 0000000..9b6bd1e --- /dev/null +++ b/src/mainboard/google/volteer/variants/chronicler/variant.c @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <baseboard/variants.h> +#include <drivers/intel/pmc_mux/conn/chip.h> + +/* + * Passed a pointer to an array of tcss_config_info record structures, + * fill out the tcss related port mapping and orientation information + * for this board. + */ +int variant_get_tcss_sysinfo(struct tcss_config_info *info) +{ + /* Initialize port 0 information */ + info[0].usb2_port_number = 9; + info[0].usb3_port_number = 1; + info[0].sbu_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + info[0].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Initialize port 1 information */ + info[1].usb2_port_number = 4; + info[1].usb3_port_number = 2; + info[1].sbu_orientation = TYPEC_ORIENTATION_NORMAL; + info[1].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Return that we support and returned 2 ports worth of information */ + return 2; +} diff --git a/src/mainboard/google/volteer/variants/collis/variant.c b/src/mainboard/google/volteer/variants/collis/variant.c new file mode 100644 index 0000000..21bb7e8 --- /dev/null +++ b/src/mainboard/google/volteer/variants/collis/variant.c @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <baseboard/variants.h> +#include <drivers/intel/pmc_mux/conn/chip.h> + +/* + * Passed a pointer to an array of tcss_config_info record structures, + * fill out the tcss related port mapping and orientation information + * for this board. + */ +int variant_get_tcss_sysinfo(struct tcss_config_info *info) +{ + /* Initialize port 0 information */ + info[0].usb2_port_number = 5; + info[0].usb3_port_number = 1; + info[0].sbu_orientation = TYPEC_ORIENTATION_NORMAL; + info[0].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Initialize port 1 information */ + info[1].usb2_port_number = 3; + info[1].usb3_port_number = 2; + info[1].sbu_orientation = TYPEC_ORIENTATION_NORMAL; + info[1].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Return that we support and returned 2 ports worth of information */ + return 2; +} diff --git a/src/mainboard/google/volteer/variants/copano/Makefile.inc b/src/mainboard/google/volteer/variants/copano/Makefile.inc index 343c7db..6723fc0 100644 --- a/src/mainboard/google/volteer/variants/copano/Makefile.inc +++ b/src/mainboard/google/volteer/variants/copano/Makefile.inc @@ -5,3 +5,4 @@ bootblock-y += gpio.c
ramstage-y += gpio.c +ramstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_TCSS) += variant.c diff --git a/src/mainboard/google/volteer/variants/copano/variant.c b/src/mainboard/google/volteer/variants/copano/variant.c new file mode 100644 index 0000000..21bb7e8 --- /dev/null +++ b/src/mainboard/google/volteer/variants/copano/variant.c @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <baseboard/variants.h> +#include <drivers/intel/pmc_mux/conn/chip.h> + +/* + * Passed a pointer to an array of tcss_config_info record structures, + * fill out the tcss related port mapping and orientation information + * for this board. + */ +int variant_get_tcss_sysinfo(struct tcss_config_info *info) +{ + /* Initialize port 0 information */ + info[0].usb2_port_number = 5; + info[0].usb3_port_number = 1; + info[0].sbu_orientation = TYPEC_ORIENTATION_NORMAL; + info[0].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Initialize port 1 information */ + info[1].usb2_port_number = 3; + info[1].usb3_port_number = 2; + info[1].sbu_orientation = TYPEC_ORIENTATION_NORMAL; + info[1].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Return that we support and returned 2 ports worth of information */ + return 2; +} diff --git a/src/mainboard/google/volteer/variants/delbin/Makefile.inc b/src/mainboard/google/volteer/variants/delbin/Makefile.inc index 343c7db..6723fc0 100644 --- a/src/mainboard/google/volteer/variants/delbin/Makefile.inc +++ b/src/mainboard/google/volteer/variants/delbin/Makefile.inc @@ -5,3 +5,4 @@ bootblock-y += gpio.c
ramstage-y += gpio.c +ramstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_TCSS) += variant.c diff --git a/src/mainboard/google/volteer/variants/delbin/variant.c b/src/mainboard/google/volteer/variants/delbin/variant.c new file mode 100644 index 0000000..d966572 --- /dev/null +++ b/src/mainboard/google/volteer/variants/delbin/variant.c @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <baseboard/variants.h> +#include <drivers/intel/pmc_mux/conn/chip.h> + +/* + * Passed a pointer to an array of tcss_config_info record structures, + * fill out the tcss related port mapping and orientation information + * for this board. + */ +int variant_get_tcss_sysinfo(struct tcss_config_info *info) +{ + /* Initialize port 0 information */ + info[0].usb2_port_number = 9; + info[0].usb3_port_number = 1; + info[0].sbu_orientation = TYPEC_ORIENTATION_NORMAL; + info[0].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Initialize port 1 information */ + info[1].usb2_port_number = 4; + info[1].usb3_port_number = 2; + info[1].sbu_orientation = TYPEC_ORIENTATION_NORMAL; + info[1].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Return that we support and returned 2 ports worth of information */ + return 2; +} diff --git a/src/mainboard/google/volteer/variants/drobit/Makefile.inc b/src/mainboard/google/volteer/variants/drobit/Makefile.inc index 3454eec..7109145 100644 --- a/src/mainboard/google/volteer/variants/drobit/Makefile.inc +++ b/src/mainboard/google/volteer/variants/drobit/Makefile.inc @@ -6,3 +6,4 @@
ramstage-y += gpio.c ramstage-y += ramstage.c +ramstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_TCSS) += variant.c diff --git a/src/mainboard/google/volteer/variants/drobit/variant.c b/src/mainboard/google/volteer/variants/drobit/variant.c new file mode 100644 index 0000000..d966572 --- /dev/null +++ b/src/mainboard/google/volteer/variants/drobit/variant.c @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <baseboard/variants.h> +#include <drivers/intel/pmc_mux/conn/chip.h> + +/* + * Passed a pointer to an array of tcss_config_info record structures, + * fill out the tcss related port mapping and orientation information + * for this board. + */ +int variant_get_tcss_sysinfo(struct tcss_config_info *info) +{ + /* Initialize port 0 information */ + info[0].usb2_port_number = 9; + info[0].usb3_port_number = 1; + info[0].sbu_orientation = TYPEC_ORIENTATION_NORMAL; + info[0].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Initialize port 1 information */ + info[1].usb2_port_number = 4; + info[1].usb3_port_number = 2; + info[1].sbu_orientation = TYPEC_ORIENTATION_NORMAL; + info[1].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Return that we support and returned 2 ports worth of information */ + return 2; +} diff --git a/src/mainboard/google/volteer/variants/eldrid/variant.c b/src/mainboard/google/volteer/variants/eldrid/variant.c new file mode 100644 index 0000000..9b6bd1e --- /dev/null +++ b/src/mainboard/google/volteer/variants/eldrid/variant.c @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <baseboard/variants.h> +#include <drivers/intel/pmc_mux/conn/chip.h> + +/* + * Passed a pointer to an array of tcss_config_info record structures, + * fill out the tcss related port mapping and orientation information + * for this board. + */ +int variant_get_tcss_sysinfo(struct tcss_config_info *info) +{ + /* Initialize port 0 information */ + info[0].usb2_port_number = 9; + info[0].usb3_port_number = 1; + info[0].sbu_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + info[0].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Initialize port 1 information */ + info[1].usb2_port_number = 4; + info[1].usb3_port_number = 2; + info[1].sbu_orientation = TYPEC_ORIENTATION_NORMAL; + info[1].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Return that we support and returned 2 ports worth of information */ + return 2; +} diff --git a/src/mainboard/google/volteer/variants/elemi/Makefile.inc b/src/mainboard/google/volteer/variants/elemi/Makefile.inc index 3488dc6..fa36267 100644 --- a/src/mainboard/google/volteer/variants/elemi/Makefile.inc +++ b/src/mainboard/google/volteer/variants/elemi/Makefile.inc @@ -6,3 +6,4 @@
ramstage-y += gpio.c ramstage-y += ramstage.c +ramstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_TCSS) += variant.c diff --git a/src/mainboard/google/volteer/variants/elemi/variant.c b/src/mainboard/google/volteer/variants/elemi/variant.c new file mode 100644 index 0000000..9b6bd1e --- /dev/null +++ b/src/mainboard/google/volteer/variants/elemi/variant.c @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <baseboard/variants.h> +#include <drivers/intel/pmc_mux/conn/chip.h> + +/* + * Passed a pointer to an array of tcss_config_info record structures, + * fill out the tcss related port mapping and orientation information + * for this board. + */ +int variant_get_tcss_sysinfo(struct tcss_config_info *info) +{ + /* Initialize port 0 information */ + info[0].usb2_port_number = 9; + info[0].usb3_port_number = 1; + info[0].sbu_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + info[0].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Initialize port 1 information */ + info[1].usb2_port_number = 4; + info[1].usb3_port_number = 2; + info[1].sbu_orientation = TYPEC_ORIENTATION_NORMAL; + info[1].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Return that we support and returned 2 ports worth of information */ + return 2; +} diff --git a/src/mainboard/google/volteer/variants/lindar/Makefile.inc b/src/mainboard/google/volteer/variants/lindar/Makefile.inc index 22bcbd7..857ab9c 100644 --- a/src/mainboard/google/volteer/variants/lindar/Makefile.inc +++ b/src/mainboard/google/volteer/variants/lindar/Makefile.inc @@ -6,4 +6,4 @@
ramstage-y += gpio.c
-ramstage-$(CONFIG_FW_CONFIG) += variant.c +ramstage-y += variant.c diff --git a/src/mainboard/google/volteer/variants/lindar/variant.c b/src/mainboard/google/volteer/variants/lindar/variant.c index 0f98598..61b0393 100644 --- a/src/mainboard/google/volteer/variants/lindar/variant.c +++ b/src/mainboard/google/volteer/variants/lindar/variant.c @@ -1,9 +1,15 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <drivers/intel/gma/opregion.h> #include <fw_config.h> #include <sar.h> -#include <drivers/intel/gma/opregion.h>
+#if CONFIG(SOC_INTEL_COMMON_BLOCK_TCSS) +#include <baseboard/variants.h> +#include <drivers/intel/pmc_mux/conn/chip.h> +#endif + +#if CONFIG(FW_CONFIG) const char *get_wifi_sar_cbfs_filename(void) { if (fw_config_probe(FW_CONFIG(WIFI_SAR_ID, WIFI_SAR_ID_0))) @@ -20,3 +26,30 @@ return "vbt-oled.bin"; return "vbt.bin"; } +#endif + + +#if CONFIG(SOC_INTEL_COMMON_BLOCK_TCSS) +/* + * Passed a pointer to an array of tcss_config_info record structures, + * fill out the tcss related port mapping and orientation information + * for this board. + */ +int variant_get_tcss_sysinfo(struct tcss_config_info *info) +{ + /* Initialize port 0 information */ + info[0].usb2_port_number = 9; + info[0].usb3_port_number = 1; + info[0].sbu_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + info[0].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Initialize port 1 information */ + info[1].usb2_port_number = 4; + info[1].usb3_port_number = 2; + info[1].sbu_orientation = TYPEC_ORIENTATION_NORMAL; + info[1].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Return that we support and returned 2 ports worth of information */ + return 2; +} +#endif diff --git a/src/mainboard/google/volteer/variants/terrador/Makefile.inc b/src/mainboard/google/volteer/variants/terrador/Makefile.inc index 3488dc6..fa36267 100644 --- a/src/mainboard/google/volteer/variants/terrador/Makefile.inc +++ b/src/mainboard/google/volteer/variants/terrador/Makefile.inc @@ -6,3 +6,4 @@
ramstage-y += gpio.c ramstage-y += ramstage.c +ramstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_TCSS) += variant.c diff --git a/src/mainboard/google/volteer/variants/terrador/variant.c b/src/mainboard/google/volteer/variants/terrador/variant.c new file mode 100644 index 0000000..a74a67c --- /dev/null +++ b/src/mainboard/google/volteer/variants/terrador/variant.c @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <baseboard/variants.h> +#include <drivers/intel/pmc_mux/conn/chip.h> + +/* + * Passed a pointer to an array of tcss_config_info record structures, + * fill out the tcss related port mapping and orientation information + * for this board. + */ +int variant_get_tcss_sysinfo(struct tcss_config_info *info) +{ + /* Initialize port 0 information */ + info[0].usb2_port_number = 5; + info[0].usb3_port_number = 1; + info[0].sbu_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + info[0].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Initialize port 1 information */ + info[1].usb2_port_number = 3; + info[1].usb3_port_number = 2; + info[1].sbu_orientation = TYPEC_ORIENTATION_NORMAL; + info[1].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Return that we support and returned 2 ports worth of information */ + return 2; +} diff --git a/src/mainboard/google/volteer/variants/todor/variant.c b/src/mainboard/google/volteer/variants/todor/variant.c new file mode 100644 index 0000000..21bb7e8 --- /dev/null +++ b/src/mainboard/google/volteer/variants/todor/variant.c @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <baseboard/variants.h> +#include <drivers/intel/pmc_mux/conn/chip.h> + +/* + * Passed a pointer to an array of tcss_config_info record structures, + * fill out the tcss related port mapping and orientation information + * for this board. + */ +int variant_get_tcss_sysinfo(struct tcss_config_info *info) +{ + /* Initialize port 0 information */ + info[0].usb2_port_number = 5; + info[0].usb3_port_number = 1; + info[0].sbu_orientation = TYPEC_ORIENTATION_NORMAL; + info[0].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Initialize port 1 information */ + info[1].usb2_port_number = 3; + info[1].usb3_port_number = 2; + info[1].sbu_orientation = TYPEC_ORIENTATION_NORMAL; + info[1].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Return that we support and returned 2 ports worth of information */ + return 2; +} diff --git a/src/mainboard/google/volteer/variants/voema/Makefile.inc b/src/mainboard/google/volteer/variants/voema/Makefile.inc index 3488dc6..fa36267 100644 --- a/src/mainboard/google/volteer/variants/voema/Makefile.inc +++ b/src/mainboard/google/volteer/variants/voema/Makefile.inc @@ -6,3 +6,4 @@
ramstage-y += gpio.c ramstage-y += ramstage.c +ramstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_TCSS) += variant.c diff --git a/src/mainboard/google/volteer/variants/voema/variant.c b/src/mainboard/google/volteer/variants/voema/variant.c new file mode 100644 index 0000000..a74a67c --- /dev/null +++ b/src/mainboard/google/volteer/variants/voema/variant.c @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <baseboard/variants.h> +#include <drivers/intel/pmc_mux/conn/chip.h> + +/* + * Passed a pointer to an array of tcss_config_info record structures, + * fill out the tcss related port mapping and orientation information + * for this board. + */ +int variant_get_tcss_sysinfo(struct tcss_config_info *info) +{ + /* Initialize port 0 information */ + info[0].usb2_port_number = 5; + info[0].usb3_port_number = 1; + info[0].sbu_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + info[0].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Initialize port 1 information */ + info[1].usb2_port_number = 3; + info[1].usb3_port_number = 2; + info[1].sbu_orientation = TYPEC_ORIENTATION_NORMAL; + info[1].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Return that we support and returned 2 ports worth of information */ + return 2; +} diff --git a/src/mainboard/google/volteer/variants/volet/Makefile.inc b/src/mainboard/google/volteer/variants/volet/Makefile.inc index 3488dc6..fa36267 100644 --- a/src/mainboard/google/volteer/variants/volet/Makefile.inc +++ b/src/mainboard/google/volteer/variants/volet/Makefile.inc @@ -6,3 +6,4 @@
ramstage-y += gpio.c ramstage-y += ramstage.c +ramstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_TCSS) += variant.c diff --git a/src/mainboard/google/volteer/variants/volet/variant.c b/src/mainboard/google/volteer/variants/volet/variant.c new file mode 100644 index 0000000..9b6bd1e --- /dev/null +++ b/src/mainboard/google/volteer/variants/volet/variant.c @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <baseboard/variants.h> +#include <drivers/intel/pmc_mux/conn/chip.h> + +/* + * Passed a pointer to an array of tcss_config_info record structures, + * fill out the tcss related port mapping and orientation information + * for this board. + */ +int variant_get_tcss_sysinfo(struct tcss_config_info *info) +{ + /* Initialize port 0 information */ + info[0].usb2_port_number = 9; + info[0].usb3_port_number = 1; + info[0].sbu_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + info[0].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Initialize port 1 information */ + info[1].usb2_port_number = 4; + info[1].usb3_port_number = 2; + info[1].sbu_orientation = TYPEC_ORIENTATION_NORMAL; + info[1].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Return that we support and returned 2 ports worth of information */ + return 2; +} diff --git a/src/mainboard/google/volteer/variants/volteer2/variant.c b/src/mainboard/google/volteer/variants/volteer2/variant.c index 057bb8a..3acfa71 100644 --- a/src/mainboard/google/volteer/variants/volteer2/variant.c +++ b/src/mainboard/google/volteer/variants/volteer2/variant.c @@ -4,6 +4,10 @@ #include <soc/pci_devs.h> #include <acpi/acpi_device.h>
+#if CONFIG(SOC_INTEL_COMMON_BLOCK_TCSS) +#include <drivers/intel/pmc_mux/conn/chip.h> +#endif + extern struct chip_operations drivers_i2c_tpm_ops;
static bool match_i2c_tpm(DEVTREE_CONST struct device *dev) @@ -31,3 +35,28 @@ if (CONFIG(MAINBOARD_HAS_I2C_TPM_CR50)) devtree_enable_i2c_tpm(); } + +#if CONFIG(SOC_INTEL_COMMON_BLOCK_TCSS) +/* + * Passed a pointer to an array of tcss_config_info record structures, + * fill out the tcss related port mapping and orientation information + * for this board. + */ +int variant_get_tcss_sysinfo(struct tcss_config_info *info) +{ + /* Initialize port 0 information */ + info[0].usb2_port_number = 9; + info[0].usb3_port_number = 1; + info[0].sbu_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + info[0].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Initialize port 1 information */ + info[1].usb2_port_number = 4; + info[1].usb3_port_number = 2; + info[1].sbu_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + info[1].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Return that we support and returned 2 ports worth of information */ + return 2; +} +#endif diff --git a/src/mainboard/google/volteer/variants/voxel/variant.c b/src/mainboard/google/volteer/variants/voxel/variant.c index 70fa3a0..c036e58 100644 --- a/src/mainboard/google/volteer/variants/voxel/variant.c +++ b/src/mainboard/google/volteer/variants/voxel/variant.c @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <baseboard/variants.h> +#include <drivers/intel/pmc_mux/conn/chip.h> #include <fw_config.h> #include <sar.h>
@@ -12,3 +14,26 @@
return filename; } + +/* + * Passed a pointer to an array of tcss_config_info record structures, + * fill out the tcss related port mapping and orientation information + * for this board. + */ +int variant_get_tcss_sysinfo(struct tcss_config_info *info) +{ + /* Initialize port 0 information */ + info[0].usb2_port_number = 9; + info[0].usb3_port_number = 1; + info[0].sbu_orientation = TYPEC_ORIENTATION_NORMAL; + info[0].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Initialize port 1 information */ + info[1].usb2_port_number = 4; + info[1].usb3_port_number = 2; + info[1].sbu_orientation = TYPEC_ORIENTATION_NORMAL; + info[1].hsl_orientation = TYPEC_ORIENTATION_FOLLOW_CC; + + /* Return that we support and returned 2 ports worth of information */ + return 2; +}