Hello,
I am currently trying to set up a PCIe link between 2 jetson agx orin industrials on custom carriers using internal refclks.
I have one of the boards setup as endpoint on C7
ODMData string: gbe-uphy-config-1,hsstp-lane-map-3,hsio-uphy-config-16,nvhs-uphy-config-0
DT node:
pcie-ep@141e0000 {
status = “okay”;
num-lanes = <8>;
nvidia,enable-srns;
/delete-property/ nvidia,enable-ext-refclk;
vddio-pex-ctl-supply = <&vpcie3v3>;
reset-gpios = <&gpio TEGRA234_MAIN_GPIO(K, 3) GPIO_ACTIVE_LOW>;
phys = <&p2u_gbe_0>, <&p2u_gbe_1>, <&p2u_gbe_2>, <&p2u_gbe_3>,
<&p2u_gbe_4>, <&p2u_gbe_5>, <&p2u_gbe_6>, <&p2u_gbe_7>;
phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3",
"p2u-4", "p2u-5", "p2u-6", "p2u-7";
};
BPMP edit:
/ {
clocks {
clock@plle {
clk-id = <0x64>;
disable-spread = <1>;
};
clock@pllnvhs {
clk-id = <0xf3>;
disable-spread = <1>;
};
clock@pllgbe {
clk-id = <0x13f>;
disable-spread = <1>;
};
};
uphy {
pcie-c7-endpoint-use-int-refclk;
};
};
I am configuring the endpoint with the following commands:
modprobe pci-epf-test
mkdir -p /sys/kernel/config/pci_ep/functions/pci_epf_test/func1
echo 0x10de > /sys/kernel/config/pci_ep/functions/pci_epf_test/func1/vendorid
echo 0x229a > /sys/kernel/config/pci_ep/functions/pci_epf_test/func1/deviceid
ln -s /sys/kernel/config/pci_ep/functions/pci_epf_test/func1 func1
echo 1 > /sys/kernel/config/pci_ep/controllers/141e0000.pcie-ep/start
and the other configured as root on C7
ODMData: gbe-uphy-config-0,hsstp-lane-map-3,hsio-uphy-config-16,nvhs-uphy-config-0
DT entry:
pcie@141e0000 {
status = “okay”;
vddio-pex-ctl-supply = <&vpcie3v3>;
nvidia,enable-srns;
num-lanes = <8>;
nvidia,disable-aspm-states = <0xf>;
phys = <&p2u_gbe_0>, <&p2u_gbe_1>, <&p2u_gbe_2>, <&p2u_gbe_3>,
<&p2u_gbe_4>, <&p2u_gbe_5>, <&p2u_gbe_6>, <&p2u_gbe_7>;
phy-names = “p2u-0”, “p2u-1”, “p2u-2”, “p2u-3”,
“p2u-4”, “p2u-5”, “p2u-6”, “p2u-7”;
};
bpmp edit:
clocks {
clock@plle {
clk-id = <0x64>;
disable-spread = <1>;
};
clock@pllnvhs {
clk-id = <0xf3>;
disable-spread = <1>;
};
clock@pllgbe {
clk-id = <0x13f>;
disable-spread = <1>;
};
};
Through use of kernel debugging, I have determined the pcie link is up during the UEFI boot, but fails to come up during normal linux boot.
I have verified the TX and RX signals are routed correctly, and verified the reset signal is functional
I have verified the expected device tree and ODMData are being flashed to the boards.
The physical hardware is a 4 lane connection, however when configured for four lanes the endpoint board crashes upon receiving a reset from the host. I found this post: AGX Orin, JP5.1.2 and PCIE Endpoint Troubleshooting - #17 by WayneWWW
that seemed to show switching the endpoint to 8 lanes was a solution to this issue. I have tried with both 4 and 8 lanes on the root side, in both cases the link is up during UEFI boot but fails to come up during normal linux boot.
dmesg on root:
[ 11.706261] tegra194-pcie 141e0000.pcie: Adding to iommu group 8
[ 11.715984] sdhci-tegra 3400000.mmc: Got CD GPIO
[ 11.814165] tegra194-pcie 141e0000.pcie: host bridge /bus@0/pcie@141e0000 ranges:
[ 11.814181] tegra194-pcie 141e0000.pcie: MEM 0x3000000000..0x3227ffffff → 0x3000000000
[ 11.814186] tegra194-pcie 141e0000.pcie: MEM 0x3228000000..0x322fffffff → 0x0040000000
[ 11.814189] tegra194-pcie 141e0000.pcie: IO 0x003e100000..0x003e1fffff → 0x003e100000
[ 11.814662] tegra194-pcie 141e0000.pcie: iATU unroll: enabled
[ 11.814664] tegra194-pcie 141e0000.pcie: Detected iATU regions: 8 outbound, 2 inbound
[ 12.922124] tegra194-pcie 141e0000.pcie: Phy link never came up
[ 13.923981] tegra194-pcie 141e0000.pcie: Phy link never came up
[ 13.924034] tegra194-pcie 141e0000.pcie: PCI host bridge to bus 0007:00
[ 13.924038] pci_bus 0007:00: root bus resource [io 0x300000-0x3fffff] (bus address [0x3e100000-0x3e1fffff])
[ 13.924040] pci_bus 0007:00: root bus resource [mem 0x3228000000-0x322fffffff] (bus address [0x40000000-0x47ffffff])
[ 13.924043] pci_bus 0007:00: root bus resource [bus 00-ff]
[ 13.924045] pci_bus 0007:00: root bus resource [mem 0x3000000000-0x3227ffffff pref]
[ 13.924089] pci 0007:00:00.0: [10de:229a] type 01 class 0x060400
[ 13.924233] pci 0007:00:00.0: PME# supported from D0 D3hot
[ 13.930861] pci 0007:00:00.0: PCI bridge to [bus 01-ff]
[ 13.930951] pcieport 0007:00:00.0: Adding to iommu group 8
[ 13.931027] pcieport 0007:00:00.0: PME: Signaling with IRQ 198
[ 13.931535] pcieport 0007:00:00.0: AER: enabled with IRQ 198
[ 13.931730] sdhci-tegra 3400000.mmc: Got CD GPIO
[ 13.931775] pci_bus 0007:01: busn_res: [bus 01-ff] is released
[ 13.931851] pci 0007:00:00.0: Removing from iommu group 8
[ 13.931862] pci_bus 0007:00: busn_res: [bus 00-ff] is released
[ 13.943992] sdhci-tegra 3400000.mmc: Got CD GPIO