diff options
author | Ting Shen <phoenixshen@google.com> | 2022-04-28 14:50:41 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-05-10 03:03:28 +0000 |
commit | 6b98d410728002a3b39c78b6843bced41a51d565 (patch) | |
tree | 9b4bdfd2bf3b88038cf012d89775a0b95e6b69f1 /zephyr/shim/include/usbc | |
parent | 3f39e2393f41526ef5a0a4c8fb7df6e5dc861b19 (diff) | |
download | chrome-ec-6b98d410728002a3b39c78b6843bced41a51d565.tar.gz |
usb_mux: add TUSB546 driver
Reuse the code from existing TUSB1064/TUSB1044 driver and add TUSB546
specific logic to it.
Currently the only change is that we will enable IN_HPD when mux enters
dock mode, instead of using hpd_update.
BUG=b:228289594
TEST=make
BRANCH=none
Signed-off-by: Ting Shen <phoenixshen@google.com>
Change-Id: I2182eef1a4c5d8cc830f837c544379e854ac331c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3612720
Reviewed-by: Eric Yilun Lin <yllin@google.com>
Tested-by: Ting Shen <phoenixshen@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'zephyr/shim/include/usbc')
-rw-r--r-- | zephyr/shim/include/usbc/tusb1064_usb_mux.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/zephyr/shim/include/usbc/tusb1064_usb_mux.h b/zephyr/shim/include/usbc/tusb1064_usb_mux.h index dcab760b7b..159f42c500 100644 --- a/zephyr/shim/include/usbc/tusb1064_usb_mux.h +++ b/zephyr/shim/include/usbc/tusb1064_usb_mux.h @@ -20,6 +20,15 @@ DT_STRING_UPPER_TOKEN(mux_id, i2c_addr_flags), \ .hpd_update = &tusb1044_hpd_update, \ } +#elif defined(CONFIG_USB_MUX_TUSB546) +#define USB_MUX_CONFIG_TUSB1064(mux_id, port_id, idx) \ + { \ + USB_MUX_COMMON_FIELDS(mux_id, port_id, idx), \ + .driver = &tusb1064_usb_mux_driver, \ + .i2c_port = I2C_PORT(DT_PHANDLE(mux_id, port)), \ + .i2c_addr_flags = \ + DT_STRING_UPPER_TOKEN(mux_id, i2c_addr_flags), \ + } #else #define USB_MUX_CONFIG_TUSB1064(mux_id, port_id, idx) \ { \ |