Need to do ping between MAC-MAC with out phy through SGMII

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

Need to do ping between MAC-MAC with out phy through SGMII

Jump to solution
5,729 Views
ramakrishnakatt
Contributor II

We have two routers in same chassis. we need to test communication between 2 routers. we have 4 SGMII interfaces. 2 are connected between CPU-FPGA. Another SGMMI between two routers. currently we are using free scale processor T1040 and kernel 3.8.13. I have changed dts file as fallows.  Once the system up on two machines I am trying to ping with eth2 (eth0 and eth1 are used by CPU-FPGA). But I am not getting any response. I am attaching 2 dts files,

 

Pass case:

fsl_mac: fsl_mac: FSL FMan MAC API based driver ()

fsl_mac ffb4e0000.ethernet: FMan MEMAC

fsl_mac ffb4e0000.ethernet: FMan MAC address: 00:22:bd:dd:e7:8a

fsl_mac ffb4e2000.ethernet: FMan MEMAC

fsl_mac ffb4e2000.ethernet: FMan MAC address: 00:04:9f:03:05:e5

fsl_mac ffb4e4000.ethernet: FMan MEMAC

fsl_mac ffb4e4000.ethernet: FMan MAC address: 00:00:04:9f:03:05

fsl_mac ffb4e6000.ethernet: FMan MEMAC

fsl_mac ffb4e6000.ethernet: FMan MAC address: 00:04:9f:03:05:e7

Fail case:

fsl_mac ffb4e0000.ethernet: of_get_mac_address(/soc@ffb000000/fman@400000/ethernet@e0000) failed

fsl_mac: probe of ffb4e0000.ethernet failed with error -22

fsl_mac ffb4e2000.ethernet: of_get_mac_address(/soc@ffb000000/fman@400000/ethernet@e2000) failed

fsl_mac: probe of ffb4e2000.ethernet failed with error -22

fsl_mac ffb4e4000.ethernet: of_get_mac_address(/soc@ffb000000/fman@400000/ethernet@e4000) failed

fsl_mac: probe of ffb4e4000.ethernet failed with error -22

fsl_mac ffb4e6000.ethernet: FMan MEMAC

fsl_mac ffb4e6000.ethernet: FMan MAC address: 00:04:9f:03:05:e7

fsl_dpa: FSL DPAA Ethernet driver ()

fsl_dpa ethernet.16: dev_get_drvdata(ffb4e0000.ethernet) failed

fsl_dpa: probe of ethernet.16 failed with error -22

fsl_dpa ethernet.17: dev_get_drvdata(ffb4e2000.ethernet) failed

fsl_dpa: probe of ethernet.17 failed with error -22

fsl_dpa ethernet.18: dev_get_drvdata(ffb4e4000.ethernet) failed

fsl_dpa: probe of ethernet.18 failed with error -22

fsl_dpa: fsl_dpa: Probed interface eth0

fsl_dpa_shared: FSL DPAA Shared Ethernet driver ()

fsl_dpa_proxy: FSL DPAA Proxy initialization driver ()

fsl_oh: FSL FMan Offline Parsing port driver ()

Other than dts file changes do I need to do changes in phy driver file to tweek eth2.

Original Attachment has been moved to: non-working.dts.txt.zip

Original Attachment has been moved to: working.dts.txt.zip

Labels (1)
1 Solution
3,204 Views
lunminliang
NXP Employee
NXP Employee

Hi,

From the working .dts file provided, it seems sg.m3 is on MDIO bus:

