Hello,
We are working on a custom board developed with AM65x EVM SR 1.0 as reference design.
We are using TI's SDK v06_03_00_106 on our platform.
In the process of validating the PCIe interface with two custom platforms connected in loopback mode, We observe that lspci command does not list the End point device.
We are using PCIE1 serdes1 as instructed in TI documentation.
Procedure Followed:
Hardware setup:
Remove the RST resistors in PCIe card.
Software setup:
Kernel device drivers:
End Point drivers:
CONFIG_PCI_ENDPOINT=y
CONFIG_PCI_ENDPOINT_CONFIGFS=y
CONFIG_PCI_EPF_TEST=y
CONFIG_PCI_J721E=y
CONFIG_PCIE_CADENCE_EP=y
CONFIG_PCI_DRA7XX_EP=y
Root Complex drivers:
CONFIG_PCI=y
CONFIG_PCI_ENDPOINT_TEST=y
CONFIG_PCI_DRA7XX_HOST=yCONFIG_PCI=y
CONFIG_PCI_ENDPOINT_TEST=y
CONFIG_PCIE_CADENCE_HOST=y
Updated the device tree for EP configuration:
diff --git a/arch/arm64/boot/dts/ti/k3-am654-pcie-usb3.dtso b/arch/arm64/boot/dts/ti/k3-am654-pcie-usb3.dtso
index 3fc3c52aba80..789545d47e36 100644
--- a/arch/arm64/boot/dts/ti/k3-am654-pcie-usb3.dtso
+++ b/arch/arm64/boot/dts/ti/k3-am654-pcie-usb3.dtso
@@ -14,9 +14,8 @@
status = "okay";
};
-&pcie1_rc {
+&pcie1_ep {
phys = <&serdes1 PHY_TYPE_PCIE 0>;
phy-names = "pcie-phy0";
- reset-gpios = <&pca9555 5 GPIO_ACTIVE_HIGH>;
status = "okay";
};
Configuration after boot in End Point device:
# mount -t configfs none /sys/kernel/config
# cd /sys/kernel/config/pci_ep/
# mkdir functions/pci_epf_test/func1
# echo 0x104c > functions/pci_epf_test/func1/vendorid
# echo 0xb00c > functions/pci_epf_test/func1/deviceid
# echo 16 > functions/pci_epf_test/func1/msi_interrupts
# echo 2 > functions/pci_epf_test/func1/msix_interrupts
# ln -s functions/pci_epf_test/func1 controllers/5600000.pcie-ep
# echo 1 > controllers/5600000.pcie-ep/start
Note:
# echo 2 > functions/pci_epf_test/func1/msix_interrupts
TI documents doesn't suggest any inputs for msix_interrupts sysfs entry for AM65x EVM but without configuring the Interrupt we are getting the following error while linking.
# ln -s functions/pci_epf_test/func1/ controllers/5600000.pcie-ep/ [ 175.492067] pci_epf_test pci_epf_test.0: MSI-X configuration failed ln: controllers/5600000.pcie-ep/func1: Invalid argument
Now on turning on the Root Complex device lspci does not list any PCIe devices
Some questions that I have are
1. Does AM65x EVM SR1.0 and TI SDK 06_03_00_106 support PCIe loopback mode ?
2. Is there any change required in Bootloader for PCIe ?
Kindly instruct us on where we went wrong.