I have a design with an MCIMX6X2AVN08AB that is connected to 2 fixed PHYs over RGMII. In yocto, whichever interface is enabled first will work at 1Gbps, but the second comes up as 100Mbps.
root@x:~# ifdown eth0
root@x:~# ifdown eth1
root@x:~# ifup eth1
fec 21b4000.ethernet eth1: no PHY, assuming direct connection to switch
fec 21b4000.ethernet eth1: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=fixed-0:00, irq=-1)
root@x:~# fec 21b4000.ethernet eth1: Link is Up - 1Gbps/Full - flow control rx/tx
root@x:~# ifup eth0
fec 2188000.ethernet eth0: no PHY, assuming direct connection to switch
net eth0: PHY already attached
fec 2188000.ethernet eth0: Fixed PHY 0 taken, trying PHY 5
fec 2188000.ethernet eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=fixed-0:05, irq=-1)
root@x:~# fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
root@x:~# ifdown eth1
root@x:~# ifdown eth0
root@x:~# ifup eth0
fec 2188000.ethernet eth0: no PHY, assuming direct connection to switch
fec 2188000.ethernet eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=fixed-0:00, irq=-1)
root@x:~# iffec 2188000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
root@x:~# ifup eth1
fec 21b4000.ethernet eth1: no PHY, assuming direct connection to switch
net eth1: PHY already attached
fec 21b4000.ethernet eth1: Fixed PHY 0 taken, trying PHY 5
fec 21b4000.ethernet eth1: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=fixed-0:05, irq=-1)
root@x:~# fec 21b4000.ethernet eth1: Link is Up - 100Mbps/Full - flow control off
The interface that is enabled appears to work, I can see data by probing the interface and the TXCLK is 25MHz, but the fixed PHYs that the IMX is attached to only work at 1Gbps.
DTB settings for both PHY0 and PHY5 are identical except for addresses.
Does anyone know why the device used for the ethernet interface would change based on whether eth0 or eth1 is enabled first, or why the second interface is only operating at 100Mbps?
Thanks!
edit: moved to be a reply to NXP's response
Please try to switch to gigabit with the command like this:
# ethtool -s eth0 speed 1000 duplex full
Reposting this comment because I accidentally replied to the main post and not this comment.
Running that command produces the following result:
root@x:~# ethtool -s eth1 speed 1000 duplex full
root@x:~# ethtool eth1
Settings for eth1:
Supported ports: [ TP MII ]
Supported link modes: 100baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Advertised link modes: Not reported
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Link partner advertised link modes: 100baseT/Full
Link partner advertised pause frame use: No
Link partner advertised auto-negotiation: No
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 5
Transceiver: external
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Link detected: yes
The speed of the interface does not change in response to the command.