netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH net v1] net: phy: aquantia: Set phy speed to 2.5gbps for AQR115c
@ 2024-09-13  1:16 Abhishek Chauhan
  2024-09-13  8:01 ` Maxime Chevallier
  0 siblings, 1 reply; 10+ messages in thread
From: Abhishek Chauhan @ 2024-09-13  1:16 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	netdev, linux-kernel, Andrew Halaney, Russell King (Oracle),
	Andrew Lunn, Heiner Kallweit, Bartosz Golaszewski,
	linux-tegra@vger.kernel.org, Brad Griffis, Vladimir Oltean,
	Jon Hunter
  Cc: kernel

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@quicinc.com>
---
 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


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-09-18 22:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-13  1:16 [RFC PATCH net v1] net: phy: aquantia: Set phy speed to 2.5gbps for AQR115c Abhishek Chauhan
2024-09-13  8:01 ` Maxime Chevallier
2024-09-13 16:12   ` Abhishek Chauhan (ABC)
2024-09-13 16:35     ` Andrew Lunn
2024-09-13 17:22       ` Abhishek Chauhan (ABC)
2024-09-17  9:31       ` Russell King (Oracle)
2024-09-17 20:57         ` Abhishek Chauhan (ABC)
2024-09-18 21:27           ` Abhishek Chauhan (ABC)
2024-09-18 21:45             ` Andrew Lunn
2024-09-18 22:24               ` Abhishek Chauhan (ABC)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).