This page gives an overview of Root Port driver for Xilinx XDMA (Bridge mode) IP, when connected to PCIe block in ZUZynq UltraScale+ MPSoC PL and PL PCIe4 in Versal ACAPAdaptive SoC. The driver is available as part of Xilinx Linux distribution as drivers/pci/controller/pcie-xdma-pl.c
...
1. Broadcom PCIe NIC card
2. Intel NVMe SSD
3. Intel NIC card
Standard Petalinux PetaLinux build flow for Linux image/devicetree generation using HDF from hardware design should be followed.
...
Code Block | ||
---|---|---|
| ||
xdma_0: axi-pcie@a0000000 { #address-cells = <3>; #interrupt-cells = <1>; #size-cells = <2>; compatible = "xlnx,xdma-host-3.00"; device_type = "pci"; interrupt-map = <0 0 0 1 &pcie_intc_0 1>, <0 0 0 2 &pcie_intc_0 2>, <0 0 0 3 &pcie_intc_0 3>, <0 0 0 4 &pcie_intc_0 4>; interrupt-map-mask = <0 0 0 7>; interrupt-parent = <&gic>; interrupt-names = "misc", "msi0", "msi1"; interrupts = <0 89 4>, <0 90 4>, <0 91 4>; ranges = <0x02000000 0x00000000 0xB0000000 0x0 0xB0000000 0x00000000 0x01000000>, <0x43000000 0x00000005 0x00000000 0x00000005 0x00000000 0x00000000 0x01000000>; reg = <0x0 0xA0000000 0x0 0x10000000>; pcie_intc_0: interrupt-controller { #address-cells = <0>; #interrupt-cells = <1>; interrupt-controller ; }; }; |
Test Procedure
- Boot linux onto ZCU106.
- After successful booting of the linux, the Broadcom NIC endpoint driver is seen to be probed.
- Run the command ‘lspci’ from the user prompt, which shows the the device id and vendor id of the Broadcom NIC card. This ensures the enumeration of the device is fine.
- The Broadcom NIC is shown up as an eth0 interface in the linux. Run the command ‘ifconfig eth0 up’ which brings up the Ethernet interface. This step ensures all the memory transactions on the PCIe bus are working. (the ethX assigned may be dependent on other Ethernet ports enabled on your setup)
- Assign a IP address either static/dhcp.
- Ping to a device of known IP address.
Kernel Console Output
Driver Initialization for ZynqMP
...
End Point Driver Configuration
The following driver is needed to be enabled for using NVMe SSD as EndPoint.
For other End point cards, ensure the respective driver is enabled in kernel.
...
Code Block | ||
---|---|---|
| ||
pcie_dma_versal_0: axi-pcie@80000000 { #address-cells = <3>; #interrupt-cells = <1>; #size-cells = <2>; compatible = "xlnx,qdma-host-3.00"; device_type = "pci"; interrupt-map = <0 0 0 1 &psv_pcie_intc_0 1>, <0 0 0 2 &psv_pcie_intc_0 2>, <0 0 0 3 &psv_pcie_intc_0 3>, <0 0 0 4 &psv_pcie_intc_0 4>; interrupt-map-mask = <0 0 0 7>; interrupt-names = "misc", "msi0", "msi1"; interrupt-parent = <&gic>; interrupts = <0 84 4 0 85 4 0 86 4>; ranges = <0x02000000 0x00000000 0xA8000000 0x0 0xA8000000 0x00000000 0x1000000>; reg = <0x0 0x90000000 0x0 0x5000>, <0x0 0x80000000 0x0 0x1000000>; reg-names = "breg", "cfg"; psv_pcie_intc_0: interrupt-controller { #address-cells = <0>; #interrupt-cells = <1>; interrupt-controller ; }; }; |
Test Procedure
- Boot linux onto Versal.
- Check lspci to confirm NVMe card is detected and do the following steps.
- mount /dev/nvmeXX /mnt
- cd /mnt
- dd if=/dev/zero of=tmp.txt bs=4096 count=200000
...