Part Number:TDA2PXEVM
Tool/software: Linux
Dear Ti,
we are trying to connect TDA2P EVA board to PC (with Linux running) over PCIe.
We managed to connect TDA2P EVA board and TDA2XX EVA board over PCIe following your Wiki page. In this case the TDA2P EVA served as PCIe RC and the TDA2XX EVA as PCIe EP.
Both boards are running Linux with kernel 4.4.84 .In this scenario, we where able to run the pcitest.sh PCIe test script and everything worked as expected.
Now, we are trying to connect TDA2P EVA board with PC over PCIe. We are using the same PCIe cable that we used when connecting two EVA boards as described above.
The TDA2P EVA board is running Linux with kernel 4.4.84.
The PC is running Ubuntu 16.04.4 LTS with custom kernel (we recompiled the 4.16.7 Linux kernel to enable the PCI Endpoint Test Driver).
The problem we are facing now is that the lspci command sometimes shows the TDA2P EVA board and sometimes does not.
When the lspci is able to see TDA2P EVA board we get the following output:
00:00.0 Host bridge: Intel Corporation Device 591f (rev 05)
00:02.0 VGA compatible controller: Intel Corporation Device 5912 (rev 04)
00:14.0 USB controller: Intel Corporation Device a2af
00:16.0 Communication controller: Intel Corporation Device a2ba
00:17.0 SATA controller: Intel Corporation Device a282
00:1c.0 PCI bridge: Intel Corporation Device a294 (rev f0)
00:1c.5 PCI bridge: Intel Corporation Device a295 (rev f0)
00:1d.0 PCI bridge: Intel Corporation Device a298 (rev f0)
00:1f.0 ISA bridge: Intel Corporation Device a2c8
00:1f.2 Memory controller: Intel Corporation Device a2a1
00:1f.3 Audio device: Intel Corporation Device a2f0
00:1f.4 SMBus: Intel Corporation Device a2a3
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) I219-V
01:00.0 Unassigned class [ff00]: Texas Instruments Device b500 (rev ff)
02:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 04)
When we remove the TDA2P from PCIe bus (through /sys/bus/pci/devices/<TDA2P_PCIE_ID>/remove) and rescan the PCIe bus (trough /sys/bus/pci/rescan) we are not able to see TDA2P with lspci command.
The same behavior is observed when we reboot the PC.
Sometimes the PC recognizes the TDA2P sometimes not - the behavior is random.
In the rare case when the PC recognizes the TDA2P EVA board we have the following dmesg output on PC side:
[ 9612.437772] pci 0000:01:00.0: [104c:b500] type 00 class 0xff0000
[ 9612.437833] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000000ff]
[ 9612.437856] pci 0000:01:00.0: reg 0x14: [mem 0x00000000-0x000001ff]
[ 9612.437882] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x000003ff]
[ 9612.437898] pci 0000:01:00.0: reg 0x1c: [mem 0x00000000-0x00003fff]
[ 9612.438129] pci 0000:01:00.0: supports D1
[ 9612.438135] pci 0000:01:00.0: PME# supported from D0 D1 D3hot
[ 9612.508627] pci 0000:01:00.0: BAR 3: assigned [mem 0xc8000000-0xc8003fff]
[ 9612.508637] pci 0000:01:00.0: BAR 3: error updating (0xc8000000 != 0xffffffff)
[ 9612.508648] pci 0000:01:00.0: BAR 2: assigned [mem 0xc8004000-0xc80043ff]
[ 9612.508655] pci 0000:01:00.0: BAR 2: error updating (0xc8004000 != 0xffffffff)
[ 9612.508662] pci 0000:01:00.0: BAR 1: assigned [mem 0xc8004400-0xc80045ff]
[ 9612.508669] pci 0000:01:00.0: BAR 1: error updating (0xc8004400 != 0xffffffff)
[ 9612.508675] pci 0000:01:00.0: BAR 0: assigned [mem 0xc8004600-0xc80046ff]
[ 9612.508682] pci 0000:01:00.0: BAR 0: error updating (0xc8004600 != 0xffffffff)
[ 9612.508690] pci 0000:02:00.0: PCI bridge to [bus 03]
[ 9612.528477] pci-endpoint-test 0000:01:00.0: Refused to change power state, currently in D3
[ 9612.528667] pci-endpoint-test 0000:01:00.0: failed to get MSI interrupts
[ 9612.528822] pci-endpoint-test 0000:01:00.0: can't ioremap BAR 4: [??? 0x00000000 flags 0x0]
[ 9612.528826] pci-endpoint-test 0000:01:00.0: failed to read BAR4
[ 9612.528833] pci-endpoint-test 0000:01:00.0: can't ioremap BAR 5: [??? 0x00000000 flags 0x0]
[ 9612.528836] pci-endpoint-test 0000:01:00.0: failed to read BAR5
We also enabled additional kernel debugging messages on TDA2P and when we power up the board, the dmesg shows the following message:
[ 71.223875] dra7-pcie 51000000.pcie_ep: Link-up state change
[ 95.154440] dra7-pcie 51000000.pcie_ep: Link Request Reset
[ 95.154456] dra7-pcie 51000000.pcie_ep: Link-up state change
In contrast, when we connect the TDA2P EVA and TDA2XX EVA boards, on EP (TDA2XX EVA board) side the dmesg shows following:
[ 36.516286] dra7-pcie 51000000.pcie_ep: Link-up state change
[ 130.663177] dra7-pcie 51000000.pcie_ep: CFG 'Memory Space Enable' change
[ 130.663252] dra7-pcie 51000000.pcie_ep: CFG 'Bus Master Enable' change
Do you have any ideas or suggestions for us? Could this all be a cable issue caused by some configuration lines/bits?
Thank you in advance,
Stefan Laza.