@@ -27,6 +27,10 @@ static void dpaa2_mac_pcs_get_state(struct phylink_config *config,
phylink_mii_c22_pcs_get_state(pcs, state);
break;
+ case PHY_INTERFACE_MODE_10GBASER:
+ phylink_mii_c45_pcs_get_state(pcs, state);
+ break;
+
default:
break;
}
@@ -131,6 +135,10 @@ static int phy_mode(enum dpmac_eth_if eth_if, phy_interface_t *if_mode)
*if_mode = PHY_INTERFACE_MODE_SGMII;
break;
+ case DPMAC_ETH_IF_XFI:
+ *if_mode = PHY_INTERFACE_MODE_10GBASER;
+ break;
+
default:
return -EINVAL;
}
@@ -191,6 +199,7 @@ static bool dpaa2_mac_phy_mode_mismatch(struct dpaa2_mac *mac,
case PHY_INTERFACE_MODE_RGMII_ID:
case PHY_INTERFACE_MODE_RGMII_RXID:
case PHY_INTERFACE_MODE_RGMII_TXID:
+ case PHY_INTERFACE_MODE_10GBASER:
return (interface != mac->if_mode);
default:
return true;
@@ -216,6 +225,17 @@ static void dpaa2_mac_validate(struct phylink_config *config,
switch (state->interface) {
case PHY_INTERFACE_MODE_NA:
+ case PHY_INTERFACE_MODE_10GBASER:
+ phylink_set(mask, 10000baseT_Full);
+ phylink_set(mask, 10000baseKR_Full);
+ phylink_set(mask, 10000baseCR_Full);
+ phylink_set(mask, 10000baseSR_Full);
+ phylink_set(mask, 10000baseLR_Full);
+ phylink_set(mask, 10000baseLRM_Full);
+ phylink_set(mask, 10000baseER_Full);
+ if (state->interface != PHY_INTERFACE_MODE_NA)
+ break;
+ /* fallthrough */
case PHY_INTERFACE_MODE_1000BASEX:
case PHY_INTERFACE_MODE_SGMII:
case PHY_INTERFACE_MODE_RGMII:
*NOT FOR MERGING* Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> --- .../net/ethernet/freescale/dpaa2/dpaa2-mac.c | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+)