mdio0: mdio@fc000 {

                                phy_sgmii_2: ethernet-phy@03 {

                                        reg = <0x03>;

                                };

So my question is about the hardware, does Serdes lane B routed to PHY or to chasis?


Have a great day,
Lunmin


-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
10 Replies
3,204 Views
ramakrishnakatt
Contributor II

after assigning ip address the link was up, but ping is failing. that is our requirement. as a said this one MAC-MAC

0 Kudos
Reply
3,204 Views
ramakrishnakatt
Contributor II

Please ignore earlier dts, Now i have modifed dts and made eth2 as fixed-link. it is coming up fine. I have pasted new dts at end.

Once the linux up if I use.

root@t1040rdb:/media/ram# ethtool eth2

Settings for eth2:

        Supported ports: [ ]

        Supported link modes:   Not reported

        Supported pause frame use: No

        Supports auto-negotiation: No

        Advertised link modes:  Not reported

        Advertised pause frame use: No

        Advertised auto-negotiation: No

        Speed: Unknown!

        Duplex: Half

        Port: Twisted Pair

        PHYAD: 0

        Transceiver: internal

Auto-negotiation: off

        MDI-X: Unknown

        Current message level: 0xffffffff (-1)

                               drv probe link timer ifdown ifup rx_err tx_err tx_queued intr tx_done rx_status pktdata hw wol 0xffff8000

        Link detected: no

If I assign ip address

root@t1040rdb:/media/ram# ifconfig eth2 5.55.11.39

root@t1040rdb:/media/ram# route add default gw 5.55.0.1 eth2

root@t1040rdb:/media/ram# ethtool eth2

Settings for eth2:

        Supported ports: [ MII ]

        Supported link modes:   1000baseT/Full

        Supported pause frame use: No

        Supports auto-negotiation: Yes

        Advertised link modes:  1000baseT/Full

        Advertised pause frame use: No

        Advertised auto-negotiation: Yes

        Speed: Unknown!

        Duplex: Unknown! (255)

        Port: MII

        PHYAD: 3

        Transceiver: external

Auto-negotiation: on

        Current message level: 0xffffffff (-1)

                               drv probe link timer ifdown ifup rx_err tx_err tx_queued intr tx_done rx_status pktdata hw wol 0xffff8000

        Link detected: yes

ifconfig eth2

ifconfig eth2 5.55.11.39

route add default gw 5.55.0.1 eth2

ethtool eth2

ethtool -s eth2 autoneg off

ethtool eth2

netstat -rn

ping 5.55.11.34

Same process i am doing on other router but still ping failing between two routers

Current DTS file:

           fman0: fman@400000 {

                        enet0: ethernet@e0000 {

                                fixed-link = <0 1 1000 0 0>;

                                phy-connection-type = "sgmii";

                        };

                        enet1: ethernet@e2000 {

                                fixed-link = <1 1 1000 0 0>;

                                phy-connection-type = "sgmii";

                        };

                        enet2: ethernet@e4000 {

                                fixed-link = <3 1 1000 0 0>;

                                phy-connection-type = "sgmii";

                        };

                        enet3: ethernet@e6000 {

                                phy-handle = <&phy_rgmii_0>;

                                phy-connection-type = "rgmii";

                        };

                        enet4: ethernet@e8000 {

                                phy-handle = <&phy_rgmii_1>;

                                phy-connection-type = "rgmii";

                        };

                        mdio0: mdio@fc000 {

                                phy_sgmii_2: ethernet-phy@03 {

                                        reg = <0x03>;

                                };

                               phy_rgmii_0: ethernet-phy@01 {

                                        reg = <0x01>;

                                };

                                phy_rgmii_1: ethernet-phy@02 {

                                        reg = <0x02>;

                                };

                        };

                };

        };

     fsl,dpaa {

                compatible = "fsl,t1040-dpaa", "fsl,dpaa";

                ethernet@0 {

                        compatible = "fsl,t1040-dpa-ethernet", "fsl,dpa-ethernet";

                        fsl,fman-mac = <&enet0>;

                };

                ethernet@1 {

                        compatible = "fsl,t1040-dpa-ethernet", "fsl,dpa-ethernet";

                        fsl,fman-mac = <&enet1>;

                };

                ethernet@2 {

                        compatible = "fsl,t1040-dpa-ethernet", "fsl,dpa-ethernet";

                        fsl,fman-mac = <&enet2>;

                };

                ethernet@3 {

                        compatible = "fsl,t1040-dpa-ethernet", "fsl,dpa-ethernet";

                        fsl,fman-mac = <&enet3>;

                };

                ethernet@4 {

                        compatible = "fsl,t1040-dpa-ethernet", "fsl,dpa-ethernet";

                        fsl,fman-mac = <&enet4>;

                };

        };

