summaryrefslogtreecommitdiff
path: root/driver/tcpm/tcpci.h
diff options
context:
space:
mode:
authorKevin K Wong <kevin.k.wong@intel.com>2016-09-21 08:57:40 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-11-02 06:42:04 -0700
commit180ac77e16e1e5a57769a2a20411b6e37d649107 (patch)
tree7b9d5cb676836a9e368c36aabd004734c8b55f59 /driver/tcpm/tcpci.h
parentdd652accd0c26d56af3511d178507af738912885 (diff)
downloadchrome-ec-180ac77e16e1e5a57769a2a20411b6e37d649107.tar.gz
reef: enable tcpc-controlled drp toggle
BUG=chrome-os-partner:54668 BRANCH=none TEST=Verified SNK is detected in S0 (toggle on), S3 (toggle off), and S5 (force sink). SRC is detect in S0 only, stays detected when entered S3, but unplug/plug while in S3 will not re-detect until system back in S0. When go to S5, SRC will get disconnected until back in S0, and hotplug SRC in S5 will not get detected. Checked power role swap with another chromebook in the above scenario also. Change-Id: I2a487fca5cb04c45524aa3efde84fcd10ff0579e Signed-off-by: Kevin K Wong <kevin.k.wong@intel.com> Reviewed-on: https://chromium-review.googlesource.com/396918 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'driver/tcpm/tcpci.h')
-rw-r--r--driver/tcpm/tcpci.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/driver/tcpm/tcpci.h b/driver/tcpm/tcpci.h
index 141d3daf14..165b206bf1 100644
--- a/driver/tcpm/tcpci.h
+++ b/driver/tcpm/tcpci.h
@@ -66,6 +66,7 @@
#define TCPC_REG_POWER_CTRL_VCONN(reg) ((reg) & 0x1)
#define TCPC_REG_CC_STATUS 0x1d
+#define TCPC_REG_CC_STATUS_LOOK4CONNECTION(reg) ((reg & 0x20) >> 5)
#define TCPC_REG_CC_STATUS_SET(term, cc1, cc2) \
((term) << 4 | ((cc2) & 0x3) << 2 | ((cc1) & 0x3))
#define TCPC_REG_CC_STATUS_TERM(reg) (((reg) & 0x10) >> 4)
@@ -80,6 +81,8 @@
#define TCPC_REG_FAULT_STATUS 0x1f
#define TCPC_REG_COMMAND 0x23
+#define TCPC_REG_COMMAND_LOOK4CONNECTION 0x99
+
#define TCPC_REG_DEV_CAP_1 0x24
#define TCPC_REG_DEV_CAP_2 0x26
#define TCPC_REG_STD_INPUT_CAP 0x28