JETSON TX2 PCIe

Hi,
I have a requirement of PCI connection between TX2 and TI-TDA2x boards.
I configured TDA2x and end point device.
Tried the following change in TX2.

CONFIG_PCIE_DW=y
CONFIG_PCI_TEGRA=y
CONFIG_PCI_HOST_GENERIC=y
CONFIG_PCIE_IPROC=y
CONFIG_PCI_HISI=y
CONFIG_PCIEPORTBUS=y
CONFIG_PCIEAER=y

here is the log
nvidia@tegra-ubuntu:~$ dmesg | grep pci
[ 0.134069] node /plugin-manager/fragment-500-pcie-config match with board >=3310-1000-500
[ 0.227448] iommu: Adding device 10003000.pcie-controller to group 50
[ 0.389052] tegra-pcie 10003000.pcie-controller: 1x1, 1x1, 1x1 configuration
[ 0.389835] tegra-pcie 10003000.pcie-controller: PCIE: Enable power rails
[ 0.390827] tegra-pcie 10003000.pcie-controller: probing port 0, using 1 lanes
[ 0.392972] tegra-pcie 10003000.pcie-controller: probing port 1, using 1 lanes
[ 0.395703] tegra-pcie 10003000.pcie-controller: probing port 2, using 1 lanes
[ 0.821041] tegra-pcie 10003000.pcie-controller: link 0 down, retrying
[ 1.225136] tegra-pcie 10003000.pcie-controller: link 0 down, retrying
[ 1.629321] tegra-pcie 10003000.pcie-controller: link 0 down, retrying
[ 1.631339] tegra-pcie 10003000.pcie-controller: link 0 down, ignoring
[ 2.033406] tegra- 57.590665] extcon-gpio-states external-connection:extcon@1: Cable state 2
01;31mpcie 10003000.pcie-controller: link 1 down, retrying
[ 2.437593] tegra-pcie 10003000.pcie-controller: link 1 down, retrying
[ 2.840408] tegra-pcie 10003000.pcie-controller: link 1 down, retrying
[ 2.842433] tegra-pcie 10003000.pcie-controller: link 1 down, ignoring
[ 3.244365] tegra-pcie 10003000.pcie-controller: link 2 down, retrying
[ 3.648556] tegra-pcie 10003000.pcie-controller: link 2 down, retrying
[ 4.052342] tegra-pcie 10003000.pcie-controller: link 2 down, retrying
[ 4.054359] tegra-pcie 10003000.pcie-controller: link 2 down, ignoring
[ 4.054366] tegra-pcie 10003000.pcie-controller: PCIE: no end points detected
[ 4.054687] tegra-pcie 10003000.pcie-controller: PCIE: Disable power rails
[ 6.549421] pci_tegra: exports duplicate symbol tegra_pcie_pm_control (owned by kernel)

TDA2x configured as Endpoint device and it is in port1 1X1 configured.

Kindly reply with further configs we need to configure JETSON TX2 in host mode

I know nothing about the particular device, but does it show up with “lspci”? If it does show up with lspci, then it will have a slot listed, e.g., with a format similar to “01:00.0” (there may be multiple functions of the single slot). In that case, you can do a verbose PCI listing specific to that slot. Example:

sudo lspci -vvv -s 01:00.0

What does your verbose lspci show?

FYI, the TX2 should normally be in host mode, there is nothing to change for that. I don’t think the TX2 can be in end point mode, although Xavier can.

The device is not shown in lspci.

nvidia@tegra-ubuntu:~$ lspci
00:01.0 PCI bridge: NVIDIA Corporation Device 10e5 (rev a1)

nvidia@tegra-ubuntu:~$ dmesg | grep pci
[ 0.142756] node /plugin-manager/fragment-500-pcie-config match with board >=3310-1000-500
[ 0.143488] node /plugin-manager/fragment-500-e3325-pcie match with board >=3310-1000-500
[ 0.261282] iommu: Adding device 10003000.pcie-controller to group 50
[ 6.777906] tegra-pcie 10003000.pcie-controller: 4x1, 1x1 configuration
[ 6.789654] tegra-pcie 10003000.pcie-controller: PCIE: Enable power rails
[ 6.798956] tegra-pcie 10003000.pcie-controller: probing port 0, using 4 lanes
[ 6.815542] tegra-pcie 10003000.pcie-controller: probing port 2, using 1 lanes
[ 7.294684] tegra-pcie 10003000.pcie-controller: link 2 down, retrying
[ 7.710613] tegra-pcie 10003000.pcie-controller: link 2 down, retrying
[ 8.114622] tegra-pcie 10003000.pcie-controller: link 2 down, retrying
[ 8.123766] tegra-pcie 10003000.pcie-controller: link 2 down, ignoring
[ 8.131398] tegra-pcie 10003000.pcie-controller: PCI host bridge to bus 0000:00
[ 8.131404] pci_bus 0000:00: root bus resource [mem 0x50100000-0x57ffffff]
[ 8.131407] pci_bus 0000:00: root bus resource [mem 0x58000000-0x7fffffff pref]
[ 8.131411] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 8.131414] pci_bus 0000:00: root bus resource [io 0x1000-0xffff]
[ 8.131441] pci 0000:00:01.0: [10de:10e5] type 01 class 0x060400
[ 8.131538] pci 0000:00:01.0: PME# supported from D0 D1 D2 D3hot D3cold
[ 8.131757] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 8.131867] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[ 8.131880] tegra-pcie 10003000.pcie-controller: PCIE: Response decoding error, signature: 10010001
[ 8.131897] pci 0000:00:01.0: PCI bridge to [bus 01]
[ 8.132067] pcieport 0000:00:01.0: Signaling PME through PCIe PME interrupt
[ 8.132073] pcie_pme 0000:00:01.0:pcie01: service driver pcie_pme loaded
[ 8.132154] aer 0000:00:01.0:pcie02: service driver aer loaded
nvidia@tegra-ubuntu:~$

Since lspci shows only the bridge it implies there wasn’t enough of a response from your end point device to even list it. The only clue I see is:

[ 8.131880] tegra-pcie 10003000.pcie-controller: PCIE: Response decoding error, signature: 10010001

PCIe is already enabled by default and no change to PCI should be required unless this is a custom carrier board. In the case of a custom carrier board, then device tree changes would likely be required. The answers will change greatly depending on the case of the error being with the dev carrier board and a PCIe card used in the slot, versus the case of a custom carrier board. I’m guessing the latter is what you have. I have not worked on a custom carrier, so if that is the case, then someone knowing more about a custom board will have to answer. If you are using an ordinary PCIe card with a known carrier board, then it might be some other configuration or signal detail.