P1010 eTSEC1/2/3 SGMII mode configure

cancel
Showing results for 
Search instead for 
Did you mean: 

P1010 eTSEC1/2/3 SGMII mode configure

686 Views
982130864
Contributor I

Hi  all:

   I have a question to ask you for advice.I'll be configure P1010 eTSEC1 and eTSEC2 and eTSEC3 to sgmii mode,eTSEC1 is worked ok ,but eTSEC2 and eTSEC3 is not work ,Please help me look at it,and dts file all follows:

   

ethernet@b0000 {
      #address-cells = <1>;
      #size-cells = <1>;
      device_type = "network";
      model = "eTSEC";
      compatible = "fsl,etsec2";
      fsl,num_rx_queues = <0x8>;
      fsl,num_tx_queues = <0x8>;
      fsl,magic-packet;
      local-mac-address = [ 00 00 00 00 00 00 ];
      ranges;

      queue-group@b0000 {
            #address-cells = <1>;
            #size-cells = <1>;
            reg = <0xb0000 0x1000>;
            interrupts = <29 2 0 0 30 2 0 0 34 2 0 0>;
      };
};
enet0: ethernet@b0000 {
      fsl,pmc-handle = <&etsec1_clk>;
      queue-group@b0000 {
            fsl,rx-bit-map = <0xff>;
            fsl,tx-bit-map = <0xff>;
      };
};

ethernet@b1000 {
      #address-cells = <1>;
      #size-cells = <1>;
      device_type = "network";
      model = "eTSEC";
      compatible = "fsl,etsec2";
      fsl,num_rx_queues = <0x8>;
      fsl,num_tx_queues = <0x8>;
      fsl,magic-packet;
      local-mac-address = [ 00 00 00 00 00 00 ];
      ranges;

      queue-group@b1000 {
            #address-cells = <1>;
            #size-cells = <1>;
            reg = <0xb1000 0x1000>;
         i   nterrupts = <35 2 0 0 36 2 0 0 40 2 0 0>;
      };
};
enet1: ethernet@b1000 {
      fsl,pmc-handle = <&etsec2_clk>;         
      queue-group@b1000 {
            fsl,rx-bit-map = <0xff>;
            fsl,tx-bit-map = <0xff>;
      };
};

ethernet@b2000 {
      #address-cells = <1>;
      #size-cells = <1>;
      device_type = "network";
      model = "eTSEC";
      compatible = "fsl,etsec2";
      fsl,num_rx_queues = <0x8>;
      fsl,num_tx_queues = <0x8>;
      fsl,magic-packet;
      local-mac-address = [ 00 00 00 00 00 00 ];
      ranges;

      queue-group@b2000 {
            #address-cells = <1>;
            #size-cells = <1>;
            reg = <0xb2000 0x1000>;
            interrupts = <31 2 0 0 32 2 0 0 33 2 0 0>;
      };
};
enet2: ethernet@b2000 {
      fsl,pmc-handle = <&etsec3_clk>;

      queue-group@b2000 {
            fsl,rx-bit-map = <0xff>;
            fsl,tx-bit-map = <0xff>;
      };
};
global-utilities@e0000 {
         compatible = "fsl,p1010-guts";
         reg = <0xe0000 0x1000>;
         fsl,has-rstcr;
};

mdio@24000 {

      #address-cells = <1>;
      #size-cells = <0>;
      compatible = "fsl,etsec2-tbi";
      reg = <0x24000 0x1000 0xb0030 0x4>;
     

       phy0: ethernet-phy@1 {
      reg = <0x1>;
      device_type = "ethernet-phy";
      };
      phy1: ethernet-phy@2 {
      reg = <0x2>;
      device_type = "ethernet-phy";
      };
      phy2: ethernet-phy@3 {
      reg = <0x3>;
      device_type = "ethernet-phy";
      };
      tbi0: tbi-phy@1f {
      reg = <0x1f>;
      device_type = "tbi-phy";
      };
};

mdio@25000 {

      #address-cells = <1>;
      #size-cells = <0>;
      compatible = "fsl,etsec2-tbi";
      reg = <0x25000 0x1000 0xb1030 0x4>;
     

       tbi1: tbi-phy@1f {
      reg = <0x1f>;
      device_type = "tbi-phy";
      };
};

mdio@26000 {

      #address-cells = <1>;
      #size-cells = <0>;
      compatible = "fsl,etsec2-tbi";
      reg = <0x26000 0x1000 0xb2030 0x4>;
     

       tbi2: tbi-phy@1f {
      reg = <0x1f>;
      device_type = "tbi-phy";
       };
};

enet0: ethernet@b0000 {
      phy-handle = <&phy0>;
      tbi-handle = <&tbi0>;
      phy-connection-type = "sgmii";
};

enet1: ethernet@b1000 {
      phy-handle = <&phy1>;
      tbi-handle = <&tbi1>;
      phy-connection-type = "sgmii";
};

enet2: ethernet@b2000 {
      phy-handle = <&phy2>;
      tbi-handle = <&tbi2>;#
      phy-connection-type = "sgmii";
};

After dts file configuration is completed, i boot  my device,and kernel is printed as follows:

