[RFC PATCH net v1] net: phy: aquantia: Set phy speed to 2.5gbps for AQR115c

From: Abhishek Chauhan
Date: Thu Sep 12 2024 - 21:17:11 EST


Recently we observed that aquantia AQR115c always comes up in
100Mbps mode. AQR115c aquantia chip supports max speed up to
2.5Gbps. Today the AQR115c configuration is done through
aqr113c_config_init which internally calls aqr107_config_init.
aqr113c and aqr107 are both capable of 10Gbps. Whereas AQR115c
supprts max speed of 2.5Gbps only.

Fixes: 0ebc581f8a4b ("net: phy: aquantia: add support for aqr115c")
Signed-off-by: Abhishek Chauhan <quic_abchauha@xxxxxxxxxxx>
---
drivers/net/phy/aquantia/aquantia_main.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/net/phy/aquantia/aquantia_main.c b/drivers/net/phy/aquantia/aquantia_main.c
index e982e9ce44a5..9afc041dbb64 100644
--- a/drivers/net/phy/aquantia/aquantia_main.c
+++ b/drivers/net/phy/aquantia/aquantia_main.c
@@ -499,6 +499,12 @@ static int aqr107_config_init(struct phy_device *phydev)
if (!ret)
aqr107_chip_info(phydev);

+ /* AQR115c supports speed up to 2.5Gbps */
+ if (phydev->interface == PHY_INTERFACE_MODE_2500BASEX) {
+ phy_set_max_speed(phydev, SPEED_2500);
+ phydev->autoneg = AUTONEG_ENABLE;
+ }
+
ret = aqr107_set_downshift(phydev, MDIO_AN_VEND_PROV_DOWNSHIFT_DFLT);
if (ret)
return ret;
@@ -1036,6 +1042,7 @@ static struct phy_driver aqr_driver[] = {
.get_sset_count = aqr107_get_sset_count,
.get_strings = aqr107_get_strings,
.get_stats = aqr107_get_stats,
+ .get_features = genphy_c45_pma_read_abilities,
.link_change_notify = aqr107_link_change_notify,
.led_brightness_set = aqr_phy_led_brightness_set,
.led_hw_is_supported = aqr_phy_led_hw_is_supported,
--
2.25.1