MSI configuration (DTS)T2080RDB

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

MSI configuration (DTS)T2080RDB

2,567 Views
manoloruiz
Contributor III

Hi,

I have a PCI device and I want that it work with MSI interrupts. However, I do not know what should I type in my device tree in order to get it. This is what I have now from SDK 2.0:

pcie@ffe270000 {

  reg = <0xf 0xfe270000 0x0 0x10000>;

  ranges = <0x2000000 0x0 0x80000000 0xc 0x80000000 0x0 0x80000000 0x1000000 0x0 0x0 0xf 0xf8030000 0x0 0x10000>;

  dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x8000>;

  compatible = "fsl,t2080-pcie", "fsl,qoriq-pcie-v3.0", "fsl,qoriq-pcie";

  device_type = "pci";

  #size-cells = <0x2>;

  #address-cells = <0x3>;

  bus-range = <0x0 0xff>;

  interrupts = <0x17 0x2 0x0 0x0>;

  fsl,iommu-parent = <0x24>;

  pcie@0 {

  ranges = <0x2000000 0x0 0x80000000 0x2000000 0x0 0x80000000 0x0 0x80000000 0x1000000 0x0 0x0 0x1000000 0x0 0x0 0x0 0x10000>;

  reg = <0x0 0x0 0x0 0x0 0x0>;

  #interrupt-cells = <0x1>;

  #size-cells = <0x2>;

  #address-cells = <0x3>;

  device_type = "pci";

  interrupts = <0x17 0x2 0x0 0x0>;

  interrupt-map-mask = <0xf800 0x0 0x0 0x7>;

  interrupt-map = <0x0 0x0 0x0 0x1 0x1 0x2b 0x1 0x0 0x0 0x0 0x0 0x0 0x2 0x1 0x0 0x1 0x0 0x0 0x0 0x0 0x0 0x3 0x1 0x4 0x1 0x0 0x0 0x0 0x0 0x0 0x4 0x1 0x8 0x1 0x0 0x0>;

  };

  };

What should I modify?

Labels (1)
Tags (2)
0 Kudos
16 Replies

1,437 Views
nicolaerosia_rd
Contributor I

NXP, can we get an answer on this? I have the same problem on T1042.

While pci_msi_vec_count returns 8, pci_enable_msi_range with minvec 8 and maxvec 8 returns -ENOSPC. Does the driver support multiple interrupts with MSI ?

0 Kudos

1,437 Views
ufedor
NXP Employee
NXP Employee

What does it mean - to perform multiple MSI interrupts?

0 Kudos

1,437 Views
ufedor
NXP Employee
NXP Employee

I believe that it will be more convenient to create new question concerning the MSI implementation in Linux because original one was about DTS.

0 Kudos

1,437 Views
manoloruiz
Contributor III

Okey. Thank very much for your support. My last question is about dts. It is necessary modify my dts in order to perform multiple MSI interrupts?

0 Kudos

1,437 Views
manoloruiz
Contributor III

The real question is:Is the T2080RDB support multiple MSI interrupts? If the answer is yes, where Am I wrong?

0 Kudos

1,437 Views
manoloruiz
Contributor III

I have a FPGA. You can see the following information:

0002:01:00.0 Memory controller: Xilinx Corporation Device 7022

        Subsystem: Xilinx Corporation Device 0007

        Flags: bus master, fast devsel, latency 0, IRQ 17

        Memory at c80000000 (64-bit, prefetchable) [size=1G]

        Memory at ce0000000 (64-bit, prefetchable) [size=64K]

        Capabilities: [40] Power Management version 3

        Capabilities: [48] MSI: Enable- Count=1/4 Maskable- 64bit+

        Capabilities: [60] Express Endpoint, MSI 00

        Capabilities: [100] Device Serial Number 00-00-00-00-00-00-00-00

As you can see, it has MSI properties. I am building a driver in order to activate MSI interrupt. In kernel 3.12.37 I do the following:

      PCIret = pci_enable_msi_block(pcidev,64);

     printk(KERN_ALERT "pci_enable_block=%i\n",PCIret);// the result is PCIret =4.

        PCIret = request_irq(pcidev->irq, InterrupcionFPGA_Virtex1, 0, "FPGA_0", pcidev);

        if (PCIret==0)

        {

                printk(KERN_ALERT "everything right\n");

        }

        else

        {

                printk(KERN_ALERT "error: %i\n",PCIret);

        }

        PCIret = request_irq(pcidev->irq+1, InterrupcionFPGA_Virtex2, 0, "FPGA_1", pcidev);

        if (PCIret==0)

        {

                printk(KERN_ALERT "everything right\n");

        }

        else

        {

                printk(KERN_ALERT "error: %i\n",PCIret);

        }

But is not working. I do not have 2 MSI interrupt. I am only able to get one MSI interrupt with:

PCIret = pci_enable_msi(pcidev);

Should I type anything in my dtb? Are there any error in my driver?

BR

0 Kudos

1,437 Views
ufedor
NXP Employee
NXP Employee

What is your application/system?

0 Kudos

1,437 Views
manoloruiz
Contributor III

I changed /include/ "qoriq-mpic.dtsi" to /include/ "qoriq-mpic4.3.dtsi" in the file t2081si-post.dtsi in SDK 1.8. and I was able to compile the dtb.

0 Kudos

1,437 Views
ufedor
NXP Employee
NXP Employee

Were you able to compile the DTB?

0 Kudos

1,437 Views
ufedor
NXP Employee
NXP Employee

From the previous post:

> ~/QorIQ-SDK-V2.0-20160527-yocto

Now you wrote:

"I am using sdk 1.8"

Please clarify.

0 Kudos

1,437 Views
manoloruiz
Contributor III

Hi.

I tried in both of them.

I tried the function "pci_enable_msi_block(struct pci_dev *dev, int count)" in sdk 1.8 (kernel 3.12.37)

I tried the function "pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec)" in sdk 2.0 (kernel 4.1)

Neither of the work properly. I am wondering wether the problem is in my dtb or in my device driver.

Best regards

0 Kudos

1,437 Views
manoloruiz
Contributor III

I changed /include/ "qoriq-mpic.dtsi" to /include/ "qoriq-mpic4.3.dtsi" in the file t2081si-post.dtsi.

Is that correct? I am using sdk 1.8

0 Kudos

1,437 Views
ufedor
NXP Employee
NXP Employee

It is needed to add the following line to the DTS:

/include/ "qoriq-mpic4.3.dtsi"

0 Kudos

1,437 Views
manoloruiz
Contributor III

Thanks for your answer. I did what you ask. I add in the file t2080rdb.dts the following line:

/include/ "qoriq-mpic4.3.dtsi"

However I get the following error:

~/QorIQ-SDK-V2.0-20160527-yocto/build_t2080rdb/tmp/work/t2080rdb-fsl-linux/linux-qoriq/4.1-r0/git/arch/powerpc/boot/dts/fsl$ dtc -O dtb -o nuevo10.dtb t2080rdb.dts

Error: qoriq-mpic4.3.dtsi:35.1-6 syntax error

FATAL ERROR: Unable to parse input tree

Any idea?

0 Kudos

1,437 Views
manoloruiz
Contributor III

Any idea how to solve this problem?

0 Kudos

1,437 Views
manoloruiz
Contributor III

Any idea?

0 Kudos