Using FPGA subsystem to upload bit-stream using altera-ps-spi.
Grzegorz Heldt
grzegorz.heldt at gmail.com
Thu Sep 24 11:28:38 EDT 2020
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20200924/9207a19f/attachment.html>
More information about the Kernelnewbies
mailing list