summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chip/stm32/usb-stream.h4
-rw-r--r--chip/stm32/usb_console.c4
-rw-r--r--include/usb.h4
3 files changed, 8 insertions, 4 deletions
diff --git a/chip/stm32/usb-stream.h b/chip/stm32/usb-stream.h
index ae6735a281..92cfc4e60d 100644
--- a/chip/stm32/usb-stream.h
+++ b/chip/stm32/usb-stream.h
@@ -151,8 +151,8 @@ extern struct out_stream_ops const usb_stream_out_stream_ops;
.bAlternateSetting = 0, \
.bNumEndpoints = 2, \
.bInterfaceClass = USB_CLASS_VENDOR_SPEC, \
- .bInterfaceSubClass = 0, \
- .bInterfaceProtocol = 0, \
+ .bInterfaceSubClass = USB_SUBCLASS_GOOGLE_SERIAL, \
+ .bInterfaceProtocol = USB_PROTOCOL_GOOGLE_SERIAL, \
.iInterface = 0, \
}; \
const struct usb_endpoint_descriptor \
diff --git a/chip/stm32/usb_console.c b/chip/stm32/usb_console.c
index ab7244da9f..81121dfcc7 100644
--- a/chip/stm32/usb_console.c
+++ b/chip/stm32/usb_console.c
@@ -37,8 +37,8 @@ const struct usb_interface_descriptor USB_IFACE_DESC(USB_IFACE_CONSOLE) = {
.bAlternateSetting = 0,
.bNumEndpoints = 2,
.bInterfaceClass = USB_CLASS_VENDOR_SPEC,
- .bInterfaceSubClass = 0,
- .bInterfaceProtocol = 0,
+ .bInterfaceSubClass = USB_SUBCLASS_GOOGLE_SERIAL,
+ .bInterfaceProtocol = USB_PROTOCOL_GOOGLE_SERIAL,
.iInterface = 0,
};
const struct usb_endpoint_descriptor USB_EP_DESC(USB_IFACE_CONSOLE, 0) = {
diff --git a/include/usb.h b/include/usb.h
index 98e81794ab..bf2bb8fd6a 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -154,6 +154,10 @@ struct usb_endpoint_descriptor {
/* USB Vendor ID assigned to Google Inc. */
#define USB_VID_GOOGLE 0x18d1
+/* Google specific SubClass/Protocol assignments */
+#define USB_SUBCLASS_GOOGLE_SERIAL 0x50
+#define USB_PROTOCOL_GOOGLE_SERIAL 0x01
+
/* Control requests */
/* bRequestType fields */