I'm in the process of writing a Linux device-driver for some custom hardware controlled via a PCIe card. The PCIe card contains an FPGA implementing SPI and I2C bus masters along with other custom firmware. There are already platform-bus device-drivers in the kernel for a lot of the hardware and I'd like to avoid duplicating that work.
Is there any way of creating a Device-Tree to describe the hardware on the card?
My thinking was that as the card is discovered and probed, it would map the BARS, register the device-tree and have the existing drivers pick-up the mapped address regions and provide interfaces to the hardware.