mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
firmware: Add descriptors for B2xx mini variants
The current firmware missed descriptors for B200-mini and B205-mini. Added the missing descriptors. Also this commit ammends the firmware howto. It specifies the SDK version we are using as well as some additional command applied to the SDK files to make the patch successful. Co-authored-by: Lars Amsel <lars.amsel@emerson.com>
This commit is contained in:
parent
155dfbf352
commit
1907032f7b
@ -28,6 +28,9 @@
|
||||
#define EEPROM_PID_LENGTH 2
|
||||
|
||||
#define PID_ETTUS_B200_B210 0x0020
|
||||
#define PID_ETTUS_B200_MINI 0x0021
|
||||
#define PID_ETTUS_B205_MINI 0x0022
|
||||
#define PID_ETTUS_B206_MINI 0x0023
|
||||
#define PID_NI_USRP_2900 0x7813
|
||||
#define PID_NI_USRP_2901 0x7814
|
||||
#define PID_CYPRESS_DEFAULT 0x00F0
|
||||
|
||||
@ -9,18 +9,21 @@
|
||||
information read from the EEPROM. */
|
||||
|
||||
/* Standard Device Descriptor for USB 2.0 */
|
||||
unsigned char common_usb2_dev_desc[] =
|
||||
{
|
||||
unsigned char common_usb2_dev_desc[] = {
|
||||
0x12, /* Descriptor size */
|
||||
0x01, /* CY_U3P_USB_DEVICE_DESCR Device descriptor type */
|
||||
0x10,0x02, /* USB 2.10 */
|
||||
0x10,
|
||||
0x02, /* USB 2.10 */
|
||||
0xFF, /* Device class */
|
||||
0x00, /* Device sub-class */
|
||||
0x00, /* Device protocol */
|
||||
0x40, /* Maxpacket size for EP0 : 64 bytes */
|
||||
0xB4,0x04, /* Vendor ID */
|
||||
0xF0,0x00, /* Product ID */
|
||||
0x00,0x00, /* Device release number */
|
||||
0xB4,
|
||||
0x04, /* Vendor ID */
|
||||
0xF0,
|
||||
0x00, /* Product ID */
|
||||
0x00,
|
||||
0x00, /* Device release number */
|
||||
0x01, /* Manufacture string index */
|
||||
0x02, /* Product string index */
|
||||
0x03, /* Serial number string index */
|
||||
@ -28,18 +31,21 @@ unsigned char common_usb2_dev_desc[] =
|
||||
};
|
||||
|
||||
/* Standard Device Descriptor for USB 3.0 */
|
||||
unsigned char common_usb3_dev_desc[] =
|
||||
{
|
||||
unsigned char common_usb3_dev_desc[] = {
|
||||
0x12, /* Descriptor size */
|
||||
0x01, /* CY_U3P_USB_DEVICE_DESCR Device descriptor type */
|
||||
0x00,0x03, /* USB 3.0 */
|
||||
0x00,
|
||||
0x03, /* USB 3.0 */
|
||||
0xFF, /* Device class */
|
||||
0x00, /* Device sub-class */
|
||||
0x00, /* Device protocol */
|
||||
0x09, /* Maxpacket size for EP0 : 2^9 */
|
||||
0xB4,0x04, /* Vendor ID */
|
||||
0xF0,0x00, /* Product ID */
|
||||
0x00,0x00, /* Device release number */
|
||||
0xB4,
|
||||
0x04, /* Vendor ID */
|
||||
0xF0,
|
||||
0x00, /* Product ID */
|
||||
0x00,
|
||||
0x00, /* Device release number */
|
||||
0x01, /* Manufacture string index */
|
||||
0x02, /* Product string index */
|
||||
0x03, /* Serial number string index */
|
||||
@ -47,11 +53,11 @@ unsigned char common_usb3_dev_desc[] =
|
||||
};
|
||||
|
||||
/* Standard Device Qualifier Descriptor */
|
||||
const unsigned char common_dev_qual_desc[] =
|
||||
{
|
||||
const unsigned char common_dev_qual_desc[] = {
|
||||
0x0A, /* Descriptor size */
|
||||
0x06, /* CY_U3P_USB_DEVQUAL_DESCR Device qualifier descriptor type */
|
||||
0x00,0x02, /* USB 2.0 */
|
||||
0x00,
|
||||
0x02, /* USB 2.0 */
|
||||
0xFF, /* Device class */
|
||||
0x00, /* Device sub-class */
|
||||
0x00, /* Device protocol */
|
||||
@ -61,39 +67,44 @@ const unsigned char common_dev_qual_desc[] =
|
||||
};
|
||||
|
||||
/* Standard Binary Device Object Store Descriptor */
|
||||
const unsigned char common_usb_bos_desc[] =
|
||||
{
|
||||
const unsigned char common_usb_bos_desc[] = {
|
||||
0x05, /* Descriptor size */
|
||||
0x0F, /* CY_U3P_BOS_DESCR Device descriptor type */
|
||||
0x16,0x00, /* Length of this descriptor and all sub descriptors */
|
||||
0x16,
|
||||
0x00, /* Length of this descriptor and all sub descriptors */
|
||||
0x02, /* Number of device capability descriptors */
|
||||
|
||||
/* USB 2.0 extension */
|
||||
0x07, /* Descriptor size */
|
||||
0x10, /* CY_U3P_DEVICE_CAPB_DESCR Device capability type descriptor */
|
||||
0x02, /* CY_U3P_USB2_EXTN_CAPB_TYPE USB 2.0 extension capability type */
|
||||
0x02,0x00,0x00,0x00, /* Supported device level features: LPM support */
|
||||
0x02,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00, /* Supported device level features: LPM support */
|
||||
|
||||
/* SuperSpeed device capability */
|
||||
0x0A, /* Descriptor size */
|
||||
0x10, /* CY_U3P_DEVICE_CAPB_DESCR Device capability type descriptor */
|
||||
0x03, /* CY_U3P_SS_USB_CAPB_TYPE SuperSpeed device capability type */
|
||||
0x00, /* Supported device level features */
|
||||
0x0E,0x00, /* Speeds supported by the device : SS, HS and FS */
|
||||
0x0E,
|
||||
0x00, /* Speeds supported by the device : SS, HS and FS */
|
||||
0x03, /* Functionality support */
|
||||
0x00, /* U1 Device Exit latency */
|
||||
0x00,0x00 /* U2 Device Exit latency */
|
||||
0x00,
|
||||
0x00 /* U2 Device Exit latency */
|
||||
};
|
||||
|
||||
/* Standard Language ID String Descriptor */
|
||||
const unsigned char common_string_lang_id_desc[] =
|
||||
{
|
||||
const unsigned char common_string_lang_id_desc[] = {
|
||||
0x04, /* Descriptor Size */
|
||||
0x03, /* CY_U3P_USB_STRING_DESCR Device Descriptor Type */
|
||||
0x09,0x04 /* Language ID supported */
|
||||
0x09,
|
||||
0x04 /* Language ID supported */
|
||||
};
|
||||
|
||||
|
||||
// clang-format off
|
||||
/* Ettus Manufacturer String Descriptor */
|
||||
const unsigned char common_ettus_manufacturer_desc[] =
|
||||
{
|
||||
@ -165,10 +176,70 @@ const unsigned char common_b200_product_desc[] =
|
||||
' ',0x00,
|
||||
'B',0x00,
|
||||
'2',0x00,
|
||||
'0',0x00,
|
||||
'x',0x00,
|
||||
'0',0x00
|
||||
};
|
||||
|
||||
const unsigned char common_b200_mini_product_desc[] =
|
||||
{
|
||||
0x1E, /* Descriptor Size */
|
||||
0x03, /* CY_U3P_USB_STRING_DESCR Device Descriptor Type */
|
||||
'U',0x00,
|
||||
'S',0x00,
|
||||
'R',0x00,
|
||||
'P',0x00,
|
||||
' ',0x00,
|
||||
'B',0x00,
|
||||
'2',0x00,
|
||||
'0',0x00,
|
||||
'0',0x00,
|
||||
' ',0x00,
|
||||
'm',0x00,
|
||||
'i',0x00,
|
||||
'n',0x00,
|
||||
'i',0x00
|
||||
};
|
||||
|
||||
const unsigned char common_b205_mini_product_desc[] =
|
||||
{
|
||||
0x1E, /* Descriptor Size */
|
||||
0x03, /* CY_U3P_USB_STRING_DESCR Device Descriptor Type */
|
||||
'U',0x00,
|
||||
'S',0x00,
|
||||
'R',0x00,
|
||||
'P',0x00,
|
||||
' ',0x00,
|
||||
'B',0x00,
|
||||
'2',0x00,
|
||||
'0',0x00,
|
||||
'5',0x00,
|
||||
' ',0x00,
|
||||
'm',0x00,
|
||||
'i',0x00,
|
||||
'n',0x00,
|
||||
'i',0x00
|
||||
};
|
||||
|
||||
const unsigned char common_b206_mini_product_desc[] =
|
||||
{
|
||||
0x1E, /* Descriptor Size */
|
||||
0x03, /* CY_U3P_USB_STRING_DESCR Device Descriptor Type */
|
||||
'U',0x00,
|
||||
'S',0x00,
|
||||
'R',0x00,
|
||||
'P',0x00,
|
||||
' ',0x00,
|
||||
'B',0x00,
|
||||
'2',0x00,
|
||||
'0',0x00,
|
||||
'6',0x00,
|
||||
' ',0x00,
|
||||
'm',0x00,
|
||||
'i',0x00,
|
||||
'n',0x00,
|
||||
'i',0x00
|
||||
};
|
||||
|
||||
/* NI-USRP 2900 Product String Descriptor */
|
||||
const unsigned char common_niusrp_2900_product_desc[] =
|
||||
{
|
||||
@ -235,3 +306,4 @@ unsigned char common_dev_serial_desc[] =
|
||||
'0',0x00,
|
||||
'0',0x00
|
||||
};
|
||||
//clang-format on
|
||||
@ -32,9 +32,18 @@ extern const unsigned char common_ettus_manufacturer_desc[];
|
||||
/* NI Manufacturer String Descriptor */
|
||||
extern const unsigned char common_ni_manufacturer_desc[];
|
||||
|
||||
/* Ettus Product String Descriptor */
|
||||
/* Ettus B200/B210 Product String Descriptor */
|
||||
extern const unsigned char common_b200_product_desc[];
|
||||
|
||||
/* Ettus B200 mini Product String Descriptor */
|
||||
extern const unsigned char common_b200_mini_product_desc[];
|
||||
|
||||
/* Ettus B205 mini Product String Descriptor */
|
||||
extern const unsigned char common_b205_mini_product_desc[];
|
||||
|
||||
/* Ettus B206 mini Product String Descriptor */
|
||||
extern const unsigned char common_b206_mini_product_desc[];
|
||||
|
||||
/* NI-USRP 2900 Product String Descriptor */
|
||||
extern const unsigned char common_niusrp_2900_product_desc[];
|
||||
|
||||
|
||||
@ -12,7 +12,8 @@
|
||||
|
||||
/* Check the rev, magic value, and eeprom compatibility field to determine if
|
||||
our eeprom map is up-to-date with what is written on the device */
|
||||
int eeprom_is_readable(eeprom_read_t read_fn) {
|
||||
int eeprom_is_readable(eeprom_read_t read_fn)
|
||||
{
|
||||
/* Only check this once, then store that info */
|
||||
static int is_readable = UNREAD;
|
||||
|
||||
@ -22,16 +23,14 @@ int eeprom_is_readable(eeprom_read_t read_fn) {
|
||||
|
||||
int rev = get_rev(read_fn);
|
||||
|
||||
if (rev == EEPROM_REV_UNRECOGNIZED)
|
||||
{
|
||||
if (rev == EEPROM_REV_UNRECOGNIZED) {
|
||||
is_readable = 0;
|
||||
return is_readable;
|
||||
}
|
||||
|
||||
|
||||
/* If rev is 0, there's no further checks available */
|
||||
if (rev == 0)
|
||||
{
|
||||
if (rev == 0) {
|
||||
is_readable = 1;
|
||||
return is_readable;
|
||||
}
|
||||
@ -91,7 +90,6 @@ int get_rev(eeprom_read_t read_fn)
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Read the vendor ID from EEPROM using the function specified*/
|
||||
uint16_t get_vid(eeprom_read_t read_fn)
|
||||
{
|
||||
@ -189,6 +187,12 @@ const uint8_t* get_product_string_descriptor(uint16_t pid)
|
||||
{
|
||||
if (pid == PID_ETTUS_B200_B210) {
|
||||
return common_b200_product_desc;
|
||||
} else if (pid == PID_ETTUS_B200_MINI) {
|
||||
return common_b200_mini_product_desc;
|
||||
} else if (pid == PID_ETTUS_B205_MINI) {
|
||||
return common_b205_mini_product_desc;
|
||||
} else if (pid == PID_ETTUS_B206_MINI) {
|
||||
return common_b206_mini_product_desc;
|
||||
} else if (pid == PID_NI_USRP_2900) {
|
||||
return common_niusrp_2900_product_desc;
|
||||
} else if (pid == PID_NI_USRP_2901) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user