summaryrefslogtreecommitdiff
path: root/chip
diff options
context:
space:
mode:
authorTodd Broch <tbroch@chromium.org>2014-10-28 18:04:01 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-10-31 06:29:34 +0000
commitce9ae08b6889e7d7032ba66821e4c73dae20fb78 (patch)
treef4d37db7152bab2ba549a0805e237bdb5a97f2cf /chip
parentaac88442d7bbc76ec5116fdb3019af09cc522938 (diff)
downloadchrome-ec-ce9ae08b6889e7d7032ba66821e4c73dae20fb78.tar.gz
pd: dingdong/hoho: Include product VDO in discovery identity.
Per table 6-24 of USB PD spec an alternate mode adapter (AMA) should include both product & AMA VDOs. BRANCH=samus BUG=chrome-os-partner:31192,chrome-os-partner:31193 TEST=manual, Connect hoho/dingdong to fpie/samus and see product VDO proceed the AMA VDO in DFP_U console output: Product VDO -----------------------------v |------| SVDM/5 [1] ff008041 340018d1 00000000 50100001 1100000b Note, hoho's PID == 0x5010 And dingdong (0x5011) SVDM/5 [1] ff008041 340018d1 00000000 50110001 1100000b Also see bcdDevice field in descriptor match above data. $ lsusb -v -d 18d1: | egrep -i "idproduct|bcddev" idProduct 0x5011 bcdDevice 0.01 Change-Id: I4d898816a45c68c7ff75a54fd348fc11be408ae0 Signed-off-by: Todd Broch <tbroch@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/226125 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r--chip/stm32/usb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/chip/stm32/usb.c b/chip/stm32/usb.c
index 409cb4f69d..8cb01a002b 100644
--- a/chip/stm32/usb.c
+++ b/chip/stm32/usb.c
@@ -30,6 +30,10 @@
#define USB_DEV_CLASS USB_CLASS_PER_INTERFACE
#endif
+#ifndef CONFIG_USB_BCD_DEV
+#define CONFIG_USB_BCD_DEV 0x0100 /* 1.00 */
+#endif
+
/* USB Standard Device Descriptor */
static const struct usb_device_descriptor dev_desc = {
.bLength = USB_DT_DEVICE_SIZE,
@@ -41,7 +45,7 @@ static const struct usb_device_descriptor dev_desc = {
.bMaxPacketSize0 = USB_MAX_PACKET_SIZE,
.idVendor = USB_VID_GOOGLE,
.idProduct = CONFIG_USB_PID,
- .bcdDevice = 0x0200, /* 2.00 */
+ .bcdDevice = CONFIG_USB_BCD_DEV,
.iManufacturer = USB_STR_VENDOR,
.iProduct = USB_STR_PRODUCT,
.iSerialNumber = 0,