The LX2160 manual and the device tree both refer to 6 controllers. However, mapping and attempting to read the configuration space for each of those causes the board to hang for most controllers, suggesting they are either not powered or simply not there. It seems that only 3 and 5 are enabled. Is that correct?
Also, when I try to enumerate controller 3 I get some odd results on the first few BDF entries, which look like bridges but have a type 1 header.
–Elad
P.S.,
Keep in mind that I know very little about PCI. Just trying to get more hardware enabled on this board for my real job…
The LX2160a can support up to 6 PCIe controllers, however that requires the carrier to support it. The RCW determines how the SERDES channels are designated. By default the HoneyComb and ClearFog CX carriers have PCIe enabled for controllers 3 and 5, however the x8 slot can be bifurcated and support controllers 5 and 6 in 2x x4 configurations.
The LX2160a V2 board uses a Synopsis based controller, which has a Linux driver to manage the config accesses. Are you having issues with the BSP detecting your PCIe card?
Linux sees bridges at 0:0:0 and 1:0:0 (controllers 3 and 5?) and then the NVMe card on the M2 slot at 0:1:0. When I try enumerating myself (to get the QNX driver to work) I see a bridge in 0:0:0. But then reading the mapped ECAM at the offset for 0:1:0 shows a device with the same VID/DID (so not the NVMe), a header type of 1 and an unexpected class/subclass:
I found a QNX PCI driver for the NXP LS2xxx SoCs that appears to be close enough, but there is at least one important difference. In the LS2xxxx you can get information on which PCIe controllers are available and what is their configuration by reading the SerDes PCCR0 register. It seems that on the LX2160 this is done by reading the reset control word instead, but it is not clear to me how to do that.
By the way, if these questions are better directed at NXP please let me know.
lx2160a has 2 variants. The original V1 hardware which was only shipped as pre-release had a mobiveil pcie controller, the V2 hardware which is what in current mass production changed the PCIe controller IP and is now a synopsis based design more similar to the other Layerscape SOCs
I have PCIe (and NVMe) working now. Thanks for the help.
At some point I will need to figure out how to create a proper boot image and get the device tree from the firmware, instead of using the default image.