TX1, enabling HOTPLUG kernel option/module

I’m trying to rebuild a kernel for my TX1 with the HOTPLUG_PCI_PCIE option enabled. When I run menuconfig and search for the option, here’s what I see:

│ Symbol: HOTPLUG_PCI_PCIE[=n]
│ Type : tristate
│ Prompt: PCI Express Hotplug driver
│ Location:
│ → Bus support
│ (1) → PCI Express support (PCIEPORTBUS [=y])
│ Defined at drivers/pci/pcie/Kconfig:16
│ Depends on: HOTPLUG_PCI && PCIEPORTBUS [=y]

I’ve tried going to the location specified by (1), but the option it takes me to is called “PCI Express support” and already has a star next to it. Even among the other nearby PCI/PCIe options, there’s no mention of “hotplug” (or pciehp, the corresponding module) and several of them already appear to be enabled. Enabling all PCI/PCIe options on the page and running another search for the HOTPLUG option still returns the result shown above with the [=n]. Any ideas how (or even if) this module can be turned on for the TX1?

You may find the symbol search (F8 SymSearch) in “make nconfig” (very similar to menuconfig) helps. In addition, you’ll want to use the nconfig “F4 ShowAll”, as some symbols are controlled exclusively by their parent symbol and are not manually selectable (this doesn’t mean they are not there, it just means their only means of selection is via other symbols).

TX1 supports hotplug only through GPIO i.e. presence detect. On Jetson-TX1, GPIO routing is not present, hence, effectively there is no hotplug support.
Is your intention behind enabling HOTPLUG_PCI_PCIE config is to enable PCIe hot plug support? If so, sorry, but that is not supported.

Hi vidyas, thanks for the response.

Is this a limitation of the carrier board, or of the TX1 SoC itself? I’m interested in the ability to hotplug an FPGA to a TX1 mounted on a smaller carrier board like Connect Tech’s Orbitty or Astro board.

Orbitty: http://www.connecttech.com/sub/products/ASG003.asp
Astro: http://www.connecttech.com/sub/Products/ASG001.asp

Thanks,
Tim

Not having GPIO routing is a limitation on carrier board.
If the PRSNT pin on one of these two carrier boards (that were mentioned in above comment) is routed all the way to TX1, then it should be possible.
Alternatively, you can make a dynamically loadable module of PCIe host controller driver and load it only after you connect FPGA to the board.

So actually, I’m not even sure a hotplug is what I really need…

I’m using my TX1 to control an FPGA, and the two devices will never actually be physically disconnected from one another. Because there won’t be any plugging and unplugging, I think this means GPIO and presence detect are probably not critical for me. When the system is powered up, the FPGA comes up in an unconfigured/unprogrammed state and the TX1 later flashes it with the appropriate image. The problem is, the TX1 performs its initial scan of the bus during boot, at which point the FPGA is not configured and goes unrecognized. What I’d like to be able to do is to somehow reinitialize or rescan the PCIe bus after the FPGA has been configured. I’d read that enabling the hotplug capability might help with this, which is where my original question came from.

The post below describes exactly what I’m looking to do. Any ideas?

http://stackoverflow.com/questions/32334870/how-to-do-a-true-rescan-of-pcie-bus

As I was saying in my previous comment, you can make pci-tegra.ko module for PCIe host controller driver and load it only after you make sure your FPGA based end point is ready to communicate with the host. This way, whole PCIe enumeration is delayed till FPGA based end point’s programming is done and is ready for communication through its PCIe interface.