Project

General

Profile

DVI Framebuffer (fpga i2c) problem

Added by Mathew Jones almost 9 years ago

Hi, I have so far failed to get our MitDSP-L138F to output to a monitor via the DVI link.
It's a similar problem to the LCD Framebuffer post ([[https://support.criticallink.com/redmine/boards/10/topics/4558]]), but which requires a different set-up.

I have the following setup:
  • MityDSP-L138F (ARM/DSP & LX45 variant FPGA) SOM and Industrial IO Card revision B
  • DVI-D (Single Link) cable connected from a monitor to the Industrial IO Card.
    (Cable and monitor do work when the DVI cable is connected to a PC)
  • uBoot version: U-Boot 2009.11 (Jan 13 2014 - 11:14:02)
  • MityDSP-L138F ethernet connected to Win7 PC running the MityDSP VM in Virtual Box.

(1) Configured uBoot so it has the LCD Config as:
LCD Config : 1
LCD Panel : vga_640x480

I've also tried svga_800x600

(2) From MDK_2014_01_13, the kernel (uImage) and FPGA image (IndustrialIO_dvi_revA-B.bin) have been programmed into NOR Flash. The filesystem (mityomap-full.jffs2) has been programmed into NAND Flash.

uBoot start-up environment variables are set as follows:
progfpga=sf probe 0; sf read 0xc0700000 0x580000 0x170000; loadfpga 0xc0700000 0x170000
bootcmd=run progfpga; sf read 0xc0700000 0x100000 0x300000; bootm 0xc0700000
bootargs=mem=96M console=ttyS1,115200n8 mtdparts=nand:128M(rootfs),-(userfs) root=/dev/mtdblock0 rw,noatime rootfstype=jffs2

(3) Linux boots (output via console serial port1) and shows the following for /dev/fb

root@mityomapl138:~# ls -l /dev/fb*
lrwxrwxrwx    1 root     root             3 Jan  1 00:00 /dev/fb -> fb0
crw-rw----    1 root     video      29,   0 Jan  1 00:00 /dev/fb0

(4) Added the fpga bus controller driver OK but the fpga i2c driver modules had problems:
Both fpga_ctrl.ko and fpga_i2c.ko were taken from the MDK_2014_01_13 directory /inmages/modules and downloaded to the MityDSP.

# insmod fpga_ctrl.ko
Disabling lock debugging due to kernel taint
fpga fpga_ctrl: loading the fpga_ctrl module.
# ls /sys/devices/fpga_ctrl
cmd         image       power       subsystem   version
device_dna  int_status  state       uevent
# insmod fpga_i2c.ko

No confirmation or errors reported, but then fails on:
# i2cset -y 2 0x38 0x8 0xb9
Error: Could not open file `/dev/i2c-2' or `/dev/i2c/2': No such file or directory
# i2cset -y 2 0x38 0x33 0x30
Error: Could not open file `/dev/i2c-2' or `/dev/i2c/2': No such file or directory

(5) Testing the Frame buffer

# fbset

mode "800x600-31" 
        # D: 21.429 MHz, H: 20.447 kHz, V: 30.519 Hz
        geometry 800 600 800 1200 16
        timings 46666 64 64 32 32 120 6
        accel false
        rgba 5/11,6/5,5/0,0/0
endmode

And there's no output on the monitor when running fbfill.
This is probably as expected from the I2C issues in step 4, but could it be also related to loading fpga_ctrl.ko?


Replies (8)

RE: DVI Framebuffer (fpga i2c) problem - Added by Michael Williamson almost 9 years ago

Hmmm.

Take a quick look at this wiki page if you haven't already.

The i2c commands you are running are for the Rev A & B boards, which are very old. Please try the "Rev C instructions". E.G.:

i2cset -y 1 0x38 0x8 0x3F
i2cset -y 1 0x38 0x33 0x30

Also run and post the results:

cat /proc/devices

-Mike

RE: DVI Framebuffer (fpga i2c) problem - Added by Mathew Jones almost 9 years ago

Mike
Thanks. I have been referring to the document you suggested and some others on the CriticalLink site.

We do have the Rev B Industrial IO card (80-000268RI-2 Rev B) but I tried your "i2cset -y 1" suggestion and I don't get the error so I guess that our board does use the I2C bus 1 rather than 2.

Unfortunately the following did not enable the DVI monitor output:

i2cset -y 1 0x38 0x8 0x3F
i2cset -y 1 0x38 0x33 0x30

Next I tried manually loading the fpga from linux and then doing the I2C commands:

# echo 1 > /sys/devices/fpga_ctrl/cmd
# echo 1 > /sys/devices/fpga_ctrl/cmd
# echo 2 > /sys/devices/fpga_ctrl/cmd
# cat fpga_ctrl.ko > /sys/devices/fpga_ctrl/image
# echo 3 > /sys/devices/fpga_ctrl/cmd
# i2cset -y 1 0x38 0x8 0x3F
# i2cset -y 1 0x38 0x33 0x30
# ./fbfill 800 600
opening /dev/fb0

Still no connection to the monitor.

One question though: Is the "DONE" LED supposed to light-up if an FPGA image has been successfully loaded on the MityDSP-L138F SOM, because for me it does not light?

# cat /proc/devices
Character devices:
  1 mem
  2 pty
  3 ttyp
  4 /dev/vc/0
  4 tty
  4 ttyS
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
  7 vcs
 10 misc
 13 input
 21 sg
 29 fb
 89 i2c
 90 mtd
116 alsa
128 ptm
136 pts
153 spi
180 usb
189 usb_device
253 fpga
254 rtc

