Thank you for the suggestion. But there is no PCIe device recognized in the system when I want to rescan.
Our device topology is like that:
We have a Verdin iMX8M-Plus SoM connected to Intel Arria 10 GX FPGA through PCIe Gen3 1 lane.
When we boot the devices, both SoM and FPGA are powered up. But FPGA needs to be configured before its usage since its memory is volatile after cold boot.
After linux boots, our linux app is responsible to configure the FPGA through an SPI bus between SoM and FPGA.
Once our app configures the FPGA, then the FPGA stars working, we confirm that by observing some FPGA IOs start toggling.
At this point, PCIe should appear in lspci list as well but it is not. Somehow we should tell the Linux, recheck the PCIe bus.
#5 didn’t work as expected but at this point if we just reset the SoM (reboot cmd) without reseting the FPGA, our FPGA end point appears in lspci command properly.
At the boot time, Verdin SoM initiates PERST pin of PCIe and enumerates our FPGA if FPGA is already configured, but this is not the case in our scenario.
Therefore we need a command that whatever the SoM is doing at the boot time, to force to do same thing after linux fully booted.