Enable Jetson Orin NX PCIe Endpoint for C4

We have designed a custom carrier board for Jetson Orin NX, for PCIe C4(14160000) we want to use it as an PCIe endpoint, here are the
modifications we made under JetPack 5.4.1(L4T 35.6.0):

  1. Change ODMDATA to “gbe-uphy-config-9,hsstp-lane-map-3,hsio-uphy-config-40” of file “p3767.conf.common”
  2. Add pcie_ep@14160000 node and disable pcie@14160000 to file “hardware/nvidia/platform/t23x/p3768/kernel-dts/cvb/tegra234-p3509-a02-pcie.dtsi”
  3. Flash the board using config file “p3509-a02+p3767-0000.conf”

After flashing, the board can boot into the os, but dmesg says:
“Faild to get PERST GPIO” and cannot parse the device tree

The other board acts as PCIe RC cannot scan the EP.

We try to make it work, how can I fix this problem? thanks.

tegra234-p3509-a02-pcie.dtsi.txt (1.7 KB)

Why do you need to use p3509-a02-pcie.dtsi but not tegra234-p3768-0000-a0-pcie.dtsi?

tegra234-p3768-0000-a0-pcie.dtsi already had the EP setting.

I also bought a custom carrier board, it uses p3509-a02+p3767-0000.conf, so i stick to this configuration and add EP support.

I switched to p3768-0000+p3767-0000.conf without any changes, but the problem still happens.

According to the session Orin NX boot EL3 eoor when pcie set endpoint - #33 by Wilson_Lin, I finally made EP working (One Orin NX acts as RC and the other Orin NX acts as EP) under PCIe Gen3 x4.

But here is another problem, I can read/write EP’s RAM using busybox devmem using pci_epf_nv_test, but when I use EP as virtual network card, the ping failed on both sides, I already disable NetworkManager and use netplan to set IPs for EP as well as RP, but the problem still there.

Did you apply the EDMA patch mentioned in the l4t developer guide before enabling virtual network?

Yes, I did.
The patch has been applied to EP only, then I replaced Linux_for_Tegra/kernel/Image with the patched kernel image.
Does this patch affect a single kernel module (ko), or just the kernel image?