Dear NXP Friends,
I am working Ethernet on T4160RDB-64B machine. I am unable to configure phy in dts file. Here I explain what I done in dts file and if I anything wrong please correct me.
Configure phy address in Serdes1 [SD1] and Serders2 [SD2]
Phy 0 connect with Serdes1 of Lane4 SD1 [4]
Phy 1 connect with Serdes1 of Lane5 SD2 [5]
Phy 17 connect with Serdes2 of Lane4 SD2 [4]
Phy 19 connect with Serdes2 of Lane5 SD2 [5]
In Dts file,
fman0: fman@400000 {
/*Phy 0 connect with Serdes1 of Lane4 SD1 [4] */
/* fm1-mac1 */
enet0: ethernet@e0000 {
phy-handle = <&sgmiiphy21>;
phy-connection-type = "sgmii";
};
/*Phy 1 connect with Serdes1 of Lane5 SD2 [5] */
/* fm1-mac2 */
enet1: ethernet@e2000 {
phy-handle = <&sgmiiphy22>;
phy-connection-type = "sgmii";
};
enet2: ethernet@e4000 {
phy-handle = <&sgmiiphy23>;
phy-connection-type = "sgmii";
};
enet3: ethernet@e6000 {
phy-handle = <&sgmiiphy24>;
phy-connection-type = "sgmii";
};
enet4: ethernet@e8000 {
status = "disabled";
};
enet5: ethernet@ea000 {
status = "disabled";
};
enet6: ethernet@f0000 { /* FM1@TSEC9/FM1@TGEC1 */
phy-handle = <&xfiphy1>;
phy-connection-type = "xgmii";
};
enet7: ethernet@f2000 { /* FM1@TSEC10/FM1@TGEC2 */
phy-handle = <&xfiphy2>;
};
mdio@fc000 {
status = "okay";
};
mdio@fd000 {
status = "okay";
};
fman0_oh2 {
status = "okay";
};
fman0_oh3 {
status = "okay";
};
fman0_oh4 {
status = "okay";
};
fman0_oh5 {
status = "okay";
};
fman0_oh6 {
status = "okay";
};
};
fman1: fman@500000 {
/* Phy 17 connect with Serdes2 of Lane4 SD2 [4] */
/* fm2-mac9*/
enet8: ethernet@e0000 {
phy-handle = <&sgmiiphy41>;
phy-connection-type = "sgmii";
};
/*Phy 19 connect with Serdes2 of Lane5 SD2 [5] */
/fm2-mac10*/
enet9: ethernet@e2000 {
phy-handle = <&sgmiiphy42>;
phy-connection-type = "sgmii";
};
enet10: ethernet@e4000 {
phy-handle = <&sgmiiphy43>;
phy-connection-type = "sgmii";
};
enet11: ethernet@e6000 {
phy-handle = <&sgmiiphy44>;
phy-connection-type = "sgmii";
};
enet12: ethernet@e8000 {
status = "disabled";
};
enet13: ethernet@ea000 {
status = "disabled";
};
enet14: ethernet@f0000 { /* FM2@TSEC9/FM2@TGEC1 */
phy-handle = <&xfiphy3>;
phy-connection-type = "xgmii";
};
enet15: ethernet@f2000 { /* FM2@TSEC10/FM2@TGEC2 */
phy-handle = <&xfiphy4>;
phy-connection-type = "xgmii";
};
mdio0: mdio@fc000 {
sgmiiphy21: ethernet-phy@0 {
reg = <0x0>;
};
sgmiiphy22: ethernet-phy@1 {
reg = <0x1>;
};
sgmiiphy23: ethernet-phy@2 {
reg = <0x5>;
};
sgmiiphy24: ethernet-phy@3 {
reg = <0x7>;
};
sgmiiphy41: ethernet-phy@4 {
reg = <0x17>;
};
sgmiiphy42: ethernet-phy@5 {
reg = <0x19>;
};
sgmiiphy43: ethernet-phy@6 {
reg = <0x1a>;
};
sgmiiphy44: ethernet-phy@7 {
reg = <0x1b>;
};
};
After this in Kernel console done ip configuration for Phy 19 and start ping test,
root@t4240rdb:~# ifconfig fm2-mac9 192.168.0.130 netmask 255.255.255.0
root@t4240rdb:~# ifconfig fm2-mac9
fm2-mac9 Link encap:Ethernet HWaddr 00:e0:0c:00:7a:0a
inet addr:192.168.0.130 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:cff:fe00:7a0a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:648 (648.0 B)
Memory:ffe5f0000-ffe5f0fff
root@t4240rdb:~#
root@t4240rdb:~#
root@t4240rdb:~#
root@t4240rdb:~# ethtool fm2-mac9
Settings for fm2-mac9:
Supported ports: [ ]
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: No
Advertised link modes: 10000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: No
Speed: 10000Mb/s
Duplex: Full
Port: MII
PHYAD: 19
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
root@t4240rdb:~#
root@t4240rdb:~#
root@t4240rdb:~#
root@t4240rdb:~# ping 192.168.0.128
PING 192.168.0.128 (192.168.0.128) 56(84) bytes of data.
From 192.168.0.130 icmp_seq=1 Destination Host Unreachable
From 192.168.0.130 icmp_seq=2 Destination Host Unreachable
From 192.168.0.130 icmp_seq=3 Destination Host Unreachable
From 192.168.0.130 icmp_seq=4 Destination Host Unreachable
From 192.168.0.130 icmp_seq=5 Destination Host Unreachable
^C
I got "Destination Host Unreachable" Where I missing ?
Regards, VinothS
Regards,
Vinothkumar Sekar