Interface the AM5729 with FPGA through GPMC

I need help to understand how can we interface the AM5729 processor to a FPGA though GPMC.
We are using “AM5729 Debian 10.3” as OS environment which we have downloaded from - latest-images.

Hi All, Can you please guide me on AM5729 interface to a FPGA though GPMC.
Do we have any gpmc driver for AM5729?

You are asking an almost impossible question to answer without any details.

The GPMC can be used to access external memory.

Your FPGA interface needs to behave like static RAM.
It would then just be a matter of setting the correct memory timings (depends on FPGA) and using the correct CS on the AM5729 side of things.

The FPGA would then be mapped into memory.

What you do after that is just a matter of writing/reading from memory.

Obviously you need to program the FPGA to behave correctly. Look at the datasheet for the AM5729 for the memory timings and signal description.

Hi Benedict,

Thank you for insides.

I have few more Doubt,

  1. For writing/reading to/from FPGA Do we need to write any gpmc kernel driver.
  2. Any device tree changes need to be done?
  3. Does omap_gpmc.c supports AM5729?

Thank you.

I would imagine you would need to modify the device tree to set timings for the address region and to possibly set the address region for any given chip select and possibly the bus width.

I don’t own an AI so have never looked at the datasheet. It could be that each chip select associated with the GPMC has a fixed address range.

You would also need to tell the linux kernel that the given memory space is not to be used as system memory. No real idea how to do that but you can probably Google it.

From userspace you would need to mmap the real address into its virtual address space. Then it would just be a matter of reading/writing to the mapped address.

Have a look at the device tree files for the board and see what is currently defined for the GPMC. I am sure there will be something defined in there already.