Re: [RFC 1/1] of-fpga-region: Add sysfs interface support for FPGA configuration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 01, 2024 at 04:25:42AM +0000, Manne, Nava kishore wrote:
> Hi Yilun,
> 
> > -----Original Message-----
> > From: Xu Yilun <yilun.xu@xxxxxxxxxxxxxxx>
> > Sent: Monday, July 29, 2024 9:27 PM
> > To: Manne, Nava kishore <nava.kishore.manne@xxxxxxx>
> > Cc: git (AMD-Xilinx) <git@xxxxxxx>; mdf@xxxxxxxxxx; hao.wu@xxxxxxxxx;
> > yilun.xu@xxxxxxxxx; trix@xxxxxxxxxx; robh@xxxxxxxxxx;
> > saravanak@xxxxxxxxxx; linux-fpga@xxxxxxxxxxxxxxx; linux-
> > kernel@xxxxxxxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx
> > Subject: Re: [RFC 1/1] of-fpga-region: Add sysfs interface support for FPGA
> > configuration
> > 
> > On Fri, Jul 26, 2024 at 12:08:19PM +0530, Nava kishore Manne wrote:
> > > Adds sysfs interface as part of the of-fpga-region. This newly added
> > > sysfs interface uses Device Tree Overlay (DTO) files to
> > > configure/reprogram an FPGA while an operating system is running.This
> > > solution will not change the existing sequence When a DT overlay that
> > > targets an FPGA Region is applied.
> > > 	- Disable appropriate FPGA bridges.
> > > 	- Program the FPGA using the FPGA manager.
> > > 	- Enable the FPGA bridges.
> > > 	- The Device Tree overlay is accepted into the live tree.
> > > 	- Child devices are populated.
> > >
> > > When the overlay is removed, the child nodes will be removed, and the
> > > FPGA Region will disable the bridges.
> > >
> > > Usage:
> > > To configure/reprogram an FPGA region:
> > > echo "fpga.dtbo" > /sys/class/fpga_region/<region>/device/load
> > 
> > IIRC, last time we are considering some generic interface for both OF & non-
> > OF FPGA region, but this is still OF specific.
> > 
> At AMD, we exclusively use OF for FPGA configuration/reconfiguration, utilizing overlay files as outlined in the fpga-region.txt documentation.
> However, some devices, like dfl.c those relying solely on the FPGA region, do not use OF. 
> For these non-OF devices, should we expect them to follow the fpga-region.txt guidelines for FPGA configuration/reconfiguration?

I assume it is Documentation/devicetree/bindings/fpga/fpga-region.yaml.

No, Non-OF devices don't have to follow the DT binding.

> If so, it may be advantageous to develop a common interface for both OF and non-OF.
> If not, it might be more appropriate to establish distinct interfaces to cater to their specific requirements.

I think each vendor may have specific way for device enumeration, but
that doesn't mean we need distinct user interfaces. For all FPGA
devices, we should avoid the situation that the HW is changed but
system SW knows nothing. So the common needs are:

 - Find out and remove all devices within the fpga region before
   reprograming.
 - Re-enumerate devices in fpga region after reprograming.

I expect the fpga region class could generally enforce a flow for
the reprograming interface. And of-fpga-region could specifically
implement it using DT overlay.

Thanks,
Yilun




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux