@toothless
I apologize for the wait. It took me a little longer than I anticipated to build the kernel.
Kernel Modification
I modified the file:
<kernel_source>/arch/arm64/boot/dts/tegra210-jetson-cv-base-p2597-2180-a00.dts
line 214:
pci@1,0 {
status = "okay";
nvidia,disable-clock-request;
};
Result
No Change
I rebuilt/reflashed the TX1 and it still outputted the same AER error stream as before.
U-Boot Modification
I thought that perhaps instead of just modifying the DTS within the kernel I should modify the U-Boot DTS (or both the DTS within kernel and u-boot)
I modified the following file:
<u-boot_source>/arch/arm/dts/tegra210-p2371-2180.dts
Line 28:
pci@1,0 {
status = "okay";
nvidia,disable-clock-request;
};
Result
No Change
Unfortunately this yielded the same results, a lot of AER error steam.
U-boot
I noticed inside of u-boot that I can manually initiate a PCI Enumeration with the command:
‘pci enum’
Here is a result when I enter the command when my PCIE device is not attached:
Tegra210 (P2371-2180) # pci enum
tegra-pcie: PCI regions:
tegra-pcie: I/O: 0x0000000012000000-0x0000000012010000
tegra-pcie: non-prefetchable memory: 0x0000000013000000-0x0000000020000000
tegra-pcie: prefetchable memory: 0x0000000020000000-0x0000000040000000
tegra-pcie: 4x1, 1x1 configuration
tegra-pcie: probing port 0, using 4 lanes
tegra-pcie: link 0 down, retrying
tegra-pcie: link 0 down, retrying
tegra-pcie: link 0 down, retrying
tegra-pcie: link 0 down, ignoring
tegra-pcie: probing port 1, using 1 lanes
tegra-pcie: link 1 down, retrying
tegra-pcie: link 1 down, retrying
tegra-pcie: link 1 down, retrying
tegra-pcie: link 1 down, ignoring
Tegra210 (P2371-2180) #
Sometimes when I do enable my FPGA PCIE port I see a different result:
Tegra210 (P2371-2180) # pci enum
tegra-pcie: PCI regions:
tegra-pcie: I/O: 0x0000000012000000-0x0000000012010000
tegra-pcie: non-prefetchable memory: 0x0000000013000000-0x0000000020000000
tegra-pcie: prefetchable memory: 0x0000000020000000-0x0000000040000000
tegra-pcie: 4x1, 1x1 configuration
tegra-pcie: probing port 0, using 4 lanes
tegra-pcie: link 0 down, retrying
tegra-pcie: link 0 down, retrying
tegra-pcie: link 0 down, retrying
tegra-pcie: link 0 down, ignoring
tegra-pcie: probing port 1, using 1 lanes
tegra-pcie: link 1 down, retrying
tegra-pcie: link 1 down, retrying
tegra-pcie: link 1 down, retrying
tegra-pcie: link 1 down, ignoring
Tegra210 (P2371-2180) # pci enum
tegra-pcie: PCI regions:
tegra-pcie: I/O: 0x0000000012000000-0x0000000012010000
tegra-pcie: non-prefetchable memory: 0x0000000013000000-0x0000000020000000
tegra-pcie: prefetchable memory: 0x0000000020000000-0x0000000040000000
tegra-pcie: 4x1, 1x1 configuration
tegra-pcie: probing port 0, using 4 lanes
tegra-pcie: link 0 down, retrying
tegra-pcie: link 0 down, retrying
tegra-pcie: probing port 1, using 1 lanes
tegra-pcie: link 1 down, retrying
tegra-pcie: link 1 down, retrying
tegra-pcie: link 1 down, retrying
tegra-pcie: link 1 down, ignoring
Tegra210 (P2371-2180) # pci enum
tegra-pcie: PCI regions:
tegra-pcie: I/O: 0x0000000012000000-0x0000000012010000
tegra-pcie: non-prefetchable memory: 0x0000000013000000-0x0000000020000000
tegra-pcie: prefetchable memory: 0x0000000020000000-0x0000000040000000
tegra-pcie: 4x1, 1x1 configuration
tegra-pcie: probing port 0, using 4 lanes
tegra-pcie: probing port 1, using 1 lanes
tegra-pcie: link 1 down, retrying
tegra-pcie: link 1 down, retrying
tegra-pcie: link 1 down, retrying
tegra-pcie: link 1 down, ignoring
Tegra210 (P2371-2180) #
Notice how the linkup is not consistent. From the TX1 side It does seem to link up however when I enter the ‘pci’ command (which just shows which devices are available) all I get is the bridge and not my device.
Tegra210 (P2371-2180) # help pci
Usage:
pci [bus] [long]
- short or long list of PCI devices on bus 'bus'
pci enum
- re-enumerate PCI buses
pci header b.d.f
- show header of PCI device 'bus.device.function'
pci display[.b, .w, .l] b.d.f [address] [# of objects]
- display PCI configuration space (CFG)
pci next[.b, .w, .l] b.d.f address
- modify, read and keep CFG address
pci modify[.b, .w, .l] b.d.f address
- modify, auto increment CFG address
pci write[.b, .w, .l] b.d.f address value
- write to CFG address
Tegra210 (P2371-2180) # pci
Scanning PCI devices on bus 0
BusDevFun VendorId DeviceId Device Class Sub-Class
_____________________________________________________________
00.01.00 0x10de 0x0fae Bridge device 0x04
Tegra210 (P2371-2180) #
Tegra210 (P2371-2180) # pci long
Scanning PCI devices on bus 0
Found PCI device 00.01.00:
vendor ID = 0x10de
device ID = 0x0fae
command register = 0x0007
status register = 0x0010
revision ID = 0xa1
class code = 0x06 (Bridge device)
sub class code = 0x04
programming interface = 0x00
cache line = 0x08
latency time = 0x00
header type = 0x01
BIST = 0x00
base address 0 = 0x00000000
base address 1 = 0x00000000
primary bus number = 0x00
secondary bus number = 0x01
subordinate bus number = 0x01
secondary latency timer = 0x00
IO base = 0x01
IO limit = 0xf1
secondary status = 0x0000
memory base = 0x1300
memory limit = 0x12f0
prefetch memory base = 0x2001
prefetch memory limit = 0x1ff1
prefetch memory base upper = 0x00000000
prefetch memory limit upper = 0x00000000
IO base upper 16 bits = 0x1200
IO limit upper 16 bits = 0x11ff
expansion ROM base address = 0x00000000
interrupt line = 0x00
interrupt pin = 0x01
bridge control = 0x0000
Tegra210 (P2371-2180) #
When I use my tool to query the status of the FPGA I can see that the FPGA’s PCIE_A1 core LTSSM state machine is attempting to link up. It is primarily in the ‘Polling.Active’ state.
Since it is possible for me to modify the u-boot source code and the u-boot also queries the PCI express bus perhaps we can focus on making modifications within u-boot and if we are successful we can port the results to the kernel. This is a lot easier for me to do.
I found the source code for the PCIE Express tegra controller.
<u-boot_source>/drivers/pci/pci_tegra.c
After comparing it to the kernel’s version
<kernel_source>/drivers/pci/host/pci-tegra.c
It seems that they are basically the same except the kernel uses the kernel API and u-boot uses it’s own API
I’ll spend some time looking through the PCIE Registers in the TRM, perhaps we can try something else.
Thanks again for the help.
Dave