0 Kudos
Reply
3,204 Views
lunminliang
NXP Employee
NXP Employee

And you wrote:

"mdio0: mdio@fc000 {

                                phy_sgmii_2: ethernet-phy@03 {

                                        reg = <0x03>;

                                }

This does not connected to PHY. It is connected to other RSP." ====> How? Please clarify to help understanding. Thanks.

0 Kudos
Reply
3,204 Views
lunminliang
NXP Employee
NXP Employee

So one router eth2 has ip 5. 55.11.39 and another is 5.55.11.34? What's eth3 dedicated for?

What's the interface of router to chassis? Can you please clarify this? Thanks.

0 Kudos
Reply
3,204 Views
ramakrishnakatt
Contributor II

Hi Lumin,

Thanks for your reply, we are using T1040 eval board dts file, because of that we have not done any clean up.

In the

phy_rgmii_0: ethernet-phy@01 {

                                        reg = <0x01>;

                                };

This is for Marvell PHY.

as you asked

mdio0: mdio@fc000 {

                                phy_sgmii_2: ethernet-phy@03 {

                                        reg = <0x03>;

                                }

This does not connected to PHY. It is connected to other RSP.

I have modified dts file in clean way. PFA. But with this dts also I am getting same error

fsl_mac ffb4e0000.ethernet: of_get_mac_address(/soc@ffb000000/fman@400000/ethernet@e0000) failed

fsl_mac: probe of ffb4e0000.ethernet failed with error -22

fsl_mac ffb4e2000.ethernet: of_get_mac_address(/soc@ffb000000/fman@400000/ethernet@e2000) failed

fsl_mac: probe of ffb4e2000.ethernet failed with error -22

fsl_mac ffb4e4000.ethernet: of_get_mac_address(/soc@ffb000000/fman@400000/ethernet@e4000) failed

fsl_mac: probe of ffb4e4000.ethernet failed with error -22

fsl_mac ffb4e6000.ethernet: FMan MEMAC

AS i said earlier we have 4 SGMII ports 2 SGMII ports connected to CPU to FPGA. 1 SGMII connected between 2 routers


0 Kudos
Reply
3,204 Views
ramakrishnakatt
Contributor II

include/ "fsl/t104xsi-pre.dtsi"

/ {

        model = "fsl,T1040RDB";

        compatible = "fsl,T1040RDB";

        #address-cells = <2>;

        #size-cells = <2>;

        interrupt-parent = <&mpic>;

        aliases {

                phy_rgmii_0 = &phy_rgmii_0;

                phy_rgmii_1 = &phy_rgmii_1;

                phy_sgmii_2 = &phy_sgmii_2;

        };

        memory {

                device_type = "memory";

        };

        dcsr: dcsr@f00000000 {

                ranges = <0x00000000 0xf 0x00000000 0x01072000>;

        };

        bportals: bman-portals@ff4000000 {

                ranges = <0x0 0xf 0xf4000000 0x2000000>;

        };

        qportals: qman-portals@ff6000000 {

                ranges = <0x0 0xf 0xf6000000 0x2000000>;

        };

  soc: soc@ffb000000 {

                ranges = <0x00000000 0xf 0xfb000000 0x1000000>;

                reg = <0xf 0xfb000000 0 0x00001000>;

                i2c@118100 {

                        pca9546@77 {

                                compatible = "philips,pca9546";

                                reg = <0x77>;

                                #address-cells = <1>;

                                #size-cells = <0>;

                        };

                };

                spi@110000 {

                        flash@0 {

                                #address-cells = <1>;

                                #size-cells = <1>;

                                compatible = "micron,n25q512a";

                                reg = <0>;

                                spi-max-frequency = <10000000>; /* input clock */

                        };

                };

                fman0: fman@400000 {

                        enet0: ethernet@e0000 {

                                fixed-link = <0 1 1000 0 0>;

                                phy-connection-type = "sgmii";

                        };

                        enet1: ethernet@e2000 {

    fixed-link = <1 1 1000 0 0>;

                                phy-connection-type = "sgmii";

                        };

                        enet2: ethernet@e4000 {

                                phy-handle = <&phy_sgmii_2>;

                                phy-connection-type = "sgmii";

                        };

                        enet3: ethernet@e6000 {

                                phy-handle = <&phy_rgmii_0>;

                                phy-connection-type = "rgmii";

                        };

                        enet4: ethernet@e8000 {

                                phy-handle = <&phy_rgmii_1>;

                                phy-connection-type = "rgmii";

                        };

                        mdio0: mdio@fc000 {

                                phy_sgmii_2: ethernet-phy@03 {

                                        reg = <0x03>;

                                };

                                phy_rgmii_0: ethernet-phy@01 {

                                        reg = <0x01>;

                                };

                                phy_rgmii_1: ethernet-phy@02 {

                                        reg = <0x02>;

                                };

                        };

               };

        };

        pci0: pcie@ffb240000 {

                reg = <0xf 0xfb240000 0 0x10000>;

                ranges = <0x02000000 0 0xe0000000 0x0 0xe0000000 0x0 0x10000000>;

        };

        pci1: pcie@ffb250000 {

                reg = <0xf 0xfb250000 0 0x10000>;

                ranges = <0x02000000 0 0xf0000000 0x0 0xf0000000 0 0x40000000>;

        };

        pci2: pcie@ffb260000 {

                reg = <0xf 0xfb260000 0 0x10000>;

                ranges = <0x02000000 0 0xe0000000 0x0 0x20000000 0 0x10000000>;

        };

        pci3: pcie@ffb270000 {

                reg = <0xf 0xfb270000 0 0x10000>;

                ranges = <0x02000000 0 0xe0000000 0x0 0xb0000000 0 0x10000000>;

        };

        fsl,dpaa {

                compatible = "fsl,t1040-dpaa", "fsl,dpaa";

                ethernet@0 {

                        compatible = "fsl,t1040-dpa-ethernet", "fsl,dpa-ethernet";

                        fsl,fman-mac = <&enet0>;

                };

                ethernet@1 {

                        compatible = "fsl,t1040-dpa-ethernet", "fsl,dpa-ethernet";

                        fsl,fman-mac = <&enet1>;

                };

                ethernet@2 {

                        compatible = "fsl,t1040-dpa-ethernet", "fsl,dpa-ethernet";

                        fsl,fman-mac = <&enet2>;

                };

      ethernet@3 {

                        compatible = "fsl,t1040-dpa-ethernet", "fsl,dpa-ethernet";

                        fsl,fman-mac = <&enet3>;

                };

                ethernet@4 {

                        compatible = "fsl,t1040-dpa-ethernet", "fsl,dpa-ethernet";

                        fsl,fman-mac = <&enet4>;

                };

        };

};

/include/ "fsl/t1040si-post.dtsi"

/include/ "fsl/qoriq-dpaa-res3.dtsi"

0 Kudos
Reply
3,204 Views
lunminliang
NXP Employee
NXP Employee

One more question, for the working.dts you provided, do you mean all those links are up, or you can ping from one router to another on eth2?

0 Kudos
Reply
3,204 Views
lunminliang
NXP Employee
NXP Employee

Hi,

You wrote "We have two routers in same chassis."

and

"mdio0: mdio@fc000 {

                                phy_sgmii_2: ethernet-phy@03 {

                                        reg = <0x03>;

                                }

This does not connected to PHY. It is connected to other RSP.

"

Then what's the interface to other RSP? The interface on the chassis? Are you using two identical routers? which is based on T1040. Please provide more detail information. A graphic may be useful.

Regards

Lunmin

0 Kudos
Reply
3,204 Views
lunminliang
NXP Employee
NXP Employee

Hi,

Is this dts the one after you modified? "I have modified dts file in clean way".


Have a great day,

Lunmin

0 Kudos
Reply
3,205 Views
lunminliang
NXP Employee
NXP Employee

Hi,

From the working .dts file provided, it seems sg.m3 is on MDIO bus:

mdio0: mdio@fc000 {

                                phy_sgmii_2: ethernet-phy@03 {

                                        reg = <0x03>;

                                };

So my question is about the hardware, does Serdes lane B routed to PHY or to chasis?


Have a great day,
Lunmin


-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply