diff options
author | Raju Lakkaraju <Raju.Lakkaraju@microchip.com> | 2024-02-16 06:44:35 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-02-21 23:34:05 +0100 |
commit | 59f95f5da813db6aee652feafebc7436a3a73b89 (patch) | |
tree | 805fee17a536f1d9489e3de3e4e0cf721831c6c0 /drivers/net/phy | |
parent | Merge branch 'rework-genet-mdioclocking' (diff) | |
download | linux-59f95f5da813db6aee652feafebc7436a3a73b89.tar.xz linux-59f95f5da813db6aee652feafebc7436a3a73b89.zip |
net: phy: mxl-gpy: fill in possible_interfaces for GPY21x chipset
Fill in the possible_interfaces member.
GPY21x phys support the SGMII and 2500base-X interfaces
Signed-off-by: Raju Lakkaraju <Raju.Lakkaraju@microchip.com>
Link: https://lore.kernel.org/r/20240216054435.22380-1-Raju.Lakkaraju@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/mxl-gpy.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/net/phy/mxl-gpy.c b/drivers/net/phy/mxl-gpy.c index ea1073adc5a1..b2d36a3a96f1 100644 --- a/drivers/net/phy/mxl-gpy.c +++ b/drivers/net/phy/mxl-gpy.c @@ -274,6 +274,14 @@ static int gpy_config_init(struct phy_device *phydev) return ret < 0 ? ret : 0; } +static int gpy21x_config_init(struct phy_device *phydev) +{ + __set_bit(PHY_INTERFACE_MODE_2500BASEX, phydev->possible_interfaces); + __set_bit(PHY_INTERFACE_MODE_SGMII, phydev->possible_interfaces); + + return gpy_config_init(phydev); +} + static int gpy_probe(struct phy_device *phydev) { struct device *dev = &phydev->mdio.dev; @@ -867,7 +875,7 @@ static struct phy_driver gpy_drivers[] = { .phy_id_mask = PHY_ID_GPY21xB_MASK, .name = "Maxlinear Ethernet GPY211B", .get_features = genphy_c45_pma_read_abilities, - .config_init = gpy_config_init, + .config_init = gpy21x_config_init, .probe = gpy_probe, .suspend = genphy_suspend, .resume = genphy_resume, @@ -884,7 +892,7 @@ static struct phy_driver gpy_drivers[] = { PHY_ID_MATCH_MODEL(PHY_ID_GPY211C), .name = "Maxlinear Ethernet GPY211C", .get_features = genphy_c45_pma_read_abilities, - .config_init = gpy_config_init, + .config_init = gpy21x_config_init, .probe = gpy_probe, .suspend = genphy_suspend, .resume = genphy_resume, @@ -902,7 +910,7 @@ static struct phy_driver gpy_drivers[] = { .phy_id_mask = PHY_ID_GPY21xB_MASK, .name = "Maxlinear Ethernet GPY212B", .get_features = genphy_c45_pma_read_abilities, - .config_init = gpy_config_init, + .config_init = gpy21x_config_init, .probe = gpy_probe, .suspend = genphy_suspend, .resume = genphy_resume, @@ -919,7 +927,7 @@ static struct phy_driver gpy_drivers[] = { PHY_ID_MATCH_MODEL(PHY_ID_GPY212C), .name = "Maxlinear Ethernet GPY212C", .get_features = genphy_c45_pma_read_abilities, - .config_init = gpy_config_init, + .config_init = gpy21x_config_init, .probe = gpy_probe, .suspend = genphy_suspend, .resume = genphy_resume, @@ -937,7 +945,7 @@ static struct phy_driver gpy_drivers[] = { .phy_id_mask = PHY_ID_GPYx15B_MASK, .name = "Maxlinear Ethernet GPY215B", .get_features = genphy_c45_pma_read_abilities, - .config_init = gpy_config_init, + .config_init = gpy21x_config_init, .probe = gpy_probe, .suspend = genphy_suspend, .resume = genphy_resume, @@ -954,7 +962,7 @@ static struct phy_driver gpy_drivers[] = { PHY_ID_MATCH_MODEL(PHY_ID_GPY215C), .name = "Maxlinear Ethernet GPY215C", .get_features = genphy_c45_pma_read_abilities, - .config_init = gpy_config_init, + .config_init = gpy21x_config_init, .probe = gpy_probe, .suspend = genphy_suspend, .resume = genphy_resume, |