diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2016-01-21 10:09:53 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-01-27 14:52:18 -0800 |
commit | 7d0152a78b8b6947dd103c01d9fe380f5b55edf6 (patch) | |
tree | 0a9e0652a75514f9fc979c9eebaaa51850c6cce9 /driver/tcpm/tcpci.h | |
parent | 0801ac67b9310ff6d75e57430235857ecd3ce0a0 (diff) | |
download | chrome-ec-7d0152a78b8b6947dd103c01d9fe380f5b55edf6.tar.gz |
tcpc: add support for TCPC with integrated high-speed muxes
The TCPCI specification defines ane optional register
18h 'CONFIG_STANDARD_OUTPUT' providing a standardized way
of steering the high-speed muxes.
Implement the feature as a usb_mux_driver, under the conditional flag
CONFIG_USB_PD_TCPM_MUX.
The USB PD port index should be set in the port_addr field of the
'usb_mux' structure.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=none
BUG=chrome-os-partner:49605
TEST=run pdeval-stm32f072 connected to a Parade PS8751 board and test USB/DP
muxing.
Change-Id: I7e5f0b8ec70b1910b2cff9d106514baca8c899e5
Reviewed-on: https://chromium-review.googlesource.com/322956
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'driver/tcpm/tcpci.h')
-rw-r--r-- | driver/tcpm/tcpci.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/driver/tcpm/tcpci.h b/driver/tcpm/tcpci.h index d105ea5361..eb87b7d0e2 100644 --- a/driver/tcpm/tcpci.h +++ b/driver/tcpm/tcpci.h @@ -37,6 +37,12 @@ #define TCPC_REG_POWER_STATUS_MASK 0x14 #define TCPC_REG_FAULT_STATUS_MASK 0x15 #define TCPC_REG_CONFIG_STD_OUTPUT 0x18 + +#define TCPC_REG_CONFIG_STD_OUTPUT_MUX_MASK (3 << 2) +#define TCPC_REG_CONFIG_STD_OUTPUT_MUX_NONE (0 << 2) +#define TCPC_REG_CONFIG_STD_OUTPUT_MUX_USB (1 << 2) +#define TCPC_REG_CONFIG_STD_OUTPUT_MUX_DP (2 << 2) + #define TCPC_REG_TCPC_CTRL 0x19 #define TCPC_REG_TCPC_CTRL_SET(polarity) (polarity) #define TCPC_REG_TCPC_CTRL_POLARITY(reg) ((reg) & 0x1) |