diff options
author | Denis Brockus <dbrockus@chromium.org> | 2020-03-10 14:25:43 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-03-12 01:38:09 +0000 |
commit | 326d9a6fa33942aff01b602e96bad6fedd7f48a9 (patch) | |
tree | bd199bdef74af630926311ed038b58e90a127439 /board/ezkinil/board.c | |
parent | 5dccb3d59aa936441f55fc8b984173d2c557e8d3 (diff) | |
download | chrome-ec-326d9a6fa33942aff01b602e96bad6fedd7f48a9.tar.gz |
variant trembyle: use fw_config for mux initialization
Setup the usb_muxes table to the correct values based on
fw_config instead of using probing.
BUG=none
BRANCH=none
TEST=verify USB is still working
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Change-Id: I7550d15d563f987def4fe70d52a55e31b655b753
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2094743
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Commit-Queue: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'board/ezkinil/board.c')
-rw-r--r-- | board/ezkinil/board.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/board/ezkinil/board.c b/board/ezkinil/board.c index 08ec79df5a..b710c60700 100644 --- a/board/ezkinil/board.c +++ b/board/ezkinil/board.c @@ -13,6 +13,7 @@ #include "fan.h" #include "fan_chip.h" #include "gpio.h" +#include "hooks.h" #include "lid_switch.h" #include "power.h" #include "power_button.h" @@ -22,6 +23,7 @@ #include "system.h" #include "task.h" #include "usb_charge.h" +#include "usb_mux.h" #include "gpio_list.h" @@ -162,3 +164,27 @@ const struct mft_t mft_channels[] = { }, }; BUILD_ASSERT(ARRAY_SIZE(mft_channels) == MFT_CH_COUNT); + +/***************************************************************************** + * USB-C MUX/Retimer dynamic configuration + */ + +/* TODO: Fill in with real mux table updates */ +static void setup_mux(void) +{ + if (ec_config_has_usbc1_retimer_tusb544()) + ccprints("C1 TUSB544 detected"); + else if (ec_config_has_usbc1_retimer_ps8743()) + ccprints("C1 PS8743 detected"); +} +DECLARE_HOOK(HOOK_INIT, setup_mux, HOOK_PRIO_DEFAULT); + +struct usb_mux usb_muxes[] = { + [USBC_PORT_C0] = { + /* USB-C0 does not have a retimer/mux */ + }, + [USBC_PORT_C1] = { + /* Filled in dynamically at startup */ + }, +}; +BUILD_ASSERT(ARRAY_SIZE(usb_muxes) == USBC_PORT_COUNT); |