diff options
author | Vijay Hiremath <vijay.p.hiremath@intel.com> | 2020-04-15 10:21:40 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-05-21 01:49:39 +0000 |
commit | 378f043758d4022bd6d19541446362f634418dde (patch) | |
tree | 87a2c321cc72de40f565a1b60d4a53e092c628e0 /include | |
parent | 721eea946601251afe92c5affb94bb7e208b5336 (diff) | |
download | chrome-ec-378f043758d4022bd6d19541446362f634418dde.tar.gz |
BB retimer: Add 'USB2_connection' bit
USB2_CONNECTION bit is set to 1 if the cable is either Passive or a Gen3
active cable with USB2.0 support. Hence, added a function that indicates
if the cable supports USB2 connection.
Ref: Burnside Bridge spec Table 13: Connection state register
BUG=b:152544514
BRANCH=None
TEST=Tested on volteer by connecting a dock using a Gen3 Active cable
with a USB2.0 connected to the dock, able to set USB2_connection bit.
Change-Id: I125182b23becaa7d00011f6eadb1916b48c79803
Signed-off-by: Ayushee <ayushee.shah@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2139278
Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/usb_pd.h | 8 | ||||
-rw-r--r-- | include/usb_pd_vdo.h | 7 |
2 files changed, 14 insertions, 1 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h index 229811b4f8..4df3084461 100644 --- a/include/usb_pd.h +++ b/include/usb_pd.h @@ -1869,6 +1869,14 @@ struct pd_discovery *pd_get_am_discovery(int port, */ struct pd_cable *pd_get_cable_attributes(int port); +/* + * Returns True if cable supports USB2 connection + * + * @param port USB-C port number + * @return True is usb2_supported, false otherwise + */ +bool is_usb2_cable_support(int port); + /** * Set DFP enter mode flags if available * diff --git a/include/usb_pd_vdo.h b/include/usb_pd_vdo.h index 6efdd3fa94..d43c92d144 100644 --- a/include/usb_pd_vdo.h +++ b/include/usb_pd_vdo.h @@ -321,6 +321,11 @@ enum retimer_active_element { ACTIVE_RETIMER, }; +enum active_cable_usb2_support { + USB2_SUPPORTED, + USB2_NOT_SUPPORTED, +}; + union active_cable_vdo2_rev30 { struct { uint8_t usb_gen : 1; @@ -328,7 +333,7 @@ union active_cable_vdo2_rev30 { uint8_t a_cable_type : 1; uint8_t usb_lanes : 1; uint8_t usb_32_support : 1; - uint8_t usb_20_support : 1; + enum active_cable_usb2_support usb_20_support : 1; uint8_t usb_20_hub_hop : 2; uint8_t usb_40_support : 1; enum retimer_active_element active_elem : 1; |