The easiest way to add screen to ZedBoard.

While waiting for my custom TFT panel board to be build and Zynq IP created, I'm decided to go ahead and build Qt libraries and start porting application. In order to test my application I need linux video framebuffer of any sort and easiest way to add screen to ZedBoard is to use DisplayLink Video USB-to-DVI adaptor. I got first generation of DisplayLink adaptor from Kengsington model K33907.

I did use Xilinx PetaLinux 13.10 under Ubuntu 13.10 and kernel v3.12.0 from Xilinx git repo: and I did reuse PetaLinux project I created using ZedBoard CTT hardware design from ZedBoard_CTT_v2013_2_130807 tutorial. But it works just as good with PetaLinux 13.10 default linux kernel 3.8.11.

  1. First, we need to reconfigure linux kernel to include a driver and enable some framebuffer related options. So, run kernel config utility, go to 'Device Drivers' -> 'Graphics support' and make appropriate changes:

    cd ~/Projects/my_zedboard_petalinux_project/
    petalinux-config -c kernel

    zynq6_001

    zynq6_002

  2. Clean PetaLinux project from previous build and rebuild it:

    petalinux-build -x mrproper
    petalinux-build

  3. Connect DisplayLink USB adaptor to USB OTG port of ZedBoard.
  4. Check JP2 and JP3 jumpers on the ZedBoard - both must be shorted to set USB in a Host mode.
  5. Now transfer new image.ub to SD card if you using SD card. Or if you using 'tftp' to load kernel - just reset ZedBoard.
  6. During boot process you should see something similar to the code below and if you do this means DisplayLink driver works, it found video adapter connected to USB, got EDID with modes from monitor and set appropriate mode. In my case it 1440x900 59Hz:

    usb 1-1: new high-speed USB device number 2 using xusbps-ehci
    usb 1-1: New USB device found, idVendor=17e9, idProduct=0033
    usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    usb 1-1: Product: K33907
    usb 1-1: Manufacturer: DisplayLink
    usb 1-1: SerialNumber: 0033-105190
    udlfb: DisplayLink K33907 - serial #0033-105190
    udlfb: vid_17e9&pid_0033&rev_0002 driver's dlfb_data struct at ceb5b000
    udlfb: console enable=1
    udlfb: fb_defio enable=1
    udlfb: shadow enable=1
    udlfb: vendor descriptor not available (-32)
    udlfb: allocated 4 65024 byte urbs
    udlfb: 1440x900 @ 59 Hz valid mode
    udlfb: 720x400 @ 70 Hz valid mode
    udlfb: 640x480 @ 60 Hz valid mode
    udlfb: 640x480 @ 67 Hz valid mode
    udlfb: 640x480 @ 72 Hz valid mode
    udlfb: 640x480 @ 75 Hz valid mode
    udlfb: 800x600 @ 56 Hz valid mode
    udlfb: 800x600 @ 60 Hz valid mode
    udlfb: 800x600 @ 72 Hz valid mode
    udlfb: 800x600 @ 75 Hz valid mode
    udlfb: 832x624 @ 75 Hz valid mode
    udlfb: 1024x768 @ 60 Hz valid mode
    udlfb: 1024x768 @ 70 Hz valid mode
    udlfb: 1024x768 @ 75 Hz valid mode
    udlfb: 1280x1024 @ 75 Hz valid mode
    udlfb: 1152x864 @ 75 Hz valid mode
    udlfb: 1440x900 @ 60 Hz valid mode
    udlfb: 1440x900 @ 75 Hz valid mode
    udlfb: 1280x1024 @ 60 Hz valid mode
    udlfb: 1280x960 @ 60 Hz valid mode
    udlfb: 1152x864 @ 75 Hz valid mode
    udlfb: Reallocating framebuffer. Addresses will change!
    udlfb: 1440x900 @ 59 Hz valid mode
    udlfb: set_par mode 1440x900
    udlfb: open /dev/fb0 user=0 fb_info=c0889400 count=1
    udlfb: set_par mode 1440x900
    Console: switching to colour frame buffer device 180x56
    udlfb: set_par mode 1440x900
    udlfb: DisplayLink USB device /dev/fb0 attached. 1440x900 resolution. Using 5064K framebuffer memory

  7. One of the monitors I tried - didn't send EDID data to the adapter, so I endup creating /etc/fb.modes file with all the modes supported by my monitor.
  8. Now, just verify we got linux framebuffer device in your "/dev/" - it should be "/dev/fb0" and send some random data to it to see if it really works.
  9. cat /bin/busybox > /dev/fb0
    udlfb: open /dev/fb0 user=1 fb_info=cebc5400 count=2
    udlfb: released /dev/fb0 user=1 count=1

  10. If you see random data on screen, similar to the screenshot below - congratulations! Your adapter now works with ZedBoard!
  11. zynq6_005

Leave a Reply