Fixed link for 10G

From: Madalin-Cristian Bucur
Date: Fri Jan 06 2017 - 07:01:59 EST


Hi Florian,

I'm trying to add a fixed-link property that declares 10G speed
for a XGMII PHY and I'm encountering some issues as the fixed
link infrastructure does not seem to support this speed.

I'm using this device tree snippet (using the legacy format, but it
should not matter):

ethernet@f2000 { /* 10GEC2 */
fixed-link = <0 1 10000 0 0>;
phy-connection-type = "xgmii";
};

and I get this error:

[ 0.464238] swphy: unknown speed
[ 0.467464] fsl_mac: probe of 1af2000.ethernet failed with error -22

Looking at the code, fixed_phy_register() seems to check for speeds up
to 1G and swphy only caters 1G and lower speeds, the swphy_decode_speed()
returning -EINVAL for 10G, triggering the error printed above in
swphy_validate_state().

What would be the proper way to add support for the 10G fixed link speed?

Thank you,
Madalin