cy384

hardware / software / wetware

fl2000dx display driver

Update: I've decided not to spend more time working on this. Take a look at this effort for developing a driver.

I was looking for a USB video card to add to a headless Linux box, and wondered if there were any cheaper alternatives to the DisplayLink devices. For about $10 one can find something titled like "NEW USB 3.0 to VGA Video Graphic Card Display External Cable Adapter for Win 7/8" on eBay or Aliexpress. A bit of searching showed that the underlying chip is the Fresco Logic FL2000DX, which appears to allow much better resolution and performance than a (more expensive) DisplayLink. Sadly, no Linux driver exists, and there's very little information available. I've wanted to learn more about Linux display drivers and USB in general, and this seems like an interesting opportunity for practical reasons and personal ones.

Pattern of RGB pixels on an LCD.

current status

I have written a program that can query for EDID (available on github), and another that can configure the device, bring up the display, and display arbitrary pixels/images. Notes on the configurations and pixel format are on the wiki of the fl2000getedid github project. With this basic understanding, a driver should be entirely possible, and 'simply' needs to be written.

tools

I've been using USBPCap for capturing the packets from the Windows driver, and Wireshark for analysis and capture on Linux. I'm currently prototyping with libusb, but may need to go a level lower, as the Windows driver for the FL2000 does some strange, somewhat non-compliant things that libusb doesn't easily allow.

misc. notes

I've got lots of notes and packet captures locally, but it's very disorganized and not worth sharing yet. If anyone really wants to see, get in touch.

vendor id/device id and string that it should report:

1d5c:2000 Fresco Logic Inc. USB3 USB to VGA adapter

reference

full USB 3 lsusb output

