Is it possible to force PCIe to re-enumerate?


We are using Dahlia board v1.1A with a Verdin iMX8M-Plus v1.0C. We are on the latest Toradex Multimedia Reference Image.

When we power on the board, PERST pin on the PCIe bus released after some time and the SoM enumerates our custom design FPGA on the bus successfully.

While linux running, is there a command to raise PERST pin and ask linux to re-enumerate the bus? I tried following command but simply no effect.

echo 1 > /sys/bus/pci/rescan

Any advice?

Thank you.

Hi @Fide ,

Did you try to remove the device first by entering the command echo 1 > $pcidevice/remove ?

If not, can you give this a try followed by the rescan command and see if this has any effect?

Best Regards

Hi @kevin.tx,

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:

  1. We have a Verdin iMX8M-Plus SoM connected to Intel Arria 10 GX FPGA through PCIe Gen3 1 lane.
  2. 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.
  3. After linux boots, our linux app is responsible to configure the FPGA through an SPI bus between SoM and FPGA.
  4. Once our app configures the FPGA, then the FPGA stars working, we confirm that by observing some FPGA IOs start toggling.
  5. 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.
  6. #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.

Thank you.

Hello Fide,

have you tryed this?
echo 1 >/sys/bus/pci/rescan



Hi @matthias.tx,

Yes I have. If PCIe link is not trained at the boot time, the SoM stops producing PCIE_CLK and later echo 1 >/sys/bus/pci/rescan simply does nothing.

Hello Fide,

on the PCIe re enumeration is there still something we have to do on our side to help you ?

Best Regards,

Matthias Gohlke

Hi Matthias,

We couldn’t solve the problem in Linux.
We had to configure the FPGA in u-boot before Linux kernel boots for now.

Thank you.