diff options
author | Eric Yilun Lin <yllin@chromium.org> | 2021-12-28 11:00:08 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-01-18 09:18:11 +0000 |
commit | dda3b165fe07f9a2f24f624be7b421bd2b0db7bd (patch) | |
tree | bdc025c402074fb8c833c185d1fd59ca98d1945c /zephyr/projects/corsola/src/kingler | |
parent | dde7ada08e791c30c9681f27c0851e03a2b76ac2 (diff) | |
download | chrome-ec-dda3b165fe07f9a2f24f624be7b421bd2b0db7bd.tar.gz |
zephyr: kingler: configure USB MUX
C0: ANX3447 integrated TCPC
C1: PS8743 redriver
BUG=b:203739613
TEST=Mux is able to switch to SS and DP
BRANCH=none
Change-Id: I830b431b371c956ee4452c430cd06f1f25ec3262
Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3359163
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Commit-Queue: Eric Yilun Lin <yllin@google.com>
Tested-by: Eric Yilun Lin <yllin@google.com>
Diffstat (limited to 'zephyr/projects/corsola/src/kingler')
-rw-r--r-- | zephyr/projects/corsola/src/kingler/usbc_config.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/zephyr/projects/corsola/src/kingler/usbc_config.c b/zephyr/projects/corsola/src/kingler/usbc_config.c index 46560bff31..8a1a37ef84 100644 --- a/zephyr/projects/corsola/src/kingler/usbc_config.c +++ b/zephyr/projects/corsola/src/kingler/usbc_config.c @@ -13,6 +13,7 @@ #include "driver/ppc/rt1718s.h" #include "driver/tcpm/anx7447.h" #include "driver/tcpm/rt1718s.h" +#include "driver/usb_mux/ps8743.h" #include "hooks.h" #include "timer.h" #include "usb_charge.h" @@ -70,7 +71,32 @@ const struct charger_config_t chg_chips[] = { } }; -struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = {}; +/* USB Mux */ + +/* USB Mux C1 : board_init of PS8743 */ +static int ps8743_tune_mux(const struct usb_mux *me) +{ + ps8743_tune_usb_eq(me, + PS8743_USB_EQ_TX_3_6_DB, + PS8743_USB_EQ_RX_16_0_DB); + + return EC_SUCCESS; +} + +struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = { + [USBC_PORT_C0] = { + .usb_port = USBC_PORT_C0, + .driver = &anx7447_usb_mux_driver, + .hpd_update = &anx7447_tcpc_update_hpd_status, + }, + [USBC_PORT_C1] = { + .usb_port = USBC_PORT_C1, + .i2c_port = I2C_PORT_USB_C1, + .i2c_addr_flags = PS8743_I2C_ADDR0_FLAG, + .driver = &ps8743_usb_mux_driver, + .board_init = &ps8743_tune_mux, + }, +}; struct bc12_config bc12_ports[CONFIG_USB_PD_PORT_MAX_COUNT] = { [USBC_PORT_C0] = { |