AnsweredAssumed Answered

iMX6q pcie interface with Xilinx device

Question asked by Sumeet Dube on Aug 21, 2015
Latest reply on Jun 23, 2016 by shiguang liu

We have a problem interfacing a Xiinx Spartan-6 FPGA to pcie port of iMX6q on our custom board.

We can detect the device using pci-utils command lspci but cannot read/write access to the device using mmap() (we used memtool)

We get the following error,


Reading 0x1 count starting at add[  347.307257] Unhandled fault: external abort on non-linefetch (0x1018) at 0x76f3b000  
address 0x01300000                                                                                                          

Bus error


We think this is beacuse the memory is not defined in /proc/iomem.

Do we need to write a driver for the device even if it is detected .

And how to assign this memory region in the pcie attribute in devicetree.

Currently the pcie part looks like this,


pcie: pcie@0x01000000 {

    compatible = "fsl,imx6q-pcie", "snps,dw-pcie";

    reg = <0x01ffc000 0x4000>; /* DBI */

    #address-cells = <3>;

    #size-cells = <2>;

    device_type = "pci";

    ranges = <0x00000800 0 0x01f00000 0x01f00000 0 0x00080000 /* configuration space */

          0x81000000 0 0          0x01f80000 0 0x00010000 /* downstream I/O */

          0x82000000 0 0x01000000 0x01000000 0 0x00f00000>; /* non-prefetchable memory */

    num-lanes = <1>;

    interrupts = <0 123 0x04>;

    clocks = <&clks 189>, <&clks 187>, <&clks 144>, <&clks 212>;

    clock-names = "pcie_ref_125m", "sata_ref_100m", "pcie_axi", "lvds_gate";

    status = "okay";


I have attached lspci verbose output , /proc/iomem output and the error.

We think it has something to do with the ranges filed but cannot fully understand how to change for our device.

Original Attachment has been moved to:

Original Attachment has been moved to:

Original Attachment has been moved to:

Original Attachment has been moved to: