Kernel Newbies Archive on lore.kernel.org
 help / color / Atom feed
* Using FPGA subsystem to upload bit-stream using altera-ps-spi.
@ 2020-09-24 15:28 Grzegorz Heldt
  0 siblings, 0 replies; only message in thread
From: Grzegorz Heldt @ 2020-09-24 15:28 UTC (permalink / raw)
  To: kernelnewbies

[-- Attachment #1.1: Type: text/plain, Size: 1745 bytes --]

Hello.

I'm looking for suggestion of correct way of FPGA programming in my system.

This is an am335x based board, yocto based with kernel 4.19. It has FPGA
connected through "altera passive serial".
There exists a specific kernel module especially made for such scenario,
and I was able to include its configuration in device-tree.

From what I was able to find, there are three ways of programming FPGA
using FPGA subsystem.
1. I should be able to see /sys/class/fpga_manager/fpga0/firmware
or /sys/class/fpga_manager/fpga0/fpga files, which I can use to upload
bitstream to fpga. The problem is that I can't see those files. Both
altera-ps-spi and fpga-manager drivers do not report any errors, but the
result is that I can see some files /sys/class/fpga_manager/fpga0, but no
"firmware" or "fpga" files exist. "cat state" result is "unknown". At this
point I have no idea how to go further.

2. I can use DT overlays that can disable device drivers already provided
by FPGA, do programming, and rediscover drivers provided by FPGA. At the
moment I don't see the need for such features in this system, but the
approach looks sexy. In my system I can see configfs mounted at
/sys/kernel/config. However, based on information that I was able to find,
I should see or create  /sys/kernel/config/device-tree/ directory. I can't
see it and I can't create. Runtime DT overlays look extremely sexy to me, I
have played with them on RPI. Very sad I don't know how to enable them on
my system.

3. Using kernel API. I haven't tried yet, as I rather like to use methods
that will required less possible maintenance in future.

Can some suggest:
- which of these three methods is most proper ?
- how to go forward with way 1 or 2 ?

Best Regards
Greg.

[-- Attachment #1.2: Type: text/html, Size: 2091 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-24 15:28 Using FPGA subsystem to upload bit-stream using altera-ps-spi Grzegorz Heldt

Kernel Newbies Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org
	public-inbox-index kernelnewbies

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git