Hi,
I'm working with the i.MX8MP evaluation board:
https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/evaluation-kit-...
My setup consists of two boards connected by the 2 x M.2 Key A+E to PCIe x1 cables and PCIe x1 extension cable (Tx to Rx signal swap).
On both boards, I'm running the latest linux-imx kernel release (tag lf-5.10.52-2.1.0).
I successfully ran ep-rc tests using the existing pci-epf-test function driver and pci_endpoint_test host driver.
I'm currently trying to enable the multi-function support (two physical functions). Based on the specs I read, I understand that the controller supports it.
I added the max-functions property to the device tree:
&pcie_ep{
status = "okay";
max-functions = /bits/ 8 <2>;
};
and tried to create two functions using pci-epf-test function driver.
I'm getting this error while trying to link the second function to the controller:
root@imx8mpevk:/sys/kernel/config/pci_ep# ln -s ./functions/pci_epf_test/func2 ./controllers/33800000.pcie_ep/
[ 19.335624] imx6q-pcie 33800000.pcie_ep: No free inbound window
[ 19.341586] pci_epf_test pci_epf_test.1: Failed to set BAR0
ln: failed to create symbolic link './controllers/33800000.pcie_ep/func2': Invalid argument
I think that to make it work I have to set the num-ib-windows, num-ob-windows and range for the ATU address space correctly, but I know too little about the PCIe internals and I'm lacking documentation.
My questions are:
1. Does the controller support the multi-function device?
2. If it does, any suggestions how to enable it?
Any help would be greatly appreciated.
Thanks,
Krzysztof