Hello all,
we have been struggling to bring up LS1046A ethernet. The LS1046A custom board has two RGMII and one SGMII which RCW is 0x3333.
1.EC1 ---RGMII---- FM1@DTSEC3----88E1512 addr: 0 ---FSL_MDIO0:
2.EC2---RGMII---- FM1@DTSEC4-----88E1512 addr:1 ----FSL_MDIO0:
3.SGMII.6------FM1@DTSEC6-----88E1512 addr:0--- FM_TGEC_MDIO
in uboot SGMII.6 can't be connected.
Could not get PHY for FM_TGEC_MDIO: addr 0
Failed to connect
but fm1-mac3 or fm1-mac4 can't success ping, the EC1-CLK125M or EC2-CLK125M is all normal and can watch on oscilloscope. And the two 88e1512 all operate correct and link status is also ok.
=> ping 192.168.1.1
Could not get PHY for mdio@fd000: addr 0
Using fm1-mac3 device
ARP Retry count exceeded; starting again
ping failed; host 192.168.1.1 is not alive
=> ping 192.168.1.1
Using fm1-mac3 device
fm1-mac3: Tx error, txbd->status = 0x8800
fm1-mac3: Tx buffer not ready, txbd->status = 0x8800
fm1-mac3: Tx buffer not ready, txbd->status = 0x8800
fm1-mac3: Tx buffer not ready, txbd->status = 0x8800
ARP Retry count exceeded; starting again
ping failed; host 192.168.1.1 is not alive
=> mii device
MII devices: 'mdio@fc000' 'mdio@eb000' 'mdio@fd000'
Current device: 'mdio@fc000'
=> mdio list
mdio@fc000:
0 - Marvell 88E151x <--> fm1-mac3
1 - Marvell 88E151x <--> fm1-mac4
mdio@eb000:
mdio@fd000:
mdio@e1000:
mdio@e3000:
mdio@e5000:
mdio@e7000:
mdio@e9000:
mdio@f1000:
mdio@f3000:
in linux kernel, SGMII.6 also can't be connected.And fm1-mac3 or fm1-mac4 can't send or receive packets when in 1000Mbps ,but it can receive correct packets from ethernet in 100Mbps.
root@localhost:/test/misc_test/miitool# ifconfig
fm1-mac3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.130 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::48ce:34ff:fe2b:58e8 prefixlen 64 scopeid 0x20<link>
ether 4a:ce:34:2b:58:e8 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 17 dropped 0 overruns 0 frame 0
TX packets 35 bytes 4288 (4.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0x1ae4000-1ae4fff
fm1-mac4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.140 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::78a8:e1ff:fe1f:a352 prefixlen 64 scopeid 0x20<link>
ether 7a:a8:e1:1f:a3:52 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 9 dropped 0 overruns 0 frame 0
TX packets 35 bytes 4288 (4.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0x1ae6000-1ae6fff
root@localhost:/test/misc_test/miitool# ethtool -S fm1-mac3
rx dma error: 0
rx frame physical error: 3
rx frame size error: 6
rx header error: 0
rx csum error: 0
root@localhost:/test/misc_test/miitool# cat /sys/class/net/fm1-mac3/mac_regs
-------
FM MAC - MEMAC -2 (0x839C5000)
----------------------------------------
0x00839C5008: 0x00020943 command_config
0x00839C500C: 0x815cca16 mac_addr0.mac_addr_l
0x00839C5010: 0x00003067 mac_addr0.mac_addr_u
0x00839C5014: 0x00002580 maxfrm
0x00839C502C: 0x00000120 hashtable_ctrl
0x00839C5040: 0x00000040 ievent
0x00839C5044: 0x0000000c tx_ipg_length
0x00839C504C: 0x63000000 imask
0x00839C5300: 0x00005006 if_mode
0x00839C5304: 0x0000b000 if_status
0x00839C5340: 0x00000000 hg_config