Bus 004 Device 002: ID 1d5c:2000  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0         9
  idVendor           0x1d5c 
  idProduct          0x2000 
  bcdDevice            2.00
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          628
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              124mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         3
      bFunctionClass         14 Video
      bFunctionSubClass       1 Video Control
      bFunctionProtocol       3 
      iFunction               0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        16 
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass        16 
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      ** UNRECOGNIZED:  04 21 00 01
      ** UNRECOGNIZED:  06 25 01 00 00 00
      ** UNRECOGNIZED:  06 25 02 00 00 00
      ** UNRECOGNIZED:  0a 22 01 00 05 00 02 00 00 00
      ** UNRECOGNIZED:  06 25 01 00 00 00
      ** UNRECOGNIZED:  0a 22 02 00 10 00 14 00 0d 00
      ** UNRECOGNIZED:  0a 23 03 00 0d 00 05 00 00 00
      ** UNRECOGNIZED:  06 25 02 00 01 00
      ** UNRECOGNIZED:  10 26 01 00 00 00 00 00 64 00 00 00 01 00 00 00
      ** UNRECOGNIZED:  0a 24 01 00 14 00 00 00 00 00
      ** UNRECOGNIZED:  06 25 03 00 01 00
      ** UNRECOGNIZED:  0a 24 02 00 02 00 00 00 00 00
      ** UNRECOGNIZED:  06 25 03 00 01 00
      ** UNRECOGNIZED:  06 25 0c 00 00 00
      ** UNRECOGNIZED:  06 25 09 00 02 00
      ** UNRECOGNIZED:  06 25 0b 00 01 00
      ** UNRECOGNIZED:  14 27 00 00 01 00 3c 00 01 00 02 00 03 00 00 00 00 00 02 00
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x01  EP 1 OUT
    bmAttributes            2
      Transfer Type            Bulk
      Synch Type               None
      Usage Type               Data
    wMaxPacketSize     0x0400  1x 1024 bytes
    bInterval               0
    bMaxBurst              15
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x81  EP 1 IN
    bmAttributes            2
      Transfer Type            Bulk
      Synch Type               None
      Usage Type               Data
    wMaxPacketSize     0x0400  1x 1024 bytes
    bInterval               0
    bMaxBurst               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        16 
      bInterfaceSubClass      2 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x81  EP 1 IN
    bmAttributes            2
      Transfer Type            Bulk
      Synch Type               None
      Usage Type               Data
    wMaxPacketSize     0x0400  1x 1024 bytes
    bInterval               0
    bMaxBurst               0
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x01  EP 1 OUT
    bmAttributes            2
      Transfer Type            Bulk
      Synch Type               None
      Usage Type               Data
    wMaxPacketSize     0x0400  1x 1024 bytes
    bInterval               0
    bMaxBurst              15
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           4
      bInterfaceClass        16 
      bInterfaceSubClass      2 
      bInterfaceProtocol      1 
      iInterface              0 
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x81  EP 1 IN
    bmAttributes            2
      Transfer Type            Bulk
      Synch Type               None
      Usage Type               Data
    wMaxPacketSize     0x0400  1x 1024 bytes
    bInterval               0
    bMaxBurst               0
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x82  EP 2 IN
    bmAttributes           25
      Transfer Type            Isochronous
      Synch Type               Adaptive
      Usage Type               Feedback
    wMaxPacketSize     0x0008  1x 8 bytes
    bInterval               7
    bMaxBurst               0
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x01  EP 1 OUT
    bmAttributes            2
      Transfer Type            Bulk
      Synch Type               None
      Usage Type               Data
    wMaxPacketSize     0x0400  1x 1024 bytes
    bInterval               0
    bMaxBurst               0
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x02  EP 2 OUT
    bmAttributes            9
      Transfer Type            Isochronous
      Synch Type               Adaptive
      Usage Type               Data
    wMaxPacketSize     0x0400  1x 1024 bytes
    bInterval               1
    bMaxBurst               5
    Mult                    2
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           4
      bInterfaceClass        16 
      bInterfaceSubClass      2 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x81  EP 1 IN
    bmAttributes            2
      Transfer Type            Bulk
      Synch Type               None
      Usage Type               Data
    wMaxPacketSize     0x0400  1x 1024 bytes
    bInterval               0
    bMaxBurst               0
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x82  EP 2 IN
    bmAttributes           25
      Transfer Type            Isochronous
      Synch Type               Adaptive
      Usage Type               Feedback
    wMaxPacketSize     0x0008  1x 8 bytes
    bInterval               7
    bMaxBurst               0
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x01  EP 1 OUT
    bmAttributes            2
      Transfer Type            Bulk
      Synch Type               None
      Usage Type               Data
    wMaxPacketSize     0x0400  1x 1024 bytes
    bInterval               0
    bMaxBurst               0
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x02  EP 2 OUT
    bmAttributes            9
      Transfer Type            Isochronous
      Synch Type               Adaptive
      Usage Type               Data
    wMaxPacketSize     0x0400  1x 1024 bytes
    bInterval               1
    bMaxBurst               7
    Mult                    2
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       3
      bNumEndpoints           4
      bInterfaceClass        16 
      bInterfaceSubClass      2 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x81  EP 1 IN
    bmAttributes            2
      Transfer Type            Bulk
      Synch Type               None
      Usage Type               Data
    wMaxPacketSize     0x0400  1x 1024 bytes
    bInterval               0
    bMaxBurst               0
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x82  EP 2 IN
    bmAttributes           25
      Transfer Type            Isochronous
      Synch Type               Adaptive
      Usage Type               Feedback
    wMaxPacketSize     0x0008  1x 8 bytes
    bInterval               7
    bMaxBurst               0
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x01  EP 1 OUT
    bmAttributes            2
      Transfer Type            Bulk
      Synch Type               None
      Usage Type               Data
    wMaxPacketSize     0x0400  1x 1024 bytes
    bInterval               0
    bMaxBurst               0
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x02  EP 2 OUT
    bmAttributes            9
      Transfer Type            Isochronous
      Synch Type               Adaptive
      Usage Type               Data
    wMaxPacketSize     0x0400  1x 1024 bytes
    bInterval               1
    bMaxBurst               9
    Mult                    2
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       4
      bNumEndpoints           4
      bInterfaceClass        16 
      bInterfaceSubClass      2 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x81  EP 1 IN
    bmAttributes            2
      Transfer Type            Bulk
      Synch Type               None
      Usage Type               Data
    wMaxPacketSize     0x0400  1x 1024 bytes
    bInterval               0
    bMaxBurst               0
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x82  EP 2 IN
    bmAttributes           25
      Transfer Type            Isochronous
      Synch Type               Adaptive
      Usage Type               Feedback
    wMaxPacketSize     0x0008  1x 8 bytes
    bInterval               7
    bMaxBurst               0
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x01  EP 1 OUT
    bmAttributes            2
      Transfer Type            Bulk
      Synch Type               None
      Usage Type               Data
    wMaxPacketSize     0x0400  1x 1024 bytes
    bInterval               0
    bMaxBurst               0
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x02  EP 2 OUT
    bmAttributes            9
      Transfer Type            Isochronous
      Synch Type               Adaptive
      Usage Type               Data
    wMaxPacketSize     0x0400  1x 1024 bytes
    bInterval               1
    bMaxBurst              11
    Mult                    2
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       5
      bNumEndpoints           4
      bInterfaceClass        16 
      bInterfaceSubClass      2 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x81  EP 1 IN
    bmAttributes            2
      Transfer Type            Bulk
      Synch Type               None
      Usage Type               Data
    wMaxPacketSize     0x0400  1x 1024 bytes
    bInterval               0
    bMaxBurst               0
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x82  EP 2 IN
    bmAttributes           25
      Transfer Type            Isochronous
      Synch Type               Adaptive
      Usage Type               Feedback
    wMaxPacketSize     0x0008  1x 8 bytes
    bInterval               7
    bMaxBurst               0
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x01  EP 1 OUT
    bmAttributes            2
      Transfer Type            Bulk
      Synch Type               None
      Usage Type               Data
    wMaxPacketSize     0x0400  1x 1024 bytes
    bInterval               0
    bMaxBurst               0
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x02  EP 2 OUT
    bmAttributes            9
      Transfer Type            Isochronous
      Synch Type               Adaptive
      Usage Type               Data
    wMaxPacketSize     0x0400  1x 1024 bytes
    bInterval               1
    bMaxBurst              13
    Mult                    2
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       6
      bNumEndpoints           4
      bInterfaceClass        16 
      bInterfaceSubClass      2 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x81  EP 1 IN
    bmAttributes            2
      Transfer Type            Bulk
      Synch Type               None
      Usage Type               Data
    wMaxPacketSize     0x0400  1x 1024 bytes
    bInterval               0
    bMaxBurst               0
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x82  EP 2 IN
    bmAttributes           25
      Transfer Type            Isochronous
      Synch Type               Adaptive
      Usage Type               Feedback
    wMaxPacketSize     0x0008  1x 8 bytes
    bInterval               7
    bMaxBurst               0
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x01  EP 1 OUT
    bmAttributes            2
      Transfer Type            Bulk
      Synch Type               None
      Usage Type               Data
    wMaxPacketSize     0x0400  1x 1024 bytes
    bInterval               0
    bMaxBurst               0
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x02  EP 2 OUT
    bmAttributes            9
      Transfer Type            Isochronous
      Synch Type               Adaptive
      Usage Type               Data
    wMaxPacketSize     0x0400  1x 1024 bytes
    bInterval               1
    bMaxBurst              15
    Mult                    2
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass        16 
      bInterfaceSubClass      2 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
    bLength                 7
    bDescriptorType         5
    bEndpointAddress     0x83  EP 3 IN
    bmAttributes            3
      Transfer Type            Interrupt
      Synch Type               None
      Usage Type               Data
    wMaxPacketSize     0x0001  1x 1 bytes
    bInterval               6
    bMaxBurst               0
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength           22
  bNumDeviceCaps          2
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000002
      Link Power Management (LPM) Supported
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x00
    wSpeedsSupported   0x000c
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   2
      Lowest fully-functional device speed is High Speed (480Mbps)
    bU1DevExitLat          10 micro seconds
    bU2DevExitLat          20 micro seconds
Device Status:     0x000c
  (Bus Powered)
  U1 Enabled
  U2 Enabled