summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-06-04 16:06:14 -0600
committerCommit Bot <commit-bot@chromium.org>2021-06-15 18:38:19 +0000
commitb5753903cb8948d88bc4d91ea81cb3e7bfc42520 (patch)
tree01b862bca7f52dd0a740baeebbb219a85dea4c5f
parent93260ad5e431525be3dca0232f825afd93ea3fa9 (diff)
downloadchrome-ec-b5753903cb8948d88bc4d91ea81cb3e7bfc42520.tar.gz
zephyr: Support the IT5205 USB mux
Add support for this chip on Zephyr, needed for Asurada. BUG=b:189855648 BRANCH=none TEST=with other CLs, build asurada for Zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I868f46ee617003eef5ceba65be4241b502d6d280 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941886 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
-rw-r--r--zephyr/CMakeLists.txt2
-rw-r--r--zephyr/Kconfig.usbc12
-rw-r--r--zephyr/shim/include/config_chip.h5
3 files changed, 19 insertions, 0 deletions
diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt
index c851add6ef..51714e67ff 100644
--- a/zephyr/CMakeLists.txt
+++ b/zephyr/CMakeLists.txt
@@ -326,6 +326,8 @@ zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_USBC_RETIMER_INTEL_BB
"${PLATFORM_EC}/driver/retimer/bb_retimer.c")
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_USBC_SS_MUX
"${PLATFORM_EC}/driver/usb_mux/usb_mux.c")
+zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_USB_MUX_IT5205
+ "${PLATFORM_EC}/driver/usb_mux/it5205.c")
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_USB_MUX_VIRTUAL
"${PLATFORM_EC}/driver/usb_mux/virtual.c")
diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc
index 8d2cf31294..93e3a59fba 100644
--- a/zephyr/Kconfig.usbc
+++ b/zephyr/Kconfig.usbc
@@ -843,6 +843,18 @@ menuconfig PLATFORM_EC_USB_MUX
help
Enables support for USB muxes. These allow multiplexing
+if PLATFORM_EC_USB_MUX
+
+config PLATFORM_EC_USB_MUX_IT5205
+ bool "ITE IT5205 USB Type-C 3:2 Alternative mode passive mux"
+ help
+ This is a USB Type-C 3:2 Alternative mode mux, supporting USB 3.1
+ Gen 2 10Gbps as well as DisplayPort (DP1.4) at 8Gbps. It provides a
+ cross-point mux for low-speed Side-Band-Use (SBU) pins. The mux can
+ be controlled via I2C.
+
+endif
+
config PLATFORM_EC_USBC_SS_MUX
bool "SuperSpeed mux"
default y
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index b76c04e01e..0310e77070 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -1006,6 +1006,11 @@
#define CONFIG_USBC_SS_MUX_DFP_ONLY
#endif
+#undef CONFIG_USB_MUX_IT5205
+#ifdef CONFIG_PLATFORM_EC_USB_MUX_IT5205
+#define CONFIG_USB_MUX_IT5205
+#endif
+
#undef CONFIG_USB_MUX_VIRTUAL
#ifdef CONFIG_PLATFORM_EC_USB_MUX_VIRTUAL
#define CONFIG_USB_MUX_VIRTUAL