linux icon indicating copy to clipboard operation
linux copied to clipboard

Raspberry Pi boots up too fast to enumerate all PCIe devices

Open geerlingguy opened this issue 1 month ago • 2 comments

Describe the bug

Often when testing complex multi-device PCIe scenarios behind a switch, one or more devices won't fully enumerate, and debugging why is a little perplexing.

For example, running four RTX 5000 GPUs behind a PCIe switch often results in one or all of them not showing up: https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/791

I've also noticed this sometimes with just two or even sometimes one PCIe device, since I test a lot of exotic cards, which may need a little time to get going. At least that's my theory.

This is definitely an edge case, but it would be nice to have a means to debug it and at least confirm the theory.

There used to be a boot_delay option in config.txt which might've helped with this, but that is not present anymore.

Steps to reproduce the behaviour

  1. Plug in multiple modern graphics cards behind a PCIe switch connected to the Pi's external PCIe lane.
  2. Boot Raspberry Pi OS.
  3. Run lspci, and sometimes only one or zero devices are listed.

Device (s)

Raspberry Pi CM5

System

https://pastebin.com/tk7fyjSg

jgeerling@cm5:~ $ cat /etc/rpi-issue
Raspberry Pi reference 2025-11-24
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 6e49e5317491c159c114681ddb4ac0623d855611, stage4

jgeerling@cm5:~ $ uname -a
Linux cm5 6.12.47+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.47-1+rpt1 (2025-09-16) aarch64 GNU/Linux

(But I've also been testing on 6.17 and 6.18 with various kernels...)

Logs

No response

Additional context

No response

geerlingguy avatar Dec 10 '25 23:12 geerlingguy

Pericom PCIe switches have a somewhat onerous requirement to supply the refclk far in advance of releasing reset - does this Microchip PM04100 (or by inference the downstream device(s)) have something similar?

Does dtparam=pcie_tperst_clk_ms=250 in /boot/firmware/config.txt change anything?

$ dtparam -h pcie_tperst_clk_ms
pcie_tperst_clk_ms      Add N milliseconds between PCIe reference clock
                        activation and PERST# deassertion
                        (CM4 and 2712, default "0")

P33M avatar Dec 11 '25 16:12 P33M

Pericom PCIe switches have a somewhat onerous requirement to supply the refclk far in advance of releasing reset - does this Microchip PM04100 (or by inference the downstream device(s)) have something similar?

Does dtparam=pcie_tperst_clk_ms=250 in /boot/firmware/config.txt change anything?

$ dtparam -h pcie_tperst_clk_ms
pcie_tperst_clk_ms      Add N milliseconds between PCIe reference clock
                        activation and PERST# deassertion
                        (CM4 and 2712, default "0")

Thank you very much for this. This param appears to solve my enumeration issues. Curious to know if @geerlingguy has success with this parameter as well.

mpsparrow avatar Dec 11 '25 19:12 mpsparrow