summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVijay Hiremath <vijay.p.hiremath@intel.com>2019-08-06 17:59:15 -0700
committerCommit Bot <commit-bot@chromium.org>2020-07-14 06:13:25 +0000
commit4a4b7ee70d2a693e96aa185fa4c25b57d9f6a51e (patch)
tree9cb7e45b06495cae36205941e0e12f8bb78df0a0
parent28dc0a9aa1e34c0c489baed363f2777a1d735eee (diff)
downloadchrome-ec-4a4b7ee70d2a693e96aa185fa4c25b57d9f6a51e.tar.gz
usb_mux: Send DP safe mode info to virtual MUX
Before entering into alternate mode, state of the USB-C MUX needs to be in safe mode so that the USB-C pins cab be re-purposed without getting damaged or do not damage their Port Partner. Hence, sending the DP safe mode info to virtual MUX from EC. BUG=b:139140865 BRANCH=firmware-nami-10775.B TEST=With other PD Policies patches, flash nami and run faft_ec&pd Change-Id: I3715b5118112b7744407ac5e652f63f6d7cd0a1b Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1745540 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2274383 Tested-by: Dawid Niedźwiecki <dn@semihalf.com> Commit-Queue: Dossym Nurmukhanov <dossym@chromium.org>
-rw-r--r--include/ec_commands.h1
-rw-r--r--include/usb_mux.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index 19c369fe4f..2ae24c4e7e 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -4706,6 +4706,7 @@ struct __ec_align1 ec_params_usb_pd_mux_info {
#define USB_PD_MUX_DP_ENABLED (1 << 1)
#define USB_PD_MUX_POLARITY_INVERTED (1 << 2)
#define USB_PD_MUX_HPD_IRQ (1 << 3)
+#define USB_PD_MUX_SAFE_MODE (1 << 4) /* DP is in safe mode */
struct __ec_align1 ec_response_usb_pd_mux_info {
uint8_t flags; /* USB_PD_MUX_*-encoded USB mux state */
diff --git a/include/usb_mux.h b/include/usb_mux.h
index 54107771ed..a3dc9ac3ea 100644
--- a/include/usb_mux.h
+++ b/include/usb_mux.h
@@ -30,6 +30,7 @@ typedef uint8_t mux_state_t;
#define MUX_USB_ENABLED USB_PD_MUX_USB_ENABLED
#define MUX_DP_ENABLED USB_PD_MUX_DP_ENABLED
#define MUX_POLARITY_INVERTED USB_PD_MUX_POLARITY_INVERTED
+#define MUX_SAFE_MODE USB_PD_MUX_SAFE_MODE
/* Mux modes, decoded to attributes */
enum typec_mux {
@@ -38,6 +39,7 @@ enum typec_mux {
TYPEC_MUX_DP = MUX_DP_ENABLED, /* DP only */
TYPEC_MUX_DOCK = MUX_USB_ENABLED | /* Both USB and DP */
MUX_DP_ENABLED,
+ TYPEC_MUX_SAFE = MUX_SAFE_MODE, /* Safe mode */
};
/* Mux driver function pointers */