/******************** Descriptors and Strings *******************************/
static const struct {
- struct usb_functionfs_descs_head header;
+ struct usb_functionfs_descs_head_v2 header;
+ __le32 fs_count;
+ __le32 hs_count;
+ __le32 ss_count;
struct {
struct usb_interface_descriptor acm;
struct usb_endpoint_descriptor_no_audio int_in;
struct usb_endpoint_descriptor_no_audio bulk_in;
struct usb_endpoint_descriptor_no_audio bulk_out;
} __attribute__ ((__packed__)) fs_descs, hs_descs;
+ struct {
+ struct usb_interface_descriptor acm;
+ struct usb_endpoint_descriptor_no_audio int_in;
+ struct usb_ss_ep_comp_descriptor int_in_comp;
+ struct usb_interface_descriptor intf;
+ struct usb_endpoint_descriptor_no_audio bulk_in;
+ struct usb_ss_ep_comp_descriptor bulk_in_comp;
+ struct usb_endpoint_descriptor_no_audio bulk_out;
+ struct usb_ss_ep_comp_descriptor bulk_out_comp;
+ } __attribute__ ((__packed__)) ss_descs;
} __attribute__ ((__packed__)) descriptors = {
.header = {
- .magic = __cpu_to_le32(FUNCTIONFS_DESCRIPTORS_MAGIC),
+ .magic = __cpu_to_le32(FUNCTIONFS_DESCRIPTORS_MAGIC_V2),
.length = __cpu_to_le32(sizeof(descriptors)),
- .fs_count = __cpu_to_le32(5),
- .hs_count = __cpu_to_le32(5),
+ .flags = FUNCTIONFS_HAS_FS_DESC | FUNCTIONFS_HAS_HS_DESC |
+ FUNCTIONFS_HAS_SS_DESC,
},
+ .fs_count = __cpu_to_le32(5),
+ .hs_count = __cpu_to_le32(5),
+ .ss_count = __cpu_to_le32(8),
.fs_descs = {
.acm = {
.bLength = sizeof(descriptors.fs_descs.intf),
.wMaxPacketSize = __cpu_to_le16(512),
},
},
+ .ss_descs = {
+ .acm = {
+ .bLength = sizeof(descriptors.ss_descs.intf),
+ .bDescriptorType = USB_DT_INTERFACE,
+ .bInterfaceNumber = 0,
+ .bNumEndpoints = 1,
+ .bInterfaceClass = USB_CLASS_COMM,
+ .bInterfaceSubClass = USB_CDC_SUBCLASS_ACM,
+ .bInterfaceProtocol = USB_CDC_ACM_PROTO_AT_V25TER,
+ .iInterface = 1,
+ },
+ .int_in = {
+ .bLength = sizeof(descriptors.ss_descs.int_in),
+ .bDescriptorType = USB_DT_ENDPOINT,
+ .bEndpointAddress = 3 | USB_DIR_IN,
+ .bmAttributes = USB_ENDPOINT_XFER_INT,
+ .wMaxPacketSize = __cpu_to_le16(16),
+ .bInterval = 10,
+ },
+ .int_in_comp = {
+ .bLength = sizeof(descriptors.ss_descs.int_in_comp),
+ .bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
+ },
+ .intf = {
+ .bLength = sizeof(descriptors.ss_descs.intf),
+ .bDescriptorType = USB_DT_INTERFACE,
+ .bInterfaceNumber = 1,
+ .bNumEndpoints = 2,
+ .bInterfaceClass = USB_CLASS_CDC_DATA,
+ .iInterface = 1,
+ },
+ .bulk_in = {
+ .bLength = sizeof(descriptors.ss_descs.bulk_in),
+ .bDescriptorType = USB_DT_ENDPOINT,
+ .bEndpointAddress = 1 | USB_DIR_IN,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ .wMaxPacketSize = __cpu_to_le16(1024),
+ },
+ .bulk_in_comp = {
+ .bLength = sizeof(descriptors.ss_descs.bulk_in_comp),
+ .bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
+ },
+ .bulk_out = {
+ .bLength = sizeof(descriptors.ss_descs.bulk_out),
+ .bDescriptorType = USB_DT_ENDPOINT,
+ .bEndpointAddress = 2 | USB_DIR_OUT,
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ .wMaxPacketSize = __cpu_to_le16(1024),
+ },
+ .bulk_out_comp = {
+ .bLength = sizeof(descriptors.ss_descs.bulk_out_comp),
+ .bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
+ },
+ },
};
#define STR_INTERFACE "TIZEN USB DRIVER"