Hi,
I found my device fail to auto-negotiation with desktop computer after changing desktop computer's Ethernet speed to 10M or 100M. My device is P2041 CPU and BCM5661S PHY. I don't know why auto-negotiation cannot work at Linux kernel. Only 1000M can link up and work correctly. Auto-negotiation is work fine in U-boot command mode. Does any document about configuration of SGMII?
Below is the DTB about Ethernet configuration.
fman0: fman@400000 {
mdio0: mdio@e1120 {
tbi0: tbi-phy@8 {
reg = <0x8>;
device_type = "tbi-phy";
};
phy_sgmii_2: ethernet-phy@5 {
reg = <0x5>;
};
};
enet2: ethernet@e4000 {
tbi-handle = <&tbi2>;
phy-handle = <&phy_sgmii_2>;
phy-connection-type = "sgmii";
};
mdio@e5120 {
tbi2: tbi-phy@8 {
reg = <8>;
device_type = "tbi-phy";
};
};
};
fsl,dpaa {
compatible = "fsl,p2041-dpaa", "fsl,dpaa";
ethernet@0 {
compatible = "fsl,p2041-dpa-ethernet", "fsl,dpa-ethernet";
fsl,fman-mac = <&enet2>;
};
};
Thanks.
What's your final solution? I encountered a similar issue: the link is down when speed set to 100Mbps, and the link is up when speed set to 10Mbps.
Although the link is up at speed 10Mbps, the ping has no response.
Auto-negotiation to the far end is done by the local PHY, not the MAC
or any upper layer entity. The processor only reads the link status
and speed/duplex from the PHY and sets the dTSEC accordingly.
There are no settings in the FMAN driver and/or it's node in the device
tree that could directly affect auto-negotiation to the far end.
Note, auto-negoatiation over SGMII is done independently. No control information
is conveyed from the MAC or the STA management unit to the PHY over SGMII.
Suggestions:
1. Check that the PHY device tree node correctly reflects the PHY management
address.
2. Check what your PHY SR management register returns. Make sure it
is something meaningful. If it is not, diagnose the MDIO interface.
3. Make sure the PHY driver initializes your PHY correctly. Consult
at the driver code and at your PHY documentation.
4. Diagnose the PHY. Approach the PHY manufacturer for support.
Have a great day,
Platon
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------