<div dir="ltr">Hello.<div><br></div><div>I'm looking for suggestion of correct way of FPGA programming in my system.</div><div><br></div><div>This is an am335x based board, yocto based with kernel 4.19. It has FPGA connected through "altera passive serial".</div><div>There exists a specific kernel module especially made for such scenario, and I was able to include its configuration in device-tree.</div><div><br></div><div>From what I was able to find, there are three ways of programming FPGA using FPGA subsystem.</div><div>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. </div><div> <br></div><div>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.</div><div><br></div><div>3. Using kernel API. I haven't tried yet, as I rather like to use methods that will required less possible maintenance in future.</div><div><br></div><div>Can some suggest:</div><div>- which of these three methods is most proper ?</div><div>- how to go forward with way 1 or 2 ?</div><div><br></div><div>Best Regards</div><div>Greg.</div><div><br></div></div>