summaryrefslogtreecommitdiff
path: root/include/usb_pd.h
diff options
context:
space:
mode:
authorBernard Shyu <bernard_shyu@bizlinktech.com>2014-11-19 19:05:34 +0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-11-19 23:17:44 +0000
commit1e9491e07db038541d9c707d081aad83bb1ace5d (patch)
treedfc186858121059a90ab7ce6271692ebb853786c /include/usb_pd.h
parent6be0040bbe0316058330392fe7327ff0c58e5081 (diff)
downloadchrome-ec-1e9491e07db038541d9c707d081aad83bb1ace5d.tar.gz
usb_pd: SVDM DP protocol definition errors
The role of hoho & dingdong is UFP, and the corresponding protocol fields in VDO (vdo_idh) should reflect it. Fix error in IDH_PTYPE definitions of SVDM Identity Header, it's reversed Adds more legible names to protocol field constants BUG=none BRANCH=none TEST=make buildall Change-Id: Idac9327bf3e8e9597221654bce80bb311b3304af Reviewed-on: https://chromium-review.googlesource.com/230657 Reviewed-by: Alec Berg <alecaberg@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org> Commit-Queue: Bernard Shyu <bernard_shyu@bizlinktech.com> Tested-by: Bernard Shyu <bernard_shyu@bizlinktech.com>
Diffstat (limited to 'include/usb_pd.h')
-rw-r--r--include/usb_pd.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h
index d498570366..b743324566 100644
--- a/include/usb_pd.h
+++ b/include/usb_pd.h
@@ -277,8 +277,8 @@ struct pd_policy {
#define IDH_PTYPE_UNDEF 0
#define IDH_PTYPE_HUB 1
#define IDH_PTYPE_PERIPH 2
-#define IDH_PTYPE_ACABLE 3
-#define IDH_PTYPE_PCABLE 4
+#define IDH_PTYPE_PCABLE 3
+#define IDH_PTYPE_ACABLE 4
#define IDH_PTYPE_AMA 5
#define VDO_IDH(usbh, usbd, ptype, is_modal, vid) \
@@ -330,6 +330,12 @@ struct pd_policy {
#define CABLE_CTYPE 2
#define CABLE_PLUG 0
#define CABLE_RECEPTACLE 1
+#define CABLE_CURR_1A5 0
+#define CABLE_CURR_3A 1
+#define CABLE_CURR_5A 2
+#define CABLE_USBSS_U2_ONLY 0
+#define CABLE_USBSS_U31_GEN1 1
+#define CABLE_USBSS_U31_GEN2 2
#define VDO_CABLE(hw, fw, cbl, gdr, lat, term, tx1d, tx2d, rx1d, rx2d, cur, vps, sopp, usbss) \
(((hw) & 0x7) << 28 | ((fw) & 0x7) << 24 | ((cbl) & 0x3) << 18 \
| (gdr) << 17 | ((lat) & 0x7) << 13 | ((term) & 0x3) << 11 \
@@ -361,7 +367,17 @@ struct pd_policy {
#define PD_VDO_AMA_VCONN_REQ(vdo) (((vdo) >> 4) & 1)
#define PD_VDO_AMA_VBUS_REQ(vdo) (((vdo) >> 3) & 1)
-#define AMA_USBSS_BBONLY 0x3
+#define AMA_VCONN_PWR_1W 0
+#define AMA_VCONN_PWR_1W5 1
+#define AMA_VCONN_PWR_2W 2
+#define AMA_VCONN_PWR_3W 3
+#define AMA_VCONN_PWR_4W 4
+#define AMA_VCONN_PWR_5W 5
+#define AMA_VCONN_PWR_6W 6
+#define AMA_USBSS_U2_ONLY 0
+#define AMA_USBSS_U31_GEN1 1
+#define AMA_USBSS_U31_GEN2 2
+#define AMA_USBSS_BBONLY 3
/*
* SVDM Discover SVIDs request -> response