P2020 srio dtb setting,yocto1.7 ,help needed

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

P2020 srio dtb setting,yocto1.7 ,help needed

Jump to solution
1,904 Views
tianli1
Contributor II

dear experts!

I want to add srio to linux kernel for my customized P2020 board!

I am using yocto 1.7, my modification of  dtb are  as follows:

a)in p2020rdb-pc.dtsi, i added rmu:

rmu: rmu@d3000 {

    #address-cells = <1>;

    #size-cells = <1>;

    compatible = "fsl,srio-rmu";

    reg = <0xd3000 0x500>;

    ranges = <0x0 0xd3000 0x500>;

    message-unit@0 {

        compatible = "fsl,srio-msg-unit";

        reg = <0x0 0x100>;

        interrupts = <

            60 2 0 0  /* msg1_tx_irq */

            61 2 0 0>;/* msg1_rx_irq */

    };

    message-unit@100 {

        compatible = "fsl,srio-msg-unit";

        reg = <0x100 0x100>;

        interrupts = <

            62 2 0 0  /* msg2_tx_irq */

            63 2 0 0>;/* msg2_rx_irq */

    };

    doorbell-unit@400 {

        compatible = "fsl,srio-dbell-unit";

        reg = <0x400 0x80>;

        interrupts = <

            56 2 0 0  /* bell_outb_irq */

            57 2 0 0>;/* bell_inb_irq */

    };

    port-write-unit@4e0 {

        compatible = "fsl,srio-port-write-unit";

        reg = <0x4e0 0x20>;

        interrupts = <16 2 1 11>;

    };

};

b) in p2020rdb-pc_32b.dts 

1.i added:

  rio: rapidio@ffe0c0000 {

  reg = <0xf 0xfe0c0000 0 0x11000>;

  port1 {

  ranges = <0 0 0xc 0x20000000 0 0x10000000>;

  };

  };

2. comment out pci0,pci1,and pci2.

c)in p2020si-post.dtsi

1. added:

&rio {

  compatible = "fsl,srio";

  interrupts = <48 2 0 0>;

  #address-cells = <2>;

  #size-cells = <2>;

  fsl,srio-rmu-handle = <&rmu>;

  /*sleep = <&pmc 0x00080000>;*/

  ranges;

  port1 {

  #address-cells = <2>;

  #size-cells = <2>;

  cell-index = <1>;

  };

because pmc is undefined ,so i comment out this line "sleep = <&pmc 0x00080000>;"

i guess linux kernel stoped at srio driver init, the console print are as follows:

fsl-l2ctlr ffe20000.l2-cache-controller: Entire L2 as cache, provide valid sram address and size

fsl-l2ctlr: probe of ffe20000.l2-cache-controller failed with error -22

Setting up RapidIO peer-to-peer network /rapidio@ffe0c0000

fsl-of-rio ffe0c0000.rapidio: Of-device full name /rapidio@ffe0c0000

fsl-of-rio ffe0c0000.rapidio: Regs: [mem 0xffe0c0000-0xffe0d0fff]

fsl-of-rio ffe0c0000.rapidio: bellirq: 57

fsl-of-rio ffe0c0000.rapidio: pwirq: 16

fsl-of-rio ffe0c0000.rapidio: /rapidio@ffe0c0000/port1: LAW start 0x0000000c20000000, size 0x0000000010000000.

Labels (1)
0 Kudos
1 Solution
1,264 Views
tianli1
Contributor II

Have figured it out!

1.i added:

  rio: rapidio@ffe0c0000 {

  reg = <0xf 0xfe0c0000 0 0x11000>;

the register is wrong ,it should be  reg = <0x0 0xfe0c0000 0 0x11000>;

now kernel boots ok! the print are as follows:

fsl-l2ctlr: probe of ffe20000.l2-cache-controller failed with error -22

Setting up RapidIO peer-to-peer network /rapidio@0xffec0000

fsl-of-rio ffec0000.rapidio: Of-device full name /rapidio@0xffec0000

fsl-of-rio ffec0000.rapidio: Regs: [mem 0xffec0000-0xffed0fff]

fsl-of-rio ffec0000.rapidio: bellirq: 50

fsl-of-rio ffec0000.rapidio: pwirq: 48

fsl-of-rio ffec0000.rapidio: /rapidio@0xffec0000/port2: LAW start 0x0000000c20000000, size 0x0000000010000000.

fsl-of-rio ffec0000.rapidio: RapidIO PHY type: Serial

fsl-of-rio ffec0000.rapidio: Hardware port width: 4

fsl-of-rio ffec0000.rapidio: Training connection status: Four-lane

fsl-of-rio ffec0000.rapidio: RapidIO Common Transport System size: 256

/soc@ffe00000/rmu@d3000/message-unit@100: txirq: 55, rxirq 56

anybody knows how to use srio to write  another device? how to develop the application?

View solution in original post

0 Kudos
5 Replies
1,264 Views
Pavel
NXP Employee
NXP Employee
0 Kudos
1,264 Views
liguofa
Contributor III

Thank you Pavel Chubakov,I have a question about how to use rapidio demo on p2020.did there any demo about how to use rapidio on p2020 which use linux kernel 3.12.And I use Yocto SDK 1.8 。I found SDK only have a rionet demo and i want a demo which like rmu in usdpaa-apps? Did there any? Sorry for my little English!

0 Kudos
1,265 Views
tianli1
Contributor II

Have figured it out!

1.i added:

  rio: rapidio@ffe0c0000 {

  reg = <0xf 0xfe0c0000 0 0x11000>;

the register is wrong ,it should be  reg = <0x0 0xfe0c0000 0 0x11000>;

now kernel boots ok! the print are as follows:

fsl-l2ctlr: probe of ffe20000.l2-cache-controller failed with error -22

Setting up RapidIO peer-to-peer network /rapidio@0xffec0000

fsl-of-rio ffec0000.rapidio: Of-device full name /rapidio@0xffec0000

fsl-of-rio ffec0000.rapidio: Regs: [mem 0xffec0000-0xffed0fff]

fsl-of-rio ffec0000.rapidio: bellirq: 50

fsl-of-rio ffec0000.rapidio: pwirq: 48

fsl-of-rio ffec0000.rapidio: /rapidio@0xffec0000/port2: LAW start 0x0000000c20000000, size 0x0000000010000000.

fsl-of-rio ffec0000.rapidio: RapidIO PHY type: Serial

fsl-of-rio ffec0000.rapidio: Hardware port width: 4

fsl-of-rio ffec0000.rapidio: Training connection status: Four-lane

fsl-of-rio ffec0000.rapidio: RapidIO Common Transport System size: 256

/soc@ffe00000/rmu@d3000/message-unit@100: txirq: 55, rxirq 56

anybody knows how to use srio to write  another device? how to develop the application?

0 Kudos
1,264 Views
Pavel
NXP Employee
NXP Employee
0 Kudos
1,264 Views
liguofa
Contributor III

@khumphri‌@Pavel Chubakov

excause me,The page have missing? can tell where i can find the lastest?

0 Kudos