summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVijay Hiremath <vijay.p.hiremath@intel.com>2021-08-31 14:09:26 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-05-19 00:05:40 +0000
commit010c88c66bc6e12d9fcd7d34b7c44a7fbaf41e4d (patch)
tree88803660f78345581b7de97714625af6ab3a714e
parentf4bc5fcbba1a73ee9b0f75822de3c4fef4ff7ed0 (diff)
downloadchrome-ec-010c88c66bc6e12d9fcd7d34b7c44a7fbaf41e4d.tar.gz
retimer: Add support for Intel Hayden Bridge retimer
Intel Hayden Bridge retimer reuses the Intel Burnside Bridge retimer driver as the configuration register of both the retimers is same. Intel Hayden Bridge is a Type-C multi-protocol retimer to be used in on-board applications. Hayden Bridge offers the ability to latch protocol signals into on-chip memory before retransmitting them onwards. It can be used to extend the physical length of the system without increasing high-frequency jitter. Hayden Bridge supports spec compliant retimer of following protocols: - Display Port: four unidirectional DP lanes - USB3.2 Gen1/2: two bi-directional USB lanes - Thunderbolt/USB4: two bi-directional USB4 lanes - Multifunction Display (MFD): two unidirectional lanes of DP and one bi-directional lane of USB3.2 Gen1/2 BUG=b:228222434 BRANCH=none TEST=Able to test USB, DP, TBT, USB4 on MTLRVP Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Change-Id: I42902163afebe0dc2cf8ff9e4c1081ecd04401b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3138214 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
-rw-r--r--driver/retimer/bb_retimer.c5
-rw-r--r--include/driver/retimer/bb_retimer.h5
-rw-r--r--zephyr/CMakeLists.txt2
-rw-r--r--zephyr/Kconfig.retimer20
-rw-r--r--zephyr/shim/include/config_chip.h14
5 files changed, 46 insertions, 0 deletions
diff --git a/driver/retimer/bb_retimer.c b/driver/retimer/bb_retimer.c
index 170aac6c23..c515505900 100644
--- a/driver/retimer/bb_retimer.c
+++ b/driver/retimer/bb_retimer.c
@@ -540,6 +540,10 @@ static int retimer_init(const struct usb_mux *me)
rv = bb_retimer_read(me, BB_RETIMER_REG_VENDOR_ID, &data);
if (rv != EC_SUCCESS)
return rv;
+#ifdef CONFIG_USBC_RETIMER_INTEL_HB
+ if (data != BB_RETIMER_DEVICE_ID)
+ return EC_ERROR_INVAL;
+#else
if ((data != BB_RETIMER_VENDOR_ID_1) &&
data != BB_RETIMER_VENDOR_ID_2)
return EC_ERROR_INVAL;
@@ -549,6 +553,7 @@ static int retimer_init(const struct usb_mux *me)
return rv;
if (data != BB_RETIMER_DEVICE_ID)
return EC_ERROR_INVAL;
+#endif
return EC_SUCCESS;
}
diff --git a/include/driver/retimer/bb_retimer.h b/include/driver/retimer/bb_retimer.h
index 2bfb806e37..6a311bd2ca 100644
--- a/include/driver/retimer/bb_retimer.h
+++ b/include/driver/retimer/bb_retimer.h
@@ -17,7 +17,12 @@
#define BB_RETIMER_VENDOR_ID_2 0x8087
#define BB_RETIMER_REG_DEVICE_ID 1
+#ifdef CONFIG_USBC_RETIMER_INTEL_HB
+/* HB has no Device ID field instead it is combined with Vendor ID */
+#define BB_RETIMER_DEVICE_ID 0x0D9C8087
+#else
#define BB_RETIMER_DEVICE_ID 0x15EE
+#endif
/* Connection State Register Attributes */
#define BB_RETIMER_REG_CONNECTION_STATE 4
diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt
index 9173c67253..f5e1c2572a 100644
--- a/zephyr/CMakeLists.txt
+++ b/zephyr/CMakeLists.txt
@@ -406,6 +406,8 @@ zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_USBC_RETIMER_ANX7483
"${PLATFORM_EC}/driver/retimer/anx7483.c")
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_RETIMER_INTEL_HB
+ "${PLATFORM_EC}/driver/retimer/bb_retimer.c")
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_USBC_RETIMER_PS8818
"${PLATFORM_EC}/driver/retimer/ps8818.c")
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_USBC_RETIMER_ANX7451
diff --git a/zephyr/Kconfig.retimer b/zephyr/Kconfig.retimer
index 8233b6fe2b..f328ffea17 100644
--- a/zephyr/Kconfig.retimer
+++ b/zephyr/Kconfig.retimer
@@ -25,6 +25,26 @@ config PLATFORM_EC_USBC_RETIMER_INTEL_BB
- Multifunction Display (MFD): two unidirectional lanes of DP and
one bidirectional lane of USB3.1 Gen1/2
+config PLATFORM_EC_USBC_RETIMER_INTEL_HB
+ bool "Support Intel Hayden Bridge retimer"
+ help
+ Enable this to support the Intel Hayden Bridge Thunderbolt / USB /
+ DisplayPort retimer.
+
+ Intel Hayden Bridge is a Type-C multi-protocol retimer to be used
+ in on-board applications. Hayden Bridge offers the ability to latch
+ protocol signals into on-chip memory before retransmitting them
+ onwards. It can be used to extend the physical length of the system
+ without increasing high-frequency jitter.
+
+ Hayden Bridge supports spec compliant retimer of following
+ protocols:
+ - Display Port: four unidirectional DP lanes
+ - USB3.2 Gen1/2: two bi-directional USB lanes
+ - Thunderbolt/USB4: two bi-directional USB4 lanes
+ - Multifunction Display (MFD): two unidirectional lanes of DP and
+ one bi-directional lane of USB3.2 Gen1/2
+
config PLATFORM_EC_USBC_RETIMER_INTEL_BB_RUNTIME_CONFIG
bool "Use runtime configuration of Intel Burnside Bridge"
depends on PLATFORM_EC_USBC_RETIMER_INTEL_BB
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index f11ec4c507..67b9d0c6fd 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -1592,6 +1592,20 @@ extern struct jump_data mock_jump_data;
#define CONFIG_USBC_RETIMER_INTEL_BB
#endif
+#undef CONFIG_USBC_RETIMER_INTEL_HB
+#ifdef CONFIG_PLATFORM_EC_USBC_RETIMER_INTEL_HB
+
+#define USBC_PORT_C0_HB_RETIMER_I2C_ADDR \
+ DT_REG_ADDR(DT_NODELABEL(usb_c0_hb_retimer))
+#define USBC_PORT_C1_HB_RETIMER_I2C_ADDR \
+ DT_REG_ADDR(DT_NODELABEL(usb_c1_hb_retimer))
+#define USBC_PORT_C2_HB_RETIMER_I2C_ADDR \
+ DT_REG_ADDR(DT_NODELABEL(usb_c2_hb_retimer))
+#define USBC_PORT_C3_HB_RETIMER_I2C_ADDR \
+ DT_REG_ADDR(DT_NODELABEL(usb_c3_hb_retimer))
+#define CONFIG_USBC_RETIMER_INTEL_HB
+#endif
+
#undef CONFIG_USBC_RETIMER_INTEL_BB_RUNTIME_CONFIG
#ifdef CONFIG_PLATFORM_EC_USBC_RETIMER_INTEL_BB_RUNTIME_CONFIG
#define CONFIG_USBC_RETIMER_INTEL_BB_RUNTIME_CONFIG