Block devices:
  1 ramdisk
259 blkext
  8 sd
 11 sr
 31 mtdblock
 65 sd
 66 sd
 67 sd
 68 sd
 69 sd
 70 sd
 71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
179 mmc

RE: DVI Framebuffer (fpga i2c) problem - Added by Michael Williamson almost 9 years ago

The done light is important. Sounds like the FPGA image is not correct for the board you are using. Are you using an LX16 or LX45 variant?

You can also check the programmed status by looking at the /sys/devices/fpga_ctrl/status file (cat it out).

-Mike

RE: DVI Framebuffer (fpga i2c) problem - Added by Mathew Jones almost 9 years ago

Hi Mike, good suggestion.
We are using the LX45 FPGA (The Industrial IO board is identified as 80-000268RI-2 Rev B and on the MityDSP SOM the Xilinx Spartan 6 FPGA is XC6SLX45)

From the MityDSP_MDK_release_2014-01-13 archive I've tried two FPGA images:
MDK_2014-01-13/examples/industrial_io/fpga/build_dvi_rev_a_b/IndustrialIO.bin (renamed to IndustrialIO_dvi_revA-B.bin)
MDK_2014-01-13/examples/industrial_io/fpga/build_dvi_rev_c_lx45/IndustrialIO.bin (renamed to IndustrialIO_dvi_rev_c_lx45.bin)

This I did from Linux as follows:

# echo 1 > /sys/devices/fpga_ctrl/cmd
# echo 2 > /sys/devices/fpga_ctrl/cmd
# cat IndustrialIO_dvi_revA-B.bin  > /sys/devices/fpga_ctrl/image
# cat /sys/devices/fpga_ctrl/state
2 : PROGRAMMING

# echo 1 > /sys/devices/fpga_ctrl/cmd
# echo 2 > /sys/devices/fpga_ctrl/cmd
# cat IndustrialIO_dvi_rev_c_lx45.bin  > /sys/devices/fpga_ctrl/image
# cat /sys/devices/fpga_ctrl/state
2 : PROGRAMMING

Neither lit up the "Done" LED.

I did also try downloading other FPGA images including MDK_2014-01-13/examples/industrial_io/fpga/build_lcd_rev_a_b/IndustrialIO.bin but none of those resulted in the LED being lit.

Just to prove that the FPGA and MityDSP-L138F were OK I downloaded one of our in-house FPGA images from a previous project and this lit the "Done" LED.

Any more ideas?!

RE: DVI Framebuffer (fpga i2c) problem - Added by Mathew Jones almost 9 years ago

Hi
Still no joy in trying to get DVI output working via the FPGA.

The "Done" LED never lights for any of the FPGA binaries.
The fpga_ctrl.ko driver I'm using is from the MDK_2014-01-13 as are the FPGA binaries.

root@mityomapl138:~# rmmod fpga_ctrl
ERROR: Module fpga_ctrl does not exist in /proc/modules
root@mityomapl138:~# insmod fpga_ctrl.ko 
root@mityomapl138:~# echo 1 > /sys/devices/fpga_ctrl/cmd
root@mityomapl138:~# echo 2 > /sys/devices/fpga_ctrl/cmd
root@mityomapl138:~# cat IndustrialIO_dvi_rev_c_lx45.bin  > /sys/devices/fpga_ctrl/image
root@mityomapl138:~# cat /sys/devices/fpga_ctrl/state
2 : PROGRAMMING
root@mityomapl138:~# cat /sys/devices/fpga_ctrl/version 
NOT PROGRAMMED

Are there any other FPGA binaries I can try that are for the LX45 (on a Rev B Industrial IO board) or anything else I can try?

Any further ideas or help would be much appreciated.
Regards
Mat

RE: DVI Framebuffer (fpga i2c) problem - Added by Mathew Jones almost 9 years ago

Quick update:
I just downloaded the FPGA binary from the similar LCD forum post [[https://support.criticallink.com/redmine/boards/10/topics/4558]]
and this programmed OK ("Done" LED lit and the status returned was PROGRAMMED)

Looking at the file sizes I think all the MDK Industrial IO FPGA binaries are for the LX16 not the LX45.
They are 464196 bytes whereas any LX45 binaries are 1484404 bytes.

So I guess my question is: is there a LX45 version of IndustrialIO_dvi_revA-B.bin that I can download?

Thanks
Mat

RE: DVI Framebuffer (fpga i2c) problem - Added by Mathew Jones almost 9 years ago

From our investigation and suggestions from other wiki/forum pages it is apparent now that it is not possible to output to a DVI monitor from a MityDSP-L138 + Industrial IO development board, with the LX45 FPGA. We have since purchased the version with the LX16 and are able to output to a monitor via DVI when using the IndustrialIO dvi rev c FPGA image.

The downside is the resolution, where we've been unable to use the highest resolution of 800 x 600. It maybe that the driver is configuring a frequency too low for the monitor. 640 x 480 is just about usable but 800 x 600 would be much better!

RE: DVI Framebuffer (fpga i2c) problem - Added by Michael Williamson almost 9 years ago

Hi Mathew,

Very sorry about that. I didn't catch the LX45 version. The LX45 has some pins that are not bonded to the FPGA package causing the limitation on our devkit (originally designed for the LX16).

Are you using a widescreen or 4:3 aspect ratio monitor? We have had much better success using a 4:3 aspect monitor. There may be some timings in the panel configuration (front / back porch timings or clock rate) that may be needed for the wide screen monitors.

-Mike

    (1-8/8)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)