Read/Write into FPGA connected via IFC

cancel
Showing results for 
Search instead for 
Did you mean: 

Read/Write into FPGA connected via IFC

513 Views
bladerunner1010
Contributor IV

I'm using LS1043 and I know there is no Linux driver for working with IFC in GPCM mode.

How do I access the FPGA from Linux user space?

Which address space should I use with memcpy?

Tags (2)
0 Kudos
7 Replies

501 Views
bladerunner1010
Contributor IV

Hi Pavel

Thanks for your reply.

I own the LS1043ARDB board.

How do I read/write into memory of FPGA or CPLD on the LS1043ARDB, from Linux application?

0 Kudos

494 Views
Pavel
NXP TechSupport
NXP TechSupport

See the follwoing NXP community about CPLD reading/writing under Linux:

https://community.nxp.com/t5/T-Series/Unable-to-read-write-to-CPLD-in-kernel-space-T1040RDB/m-p/5653...

0 Kudos

489 Views
bladerunner1010
Contributor IV

Thanks I've asked the question in the thread you mentioned.

I still wonder why isn't there an out-of-the-box driver for IFC bus?

I only found the fsl_ifc.c driver code but I don't understand how is it useful for accessing CPLD or SRAM for that matter on the LS1043ARDB reference board...

Do you have an example of using the CPLD on the LS1043ARDB?

If I understand correctly I need to 

1. Use ioremap with the CPLD address from DTSI file.

2. Then use writeb or writew

I would appreciate if you can send both kernel driver and user space examples.

Thanks

0 Kudos

478 Views
Pavel
NXP TechSupport
NXP TechSupport

Below is example for CPLD reading on the LS1043ARDB board under Linux:

root@TinyLinux:~# devmem

BusyBox v1.31.0 (2020-09-17 08:00:32 UTC) multi-call binary.

 

Usage: devmem ADDRESS [WIDTH [VALUE]]

root@TinyLinux:~# devmem 0x7fb00000 8

0x01

root@TinyLinux:~# devmem 0x7fb00001 8

0x04

root@TinyLinux:~# devmem 0x7fb00002 8

0x02

root@TinyLinux:~# devmem 0x7fb00003 8

0x00

root@TinyLinux:~# devmem 0x7fb0000f 8

0x01

root@TinyLinux:~#

0 Kudos

408 Views
bladerunner1010
Contributor IV

How do I read say version number from CPLD on LS1043ARDB reference board?

How do I use the fcl_ifc driver to get virtual addresses?

 

 

0 Kudos

379 Views
Pavel
NXP TechSupport
NXP TechSupport

Base address of CPLD on the LS1043ARDB board is 7fb00000.

See the Section 6,1 in the LS1043ARDB Reference Manual:

https://www.nxp.com/webapp/Download?colCode=LS1043ARDBRM

0 Kudos

503 Views
Pavel
NXP TechSupport
NXP TechSupport

NXP offers the LS1043ARDB board:

https://www.nxp.com/design/qoriq-developer-resources/layerscape-ls1043a-reference-design-board:LS104...

 

There is the LS1043ARDB Reference Manual:

https://www.nxp.com/webapp/Download?colCode=LS1043ARDBRM

 

There is the LS1043ARDB schematic:

https://www.nxp.com/downloads/en/printed-circuit-boards/LS1043ARDB_PD-39019-DF.zip

 

Use this board as example for FPGA connection to the LS1043a.

0 Kudos