libphy: Fixed MDIO Bus: probed
libphy: Freescale PowerQUICC MII Bus: probed
libphy: Freescale PowerQUICC MII Bus: probed
libphy: Freescale PowerQUICC MII Bus: probed
fsl-gianfar ethernet.1: enabled errata workarounds, flags: 0x4
fsl-gianfar ethernet.1 eth0: mac: 00:0f:1f:10:10:00
fsl-gianfar ethernet.1 eth0: Running with NAPI enabled
fsl-gianfar ethernet.1 eth0: RX BD ring size for Q[0]: 256
fsl-gianfar ethernet.1 eth0: TX BD ring size for Q[0]: 256
fsl-gianfar ethernet.2: enabled errata workarounds, flags: 0x4
fsl-gianfar ethernet.2 eth1: mac: 00:0f:1f:10:10:01
fsl-gianfar ethernet.2 eth1: Running with NAPI enabled
fsl-gianfar ethernet.2 eth1: RX BD ring size for Q[0]: 256
fsl-gianfar ethernet.2 eth1: TX BD ring size for Q[0]: 256
fsl-gianfar ethernet.3: enabled errata workarounds, flags: 0x4
fsl-gianfar ethernet.3 eth2: mac: 00:0f:1f:10:10:02
fsl-gianfar ethernet.3 eth2: Running with NAPI enabled
fsl-gianfar ethernet.3 eth2: RX BD ring size for Q[0]: 256
fsl-gianfar ethernet.3 eth2: TX BD ring size for Q[0]: 256

....(Ignore other module printing)
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

....(Ignore other module printing)
libphy: mdio@ffe24000:01 - Link is Up - 1000/Full
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

....(Ignore other module printing)

 

Why is it that only eth0 information is printed here, without eth 1 and eth 2 information, and normally eth0/1/2 should be printed at the same time?

# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0F:1F:10:10:00
inet addr:192.168.2.5 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:55 errors:0 dropped:0 overruns:0 frame:0
TX packets:410 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8266 (8.0 KiB) TX bytes:22420 (21.8 KiB)
Base address:0x6000

#

After the kernel is started, the ifconfig command shows that only eth0 is available and worked ok. Under normal circumstances, eth0/1/2 should be all displayed. At present, the kernel source code has not been modified, only the device tree has been configured,d#oes kernel need to modify configuration or code? Please help me guide, this problem has been annoying me for a month, thank you!

0 Kudos
5 Replies

419 Views
982130864
Contributor I

Can someone help me solve it? No one is so sad. I don't know how to solve it.

0 Kudos

419 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to P1010 eTSEC1/2/3 SGMII mode configure.

If your problem remains, please attach your dts here, I will do more verification for you.


Have a great day,
TIC

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

0 Kudos

419 Views
982130864
Contributor I

HI~ Yiping Wang:

   Thank you for answering this question for me.I checked your attention items,and the information is as follows:

    in uboo-t,run "mdio list" to check the PHY address list.

    => mdio list
         FSL_MDIO:
         2 - Generic PHY <--> eTSEC2
         3 - Generic PHY <--> eTSEC3
         1 - Generic PHY <--> eTSEC1

   I can confirm that the PHY address is correct, and the PHY address configured by the device tree is also consistent.

   in linux,the operation you say is as follows:

   

# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0F:1F:10:10:00
inet addr:192.168.2.5 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Base address:0x8000

# ifconfig -a
dummy0 Link encap:Ethernet HWaddr F6:0B:20:67:5C:3F
BROADCAST NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

eth0 Link encap:Ethernet HWaddr 00:0F:1F:10:10:00
inet addr:192.168.2.5 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Base address:0x8000

eth1 Link encap:Ethernet HWaddr 00:0F:1F:10:10:01
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Base address:0xa000

eth2 Link encap:Ethernet HWaddr 00:0F:1F:10:10:02
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Base address:0xc000

lo Link encap:Local Loopback
LOOPBACK MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

sit0 Link encap:UNSPEC HWaddr 00-00-00-00-7B-B0-BF-D3-00-00-00-00-00-00-00-00
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

tunl0 Link encap:UNSPEC HWaddr 00-00-00-00-7B-B0-BF-D3-00-00-00-00-00-00-00-00
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

According to the print above, ifconfig-a can display eth0/1/2 information,and I configure the IP address 192.168.2.6 of eth1 to see link is up.

# ifconfig eth1 192.168.2.6
IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
# libphy: mdio@ffe24000:02 - Link is Up - 1000/Full
IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready


# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0F:1F:10:10:00
inet addr:192.168.2.5 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Base address:0x8000

eth1 Link encap:Ethernet HWaddr 00:0F:1F:10:10:01
inet addr:192.168.2.6 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:47 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7186 (7.0 KiB) TX bytes:690 (690.0 B)
Base address:0xa000

# ping 192.168.2.100
PING 192.168.2.100 (192.168.2.100): 56 data bytes
^C
--- 192.168.2.100 ping statistics ---
50 packets transmitted, 0 packets received, 100% packet loss

Seeing eth1 is already linkup, it is supposed to be able to Ping my computer's IP address 192.168.2.100, but Ping doesn't work,My computer firewall is closed,and I also confirm that IP is in the same network segment.There is a very important message, eth1 can ping my computer's IP address under u-boot.

The attachment is DTS source code. Please open the p1010rdb-pb.dts file to view.At present, I only configured the device tree file without modifying the kernel source code.I would like to ask you to help me with this question.Thank you very much!

0 Kudos

419 Views
982130864
Contributor I

Please give me directions. I have been waiting for a reply,thank you all!

0 Kudos

419 Views
982130864
Contributor I

Please help me guide, this problem has troubled me for a long time, very urgent, very important, has been unable to solve, thank you all!

0 Kudos