BAR 2: no space for in pci interface+imx8mq

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

BAR 2: no space for in pci interface+imx8mq

Jump to solution
2,097 Views
saurav-pandya
Contributor III

Hi NXP team, 

I am currently working on Imx8mq platform. I am trying to communicate FPGA to imx8mq over the PCI interface. FPGA board connected with imx8mq over PCI1, but I have got below error in dmesg:

Command : dmesg | grep -i pci

[ 0.114115] PCI: CLS 0 bytes, default 64
[ 1.356705] ehci-pci: EHCI PCI platform driver
[ 1.372861] ohci-pci: OHCI PCI platform driver
[ 2.270264] imx6q-pcie 33800000.pcie: 33800000.pcie supply epdev_on not found, using dummy regulator
[ 2.270868] imx6q-pcie 33c00000.pcie: 33c00000.pcie supply epdev_on not found, using dummy regulator
[ 2.305586] imx6q-pcie 33800000.pcie: PCIe PLL locked after 0 us.
[ 2.314007] imx6q-pcie 33800000.pcie: host bridge /soc@0/pcie@33800000 ranges:
[ 2.317049] imx6q-pcie 33c00000.pcie: PCIe PLL locked after 0 us.
[ 2.317094] imx6q-pcie 33c00000.pcie: host bridge /soc@0/pcie@33c00000 ranges:
[ 2.317104] imx6q-pcie 33c00000.pcie: No bus range found for /soc@0/pcie@33c00000, using [bus 00-ff]
[ 2.317133] imx6q-pcie 33c00000.pcie: IO 0x27f80000..0x37f7ffff -> 0x00000000
[ 2.317152] imx6q-pcie 33c00000.pcie: MEM 0x20000000..0x2fffffff -> 0x20000000
[ 2.317178] imx6q-pcie 33c00000.pcie: resource collision: [io 0x0000-0xfffffff] conflicts with PCI IO [io 0x0000-0xffffff]
[ 2.317185] imx6q-pcie 33c00000.pcie: failed to initialize host
[ 2.317189] imx6q-pcie 33c00000.pcie: unable to add pcie port.
[ 2.317667] imx6q-pcie: probe of 33c00000.pcie failed with error -16
[ 2.326803] imx6q-pcie 33800000.pcie: IO 0x1ff80000..0x1ff8ffff -> 0x00000000
[ 2.340103] imx6q-pcie 33800000.pcie: MEM 0x18000000..0x1fefffff -> 0x18000000
[ 2.457451] imx6q-pcie 33800000.pcie: Link up
[ 2.466497] imx6q-pcie 33800000.pcie: Link up
[ 2.466505] imx6q-pcie 33800000.pcie: Link up, Gen1
[ 2.466626] imx6q-pcie 33800000.pcie: PCI host bridge to bus 0000:00
[ 2.477153] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 2.487778] pci_bus 0000:00: root bus resource [io 0x10000-0x1ffff] (bus address [0x0000-0xffff])
[ 2.487788] pci_bus 0000:00: root bus resource [mem 0x18000000-0x1fefffff]
[ 2.498442] pci 0000:00:00.0: [16c3:abcd] type 01 class 0x060400
[ 2.509072] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
[ 2.519700] pci 0000:00:00.0: reg 0x38: [mem 0x00000000-0x0000ffff pref]
[ 2.527500] pci 0000:00:00.0: supports D1
[ 2.535482] pci 0000:00:00.0: PME# supported from D0 D1 D3hot D3cold
[ 2.538240] pci 0000:01:00.0: [1172:e001] type 00 class 0xff0000
[ 2.543698] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x0fffffff]
[ 2.551325] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x000003ff]
[ 2.562719] pci 0000:00:00.0: BAR 14: no space for [mem size 0x18000000]
[ 2.568485] pci 0000:00:00.0: BAR 14: failed to assign [mem size 0x18000000]
[ 2.576600] pci 0000:00:00.0: BAR 0: assigned [mem 0x18000000-0x180fffff]
[ 2.615114] pci 0000:00:00.0: BAR 6: assigned [mem 0x18100000-0x1810ffff pref]
[ 2.629207] pci 0000:01:00.0: BAR 0: no space for [mem size 0x10000000]
[ 2.629211] pci 0000:01:00.0: BAR 0: failed to assign [mem size 0x10000000]
[ 2.629216] pci 0000:01:00.0: BAR 2: no space for [mem size 0x00000400]
[ 2.668684] pci 0000:01:00.0: BAR 2: failed to assign [mem size 0x00000400]
[ 2.683569] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[ 2.699697] pcieport 0000:00:00.0: PME: Signaling with IRQ 238
[ 2.751880] pcieport 0000:00:00.0: AER: enabled with IRQ 238

We haven't get resource0 and resource1 sysentry in sysfs.

Device tree configuration:

imx8mq.dtsi

pcie1: pcie@33c00000 {
compatible = "fsl,imx8mq-pcie";
reg = <0x33c00000 0x400000>,
<0x27f00000 0x80000>;
reg-names = "dbi", "config";
#address-cells = <3>;
#size-cells = <2>;
device_type = "pci";
ranges = <0x81000000 0 0x00000000 0x27f80000 0 0x10000000 /* downstream I/O 64KB */
0x82000000 0 0x20000000 0x20000000 0 0x10000000>; /* non-prefetchable memory */
num-lanes = <1>;
num-viewport = <4>;
interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>; /* eDMA */
interrupt-names = "msi", "dma";
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 0x7>;
interrupt-map = <0 0 0 1 &gic GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>,
<0 0 0 2 &gic GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
<0 0 0 3 &gic GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>,
<0 0 0 4 &gic GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
fsl,max-link-speed = <2>;
power-domains = <&pgc_pcie>;
resets = <&src IMX8MQ_RESET_PCIEPHY2>,
<&src IMX8MQ_RESET_PCIE2_CTRL_APPS_EN>,
<&src IMX8MQ_RESET_PCIE2_CTRL_APPS_CLK_REQ>,
<&src IMX8MQ_RESET_PCIE2_CTRL_APPS_TURNOFF>;
reset-names = "pciephy", "apps", "clkreq", "turnoff";
status = "disabled";
};

imx8mq-evk.dts

&pcie1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pcie1>;
disable-gpio = <&gpio5 10 GPIO_ACTIVE_LOW>;
reset-gpio = <&gpio5 12 GPIO_ACTIVE_LOW>;
clocks = <&clk IMX8MQ_CLK_PCIE2_ROOT>,
<&clk IMX8MQ_CLK_PCIE2_AUX>,
<&clk IMX8MQ_CLK_PCIE2_PHY>,
<&pcie1_refclk>;
clock-names = "pcie", "pcie_aux", "pcie_phy", "pcie_bus";
assigned-clocks = <&clk IMX8MQ_CLK_PCIE2_AUX>,
<&clk IMX8MQ_CLK_PCIE1_PHY>,
<&clk IMX8MQ_CLK_PCIE1_CTRL>;
assigned-clock-rates = <10000000>, <100000000>, <250000000>;
assigned-clock-parents = <&clk IMX8MQ_SYS2_PLL_50M>,
<&clk IMX8MQ_SYS2_PLL_100M>,
<&clk IMX8MQ_SYS2_PLL_250M>;
vph-supply = <&vgen5_reg>;
l1ss-disabled;
status = "okay";
};

Please help me to resolved this issue.

 

Thank You,

Saurav

0 Kudos
1 Solution
2,090 Views
saurav-pandya
Contributor III

Hi ,

We need 256MB memory. Please suggest change in Kernel and uboot.

 

 

Thanks,

Saurav

View solution in original post

Tags (1)
0 Kudos
3 Replies
2,091 Views
saurav-pandya
Contributor III

Hi ,

We need 256MB memory. Please suggest change in Kernel and uboot.

 

 

Thanks,

Saurav

Tags (1)
0 Kudos
2,072 Views
Yuri
NXP Employee
NXP Employee

@saurav-pandya 
Hello,

   according to Cortex-A53 Memory Map in the i.MX8MQ RM, only 128 MB of
address space is available for PCIe-1 and 128 MB  for PCIe-2.
  The i.MX Linux Reference Manual shows:

i.MX 8M Quad:
• PCIe0
— PCIe host configuration space: 0x3380_0000 – 0x33bf_ffff (4Mbytes)
— PCIe device configuration space: 0x1ff0_0000 – 0x1ff7_ffff (512K bytes)
— PCIe IO space: 0x1ff8_0000 – 0x1ff8_ffff (64K bytes)
— PCIe memory space: 0x1800_0000 – 0x1fef_ffff (127M bytes)


• PCIE1
— PCIe host configuration space: 0x33c0_0000 – 0x33ff_ffff (4Mbytes)
— PCIe device configuration space: 0x27f0_0000 – 0x27f7_ffff (512K bytes)
— PCIe IO space: 0x27f8_0000 – 0x27f8_ffff (64K bytes)
— PCIe memory space: 0x2000_0000 – 0x27ef_ffff (127M bytes)

Regards,
Yuri.

0 Kudos
2,059 Views
saurav-pandya
Contributor III

Hi Yuri,

 

Thank you for your response.

 

Regards,

Saurav

0 Kudos