Project

General

Profile

Changes on MityDSP-L138 L138-DM-336-RI-J

Added by Kim Nielsen about 1 year ago

Hi,

I have received a new MityDSP-L138 SoM board:
  • Model no: L138-DM-336-RI-J
  • Serial no: 22023557
  • Part no: 80-001541RI-2A

The new SoM includes an Artix 7 FPGA and I am curious to know if there are any software changes (U-Boot, Linux etc.) in this regard?

I am asking, since we are experiencing some issues when loading a binary into the FPGA.
We didn't experience any issues with the old SPARTAN-6 FPGA and have not changed the way we load the FPGA.

Regards,
Kim


Replies (5)

RE: Changes on MityDSP-L138 L138-DM-336-RI-J - Added by Michael Williamson about 1 year ago

Have you reviewed the migration information (including the PCN) from this page?

https://support.criticallink.com/redmine/projects/arm9-platforms/wiki/Migrating_to_the_MityDSP-L138F-A7

uBoot was updated in 2022 primarily to support new factory configuration codes to indicate an Artix7 variant is present. That firmware should be installed in EEPROM on the module received unless you have overwritten it. Linux should not require modification. However, for loading the FPGA in uBoot you will need to pass the (optional) FPGA bitstream size argument to the loadfpga command as the default size is not large enough (the A7 bitstream is larger).

See this page for information for the Artix 7 sizes and commands to load the bitstream.

https://support.criticallink.com/redmine/projects/arm9-platforms/wiki/Programming_the_FPGA

Also, are you using the options for bitstream generation as the example project?

If these points do not help, please provide a dump of your load command and the error message, etc.

With regards,
Mike

RE: Changes on MityDSP-L138 L138-DM-336-RI-J - Added by Kim Nielsen about 1 year ago

Hi Mike,

Thank you very much for the fast response.

We are loading the FPGA from Linux, but not with the "fpga_ctrl.ko" kernel module mentioned in the "Programming the FPGA" wiki.
Unfortunately, that kernel module is not part of our 3.2.0 Linux.

We are loading the FPGA from a Linux application, which involves gpio configuration --> We use the "EMA_A_RW" pin to allow writing with EMIFA.
Just for curiosity, I have attached the cpp code.

Does "fpga_ctrl.ko" use the EMIFA to load the FPGA?

Regards,
Kim

RE: Changes on MityDSP-L138 L138-DM-336-RI-J - Added by Kim Nielsen about 1 year ago

Hi Mike,

I tried to build the fpga_ctrl.ko module, but nothing seems to happen when I try to program the FPGA.

Loading the FPGA with fpga_ctrl.ko
These are the commands I use:
$ insmod fpga_ctrl.ko
$ echo "1" > /sys/devices/fpga_ctrl/cmd
$ cat /sys/devices/fpga_ctrl/state --> 1 : RESET
$ echo "2" > /sys/devices/fpga_ctrl/cmd --> 2 : PROGRAMMING
$ cat fpga_som.bin > /sys/devices/fpga_ctrl/image
$ echo "3" > /sys/devices/fpga_ctrl/cmd --> 3 : PROGRAM_FAIL

I also noticed only one message from the fpga_ctrl module in dmesg right after "insmod fpga_ctrl.ko":
fpga fpga_ctrl: loading the fpga_ctrl module.

Debugging fpga_ctrl.ko
The fpga_ctrl.ko I build is from the "Jan-2014" MDK release ( Release site I used )

This is how I build the FPGA kernel modules:

make -C ~/work/toolchains/linux-powercon-1.0.3/src/linux/ M=`pwd` ARCH=arm CROSS_COMPILE=arm-926ejs-linux-gnueabi- modules

I get this output from building:
CC [M] /home/anton/work/toolchains/fpga/fpga_ctrl.o
CC [M] /home/anton/work/toolchains/fpga/ads7843.o
CC [M] /home/anton/work/toolchains/fpga/fpga_i2c.o
CC [M] /home/anton/work/toolchains/fpga/fpga_gpio.o
CC [M] /home/anton/work/toolchains/fpga/fpga_spi.o
CC [M] /home/anton/work/toolchains/fpga/fpga_uart.o
CC [M] /home/anton/work/toolchains/fpga/fpga_lcdctlr.o
CC [M] /home/anton/work/toolchains/fpga/fpga_dcmctlr.o
CC [M] /home/anton/work/toolchains/fpga/fpga_hdlc.o
CC [M] /home/anton/work/toolchains/fpga/fpga_pwm.o
Building modules, stage 2.
MODPOST 10 modules
WARNING: "set_irq_flags" [/home/anton/work/toolchains/fpga/fpga_gpio.ko] undefined!
WARNING: "irq_set_chip_and_handler_name" [/home/anton/work/toolchains/fpga/fpga_gpio.ko] undefined!
WARNING: "irq_desc" [/home/anton/work/toolchains/fpga/fpga_gpio.ko] undefined!
CC /home/anton/work/toolchains/fpga/ads7843.mod.o
LD [M] /home/anton/work/toolchains/fpga/ads7843.ko
CC /home/anton/work/toolchains/fpga/fpga_ctrl.mod.o
LD [M] /home/anton/work/toolchains/fpga/fpga_ctrl.ko
CC /home/anton/work/toolchains/fpga/fpga_dcmctlr.mod.o
LD [M] /home/anton/work/toolchains/fpga/fpga_dcmctlr.ko
CC /home/anton/work/toolchains/fpga/fpga_gpio.mod.o
LD [M] /home/anton/work/toolchains/fpga/fpga_gpio.ko
CC /home/anton/work/toolchains/fpga/fpga_hdlc.mod.o
LD [M] /home/anton/work/toolchains/fpga/fpga_hdlc.ko
CC /home/anton/work/toolchains/fpga/fpga_i2c.mod.o
LD [M] /home/anton/work/toolchains/fpga/fpga_i2c.ko
CC /home/anton/work/toolchains/fpga/fpga_lcdctlr.mod.o
LD [M] /home/anton/work/toolchains/fpga/fpga_lcdctlr.ko
CC /home/anton/work/toolchains/fpga/fpga_pwm.mod.o
LD [M] /home/anton/work/toolchains/fpga/fpga_pwm.ko
CC /home/anton/work/toolchains/fpga/fpga_spi.mod.o
LD [M] /home/anton/work/toolchains/fpga/fpga_spi.ko
CC /home/anton/work/toolchains/fpga/fpga_uart.mod.o
LD [M] /home/anton/work/toolchains/fpga/fpga_uart.ko
make: Leaving directory '/home/anton/work/toolchains/nor-flash-oe-lite/tmp/work/machine/arm-926ejs-linux-gnueabi/linux-powercon-1.0.3/src/linux'

Should I worry about the warnings for "fpga_gpio.ko" ?
If I only want to load the FPGA, do I need to use other modules apart from "fpga_ctrl.ko" ?

Regards,
Kim

RE: Changes on MityDSP-L138 L138-DM-336-RI-J - Added by Kim Nielsen about 1 year ago

Hi again,

We managed to fix our loading problem.
The bug was due to our FPGA binary, not the loader itself.

Regards,
Kim

RE: Changes on MityDSP-L138 L138-DM-336-RI-J - Added by Michael Williamson about 1 year ago

Hi Kim,

I am relieved you got your system loaded.

Have a nice weekend.

With regards,
Mike

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