Use PCIe to communicate between two Orin: ep reports "UPHY init failed for PCIe EP: -22"
I’m trying to use PCIe to communication between two orin. One is in the default mode (root complex). Another is configured as endpoint mode.
Set the nvhs-uphy-config of the ODMDATA value: ODMDATA=“gbe-uphy-config-22,nvhs-uphy-config-0,hsio-uphy-config-0,gbe0-enable-10g,hsstp-lane-map-3”; to ODMDATA=“gbe-uphy-config-22,nvhs-uphy-config-1,hsio-uphy-config-0,gbe0-enable-10g,hsstp-lane-map-3”;
Run this command to reflash the device:
sudo ./flash.sh jetson-agx-orin-devkit mmcblk0p1
Boot the endpoint device
Run these commands to configure and enable PCIe endpoint mode:
cd /sys/kernel/config/pci_ep/
mkdir functions/pci_epf_nv_test/func1
echo 0x10de > functions/pci_epf_nv_test/func1/vendorid
echo 0x0001 > functions/pci_epf_nv_test/func1/deviceid
ln -s functions/pci_epf_nv_test/func1 controllers/141a0000.pcie_ep/
echo 1 > controllers/141a0000.pcie_ep/start
dmesg | grep pci_epf_nv_test ep
The following message appears at the endpoint
root@tegra-ubuntu:/sys/kernel/config/pci_ep# dmesg | grep pci_epf_nv_test
[ 91.747205] pci_epf_nv_test pci_epf_nv_test.0: BAR0 RAM phys: 0x13045c000
[ 91.747242] pci_epf_nv_test pci_epf_nv_test.0: BAR0 RAM IOVA: 0xffff0000
[ 91.747399] pci_epf_nv_test pci_epf_nv_test.0: BAR0 RAM virt: 0x00000000c54afb92
Boot the root port system.
The following message appears at the endpoint
root@tegra-ubuntu:/sys/kernel/config/pci_ep# ▒▒start PLL 4 calibration timeout
▒▒[ 138.737573] tegra194-pcie 141a0000.pcie_ep: Failed to init UPHY for PCIe EP: -22
▒▒start PLL 4 calibration timeout
▒▒[ 159.221010] tegra194-pcie 141a0000.pcie_ep: Failed to init UPHY for PCIe EP: -22
▒▒start PLL 4 calibration timeout
▒▒[ 165.411756] tegra194-pcie 141a0000.pcie_ep: Failed to init UPHY for PCIe EP: -22
▒▒start PLL 4 calibration timeout
▒▒[ 166.839805] tegra194-pcie 141a0000.pcie_ep: Failed to init UPHY for PCIe EP: -22