summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/peripheral.c3
-rw-r--r--include/config.h10
-rw-r--r--include/usb_pd_tcpm.h7
3 files changed, 20 insertions, 0 deletions
diff --git a/common/peripheral.c b/common/peripheral.c
index 4f16cd981d..301165e34e 100644
--- a/common/peripheral.c
+++ b/common/peripheral.c
@@ -40,6 +40,9 @@ static int hc_locate_chip(struct host_cmd_handler_args *args)
resp->i2c_info.addr =
tcpc_config[params->index].i2c_info.addr >> 1;
}
+#ifdef CONFIG_INTEL_VIRTUAL_MUX
+ resp->reserved = tcpc_config[params->index].usb23;
+#endif
#else
return EC_RES_UNAVAILABLE;
#endif /* CONFIG_USB_PD_PORT_COUNT */
diff --git a/include/config.h b/include/config.h
index 9351502ed3..c71d79461e 100644
--- a/include/config.h
+++ b/include/config.h
@@ -4132,6 +4132,16 @@
*/
#undef CONFIG_ISH_PM_RESET_PREP
+/*
+ * On Intel devices EC's USB-C port numbers may not be physically equal to
+ * AP's USB3 & USB2 port number. Because there can be MAX 15 USB2 ports on
+ * PCH and MAX 15 USB3 ports on SOC, based on the complexity of the physical
+ * layout of the board, USB3 & USB2 port signals of AP are routed to respective
+ * USB-C port of EC. Hence, to configure the Intel Virtual MUX, information of
+ * USB3 and USB2 port numbers of the respective USB-C port is needed.
+ */
+#undef CONFIG_INTEL_VIRTUAL_MUX
+
/*****************************************************************************/
/*
* Include board and core configs, since those hold the CONFIG_ constants for a
diff --git a/include/usb_pd_tcpm.h b/include/usb_pd_tcpm.h
index 9e5f5689de..9ca23e7ecb 100644
--- a/include/usb_pd_tcpm.h
+++ b/include/usb_pd_tcpm.h
@@ -334,6 +334,13 @@ struct tcpc_config_t {
const struct tcpm_drv *drv;
/* See TCPC_FLAGS_* above */
uint32_t flags;
+#ifdef CONFIG_INTEL_VIRTUAL_MUX
+ /*
+ * 0-3: Corresponding USB2 port number (1 ~ 15)
+ * 4-7: Corresponding USB3 port number (1 ~ 15)
+ */
+ uint8_t usb23;
+#endif
};
#ifndef CONFIG_USB_PD_TCPC_RUNTIME_CONFIG