diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2014-06-02 14:14:35 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-06-03 02:25:54 +0000 |
commit | bbee5e137ee44e7bca9fa0cc8cc4ed16b068071f (patch) | |
tree | 23e514eddf2717863930926d7cb6038518dbba7d | |
parent | e6755ca4ac9e92e1b1c5bab4336034a06b809926 (diff) | |
download | chrome-ec-bbee5e137ee44e7bca9fa0cc8cc4ed16b068071f.tar.gz |
pd: set BMC bit
In the current version of USB-PD standard, the packet header should have bit 15
set to 1 to tell the other side that we are supporting Biphase Mark Coding
(aka BMC).
For now, just set it, do not check it as most of our devices are setting it
yet.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=none
BUG=none
TEST=make buildall
Change-Id: Ia6f89f592632520b46478a7d7975e9e8d3a28b59
Reviewed-on: https://chromium-review.googlesource.com/202391
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r-- | common/usb_pd_protocol.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c index 00f072e253..c42ed176a2 100644 --- a/common/usb_pd_protocol.c +++ b/common/usb_pd_protocol.c @@ -60,6 +60,9 @@ enum { /* Protocol revision */ #define PD_REV10 0 +/* BMC-supported bit : we are using the baseband variant of the protocol */ +#define PD_BMC_SUPPORTED (1 << 15) + /* Port role */ #define PD_ROLE_SINK 0 #define PD_ROLE_SOURCE 1 @@ -67,7 +70,8 @@ enum { /* build message header */ #define PD_HEADER(type, role, id, cnt) \ ((type) | (PD_REV10 << 6) | \ - ((role) << 8) | ((id) << 9) | ((cnt) << 12)) + ((role) << 8) | ((id) << 9) | ((cnt) << 12) | \ + PD_BMC_SUPPORTED) #define PD_HEADER_CNT(header) (((header) >> 12) & 7) #define PD_HEADER_TYPE(header) ((header) & 0xF) |