UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer conghong
Observer
799 Views
Registered: ‎03-07-2018

PCIe Root Complex Zynq 7Z015

Hi,

I'm trying to implement PCIe Root Complex (using IPCore: AXI Memory Mapped
to PCI Express) on Zynq XC7Z015 device ( refer to this video: https://www.xilinx.com/video/soc/zynq-pci-express-root-complex-simple.html)

 

When I boot up Linux OS, I got error:

 

zynq> dmesg | grep pci
xilinx-pcie 50000000.axi-pcie: ioremap failed for resource [mem 0x50000000-0x5fffffff]
xilinx-pcie 50000000.axi-pcie: Parsing DT failed
xilinx-pcie: probe of 50000000.axi-pcie failed with error -12
ehci-pci: EHCI PCI platform driver

 

Here is PCIe node on my device tree file:

pci_express: axi-pcie@50000000 {
                        #address-cells = <3>;
                        #size-cells = <2>;
                        #interrupt-cells = <1>;
                        compatible = "xlnx,axi-pcie-host-1.00.a";
                        reg = < 0x50000000 0x10000000 >;
                        device_type = "pci";
                        interrupts = <0 52 4>;
                        interrupt-map-mask = <0 0 0 7>;
                        interrupt-map = <0 0 0 1 &pcie_intc 1>,
                                        <0 0 0 2 &pcie_intc 2>,
                                        <0 0 0 3 &pcie_intc 3>,
                                        <0 0 0 4 &pcie_intc 4>;
                        ranges = < 0x02000000 0 0x60000000 0x60000000 0 0x10000000 >;
                        pcie_intc: interrupt-controller {
                                interrupt-controller;
                                #address-cells = <0>;
                                #interrupt-cells = <1>;
                        };                                                
                    };

 

I suspect the device tree has problems, but have no idea where it is.

Could anyone please give me some advice?

 

Thanks,

Conghong

 

0 Kudos
2 Replies
764 Views
Registered: ‎01-08-2012

Re: PCIe Root Complex Zynq 7Z015

I've used the PCIe RC IP on that exact Zynq device, so this can definitely be made to work.

 

The only thing I can see that looks unusual is your "length" - you are trying to map 256MiB.  Do you really need something that large?

I wonder whether your OS is barfing because of the size.

 

Comparing your device tree with ours, I can see some trivial differences (e.g. our address is 0x80000000; yours is 0x50000000).

e.g.

reg = < 0x80000000 0x01000000 >;
...
ranges = < 0x02000000 0x00000000 0xa0000000 0xa0000000 0x00000000 0x20000000 >;
...
interrupts = < 0 36 4 >;

but that is all.  With those settings, the linux driver always seems to chose the same address for the end point: 0xa1000000.  I do not know why it chooses that address rather than 0xa0000000.

0 Kudos
Observer conghong
Observer
758 Views
Registered: ‎03-07-2018

Re: PCIe Root Complex Zynq 7Z015

Hi allanherriman,

Thank for replying.

 

I decrease the memsize of PCIe AXI_CTRL to 64MB:

 

address.png

I change my device tree:

 

                pci_express: axi-pcie@50000000 {
                        #address-cells = <3>;
                        #size-cells = <2>;
                        #interrupt-cells = <1>;
                        compatible = "xlnx,axi-pcie-host-1.00.a";
                        reg = < 0x50000000 0x04000000 >;
                        device_type = "pci";
                        interrupts = <0 52 4>;
                        interrupt-map-mask = <0 0 0 7>;
                        interrupt-map = <0 0 0 1 &pcie_intc 1>,
                                        <0 0 0 2 &pcie_intc 2>,
                                        <0 0 0 3 &pcie_intc 3>,
                                        <0 0 0 4 &pcie_intc 4>;
                        ranges = < 0x02000000 0 0x60000000 0x60000000 0 0x10000000 >;
                        pcie_intc: interrupt-controller {
                                interrupt-controller;
                                #address-cells = <0>;
                                #interrupt-cells = <1>;
                        };                                                
                    };

But when I boot up Linux, it can not boot up successful. But it still faild when booting up.

 

Could you give me some idea? My device tree with Address assigned like that is true?

 

With project you have done, do you add any else attribute to PCIe node in devicetree?

 

Thanks

 

 

Tags (1)
0 Kudos