summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2020-03-03 12:15:38 +0000
committerRussell King <rmk+kernel@armlinux.org.uk>2020-10-12 21:44:24 +0100
commite5238f893017affa6bcd03a5bf73e0716b1238c6 (patch)
tree6606e89b2a80412322efd3a77b90f101e5be43ba
parent4680c47114d5982bd6feae06e287b010b5e111b6 (diff)
net: mvpp2: fill in phy interface mode bitmap
Fill in the phy interface mode bitmap for the Marvell mvpp2 driver, so phylink can know which interfaces are supported by the MAC. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-rw-r--r--drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index 6e140d1b8967..ab997105eb38 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -6067,6 +6067,29 @@ static int mvpp2_port_probe(struct platform_device *pdev,
port->phylink_config.dev = &dev->dev;
port->phylink_config.type = PHYLINK_NETDEV;
+ if (mvpp2_port_supports_xlg(port)) {
+ __set_bit(PHY_INTERFACE_MODE_10GBASER,
+ port->phylink_config.supported_interfaces);
+ __set_bit(PHY_INTERFACE_MODE_XAUI,
+ port->phylink_config.supported_interfaces);
+ }
+ if (mvpp2_port_supports_rgmii(port)) {
+ __set_bit(PHY_INTERFACE_MODE_RGMII,
+ port->phylink_config.supported_interfaces);
+ __set_bit(PHY_INTERFACE_MODE_RGMII_ID,
+ port->phylink_config.supported_interfaces);
+ __set_bit(PHY_INTERFACE_MODE_RGMII_TXID,
+ port->phylink_config.supported_interfaces);
+ __set_bit(PHY_INTERFACE_MODE_RGMII_RXID,
+ port->phylink_config.supported_interfaces);
+ }
+ __set_bit(PHY_INTERFACE_MODE_SGMII,
+ port->phylink_config.supported_interfaces);
+ __set_bit(PHY_INTERFACE_MODE_1000BASEX,
+ port->phylink_config.supported_interfaces);
+ __set_bit(PHY_INTERFACE_MODE_2500BASEX,
+ port->phylink_config.supported_interfaces);
+
phylink = phylink_create(&port->phylink_config, port_fwnode,
phy_mode, &mvpp2_phylink_ops);
if (IS_ERR(phylink)) {