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
解決済! 解決策の投稿を見る。
Hello vinothkumar s,
You need to modify the PHY addresses according to your custom board in u-boot.
Please refer to the following section in board/freescale/t4rdb/eth.c.
if ((srds_prtcl_s1 == 28) || (srds_prtcl_s1 == 27)) {
/* SGMII */
fm_info_set_phy_address(FM1_DTSEC1, SGMII_PHY_ADDR1);
fm_info_set_phy_address(FM1_DTSEC2, SGMII_PHY_ADDR2);
fm_info_set_phy_address(FM1_DTSEC3, SGMII_PHY_ADDR3);
fm_info_set_phy_address(FM1_DTSEC4, SGMII_PHY_ADDR4);
} else {
puts("Invalid SerDes1 protocol for T4240RDB\n");
}
Please modify the SGMII PHY addresses according to your target board in include/configs/T4240RDB.h.
#define SGMII_PHY_ADDR1 0x0
#define SGMII_PHY_ADDR2 0x1
#define SGMII_PHY_ADDR3 0x2
#define SGMII_PHY_ADDR4 0x3
#define SGMII_PHY_ADDR5 0x4
#define SGMII_PHY_ADDR6 0x5
#define SGMII_PHY_ADDR7 0x6
#define SGMII_PHY_ADDR8 0x7
#define FM1_10GEC1_PHY_ADDR 0x10
#define FM1_10GEC2_PHY_ADDR 0x11
#define FM2_10GEC1_PHY_ADDR 0x12
#define FM2_10GEC2_PHY_ADDR 0x13
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hello vinothkumar s,
The memory map of fm2-mac9 is ffe5f0000-ffe5f0fff, the corresponding device node should be as the following.
enet14: ethernet@f0000 { /* FM2@TSEC9/FM2@TGEC1 */
phy-handle = <&xfiphy3>;
phy-connection-type = "xgmii";
};
The device node connecting to PHY 19 should be as the following,
enet9: ethernet@e2000 {
phy-handle = <&sgmiiphy42>;
phy-connection-type = "sgmii";
};
Probably it is is fm2-mac2, please use "ifconfig -a" command to list all the Ethernet ports and check the Memory map.
fm2-mac2 Link encap:Ethernet HWaddr 00:e0:0c:00:35:09
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)
Memory:ffe5e2000-ffe5e2fff
Please check whether the Ethernet port connecting to PHY 19 can work normally under u-boot.
Under u-boot, please type "=> mdio list" to check which Ethernet interface connecting to PHY 19, then configure u-boot environment variables "ethact" and "ipaddr" to check whether ping can work normally.
If your problem remains, please send you u-boot console log and dts file to me to do more investigation.
Thanks,
Yiping
Hi Yiping Wang,
I cleared now and able to ping u-boot as well as kernel for Phy0 and now I working on Phy5
=> mdio list
FSL_MDIO0:
0 - Marvell 88E1512 <--> FM1@DTSEC1
5 - Marvell 88E1322 <--> FM1@DTSEC3
7 - Marvell 88E1322 <--> FM1@DTSEC4
27 - Generic PHY <--> FM2@DTSEC4
FM_TGEC_MDIO:
0 - Generic 10G PHY <--> FM2@TGEC1
For phy0,
For Phy 5,
label : ETH0
u-boot : FM1@DTSEC1
linux :FM1-MAC1
=> ping 192.168.0.200
Using FM1@DTSEC1 device
host 192.168.0.200 is alive
root@t4240rdb:~# ifconfig fm1-mac1 192.168.0.230 netmask 255.255.255.0
root@t4240rdb:~# erandom: nonblocking pool is initialized
thtool fm1-mac1
Settings for fm1-mac1:
Supported ports: [ MII ]
Supported link modes: 10baseT/Full
100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Full
100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Link partner advertised pause frame use: No
Link partner advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 0
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
For Phy 5,
label : ETH2
u-boot : FM1@DTSEC3
linux :FM1-MAC 3
but, i am unable to create request,
=> ping 192.168.0.200
Using FM1@DTSEC3 device
ARP Retry count exceeded; starting again
ping failed; host 192.168.0.200 is not alive
I checked in wireshark the request not reaching the server PC
Regards, VinothS
Hi,
PHY detected successfully but unable to ping
=> mdio list
FSL_MDIO0:
0 - Marvell 88E1512 <--> FM1@DTSEC1 => able to access the phy and ping
5 - Marvell 88E1322 <--> FM1@DTSEC3 => able to access the phy and unable to ping
7 - Marvell 88E1322 <--> FM1@DTSEC4 => able to access the phy and unable to ping
27 - Generic PHY <--> FM2@DTSEC4
FM_TGEC_MDIO:
0 - Generic 10G PHY <--> FM2@TGEC1
=> mii info
PHY 0x00: OUI = 0x5043, Model = 0x1D, Rev = 0x01, 10baseT, HDX
PHY 0x04: OUI = 0x5043, Model = 0x1C, Rev = 0x00, 10baseT, HDX
PHY 0x05: OUI = 0x5043, Model = 0x1C, Rev = 0x00, 1000baseT, FDX
PHY 0x06: OUI = 0x5043, Model = 0x1C, Rev = 0x00, 10baseT, HDX
What could be the issue? and I checked everything there is no MUX pin configuration apart from RCW.
Regards VinothS
Hello vinothkumar s,
You need to modify the PHY addresses according to your custom board in u-boot.
Please refer to the following section in board/freescale/t4rdb/eth.c.
if ((srds_prtcl_s1 == 28) || (srds_prtcl_s1 == 27)) {
/* SGMII */
fm_info_set_phy_address(FM1_DTSEC1, SGMII_PHY_ADDR1);
fm_info_set_phy_address(FM1_DTSEC2, SGMII_PHY_ADDR2);
fm_info_set_phy_address(FM1_DTSEC3, SGMII_PHY_ADDR3);
fm_info_set_phy_address(FM1_DTSEC4, SGMII_PHY_ADDR4);
} else {
puts("Invalid SerDes1 protocol for T4240RDB\n");
}
Please modify the SGMII PHY addresses according to your target board in include/configs/T4240RDB.h.
#define SGMII_PHY_ADDR1 0x0
#define SGMII_PHY_ADDR2 0x1
#define SGMII_PHY_ADDR3 0x2
#define SGMII_PHY_ADDR4 0x3
#define SGMII_PHY_ADDR5 0x4
#define SGMII_PHY_ADDR6 0x5
#define SGMII_PHY_ADDR7 0x6
#define SGMII_PHY_ADDR8 0x7
#define FM1_10GEC1_PHY_ADDR 0x10
#define FM1_10GEC2_PHY_ADDR 0x11
#define FM2_10GEC1_PHY_ADDR 0x12
#define FM2_10GEC2_PHY_ADDR 0x13
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi Yiping,
Thank you for your reply. I done the phy address configuration in u-boot as well as dts. One of the phy is working and this phy have the compatible driver and other phy are different and don't have the compatible driver.
Regards,
VinothS