summaryrefslogtreecommitdiff
path: root/board/brask
diff options
context:
space:
mode:
authorDavid Huang <david.huang@quanta.corp-partner.google.com>2021-11-04 15:40:43 +0800
committerCommit Bot <commit-bot@chromium.org>2021-11-16 08:57:31 +0000
commit4d0eae2888ab86d8d50efc4c2c22fec6700b577d (patch)
tree0c4b3ad6b1ba558bfb788e8b4a8e1c68ccc9cfed /board/brask
parenta8197513f7043ead08d53ed144531fe4f5497206 (diff)
downloadchrome-ec-4d0eae2888ab86d8d50efc4c2c22fec6700b577d.tar.gz
brask: Support retimer kb800x for c1
Support retimer kb800x for port c1. BUG=b:197505149 b:194068869 BRANCH=none TEST=Insert USB device to C1, system can get device. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: I2853a7b6a0add4b1683acade0d7f84a629bde34b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3261449 Reviewed-by: caveh jalali <caveh@chromium.org> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Commit-Queue: caveh jalali <caveh@chromium.org>
Diffstat (limited to 'board/brask')
-rw-r--r--board/brask/board.h7
-rw-r--r--board/brask/usbc_config.c19
2 files changed, 16 insertions, 10 deletions
diff --git a/board/brask/board.h b/board/brask/board.h
index e944f28527..df15615bdd 100644
--- a/board/brask/board.h
+++ b/board/brask/board.h
@@ -38,11 +38,10 @@
#define CONFIG_USB_PD_PPC
#define CONFIG_USB_PD_TCPM_RT1715
#define CONFIG_USBC_RETIMER_INTEL_BB
-/* TODO(b/197505149): need to fix the build error and clarify
- * how to set the usb_ls_en_gpio and retimer_rst_gpio
- * in the same array.
+/* TODO: Do not add CONFIG_KB800X_CUSTOM_XBAR until find out how
+ * to config ss_lane.
*/
-/* #define CONFIG_USBC_RETIMER_KB800X */
+#define CONFIG_USBC_RETIMER_KB800X
#define CONFIG_USBC_PPC_SYV682X
/* TODO: b/177608416 - measure and check these values on brya */
diff --git a/board/brask/usbc_config.c b/board/brask/usbc_config.c
index 563034fcb4..8363c71f88 100644
--- a/board/brask/usbc_config.c
+++ b/board/brask/usbc_config.c
@@ -107,6 +107,17 @@ static const struct usb_mux usbc2_tcss_usb_mux = {
.hpd_update = &virtual_hpd_update,
};
+struct kb800x_control_t kb800x_control[] = {
+ [USBC_PORT_C0] = {
+ },
+ [USBC_PORT_C1] = {
+ .retimer_rst_gpio = GPIO_USB_C1_RT_RST_R_ODL,
+ },
+ [USBC_PORT_C2] = {
+ },
+};
+BUILD_ASSERT(ARRAY_SIZE(kb800x_control) == USBC_PORT_COUNT);
+
const struct usb_mux usb_muxes[] = {
[USBC_PORT_C0] = {
.usb_port = USBC_PORT_C0,
@@ -118,13 +129,9 @@ const struct usb_mux usb_muxes[] = {
},
[USBC_PORT_C1] = {
.usb_port = USBC_PORT_C1,
- /* TODO(b/197505149): need to fix the build error and
- * clarify how to set the usb_ls_en_gpio and
- * retimer_rst_gpio in the same array.
- */
- /*.driver = &kb800x_usb_mux_driver, */
+ .driver = &kb800x_usb_mux_driver,
.i2c_port = I2C_PORT_USB_C1_MUX,
- .i2c_addr_flags = USBC_PORT_C0_BB_RETIMER_I2C_ADDR,
+ .i2c_addr_flags = KB800X_I2C_ADDR0_FLAGS,
.next_mux = &usbc1_tcss_usb_mux,
},
[USBC_PORT_C2] = {