Skip to content

Commit 038ba1d

Browse files
AnsuelPaolo Abeni
authored andcommitted
net: phy: aquantia: add AQR111 and AQR111B0 PHY ID
Add Aquantia AQR111 and AQR111B0 PHY ID. These PHY advertise 10G speed but actually supports up to 5G speed, hence some manual fixup is needed. The Aquantia AQR111B0 PHY is just a variant of the AQR111 with smaller chip size. Signed-off-by: Christian Marangi <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent d25f327 commit 038ba1d

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

drivers/net/phy/aquantia/aquantia_main.c

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#define PHY_ID_AQR107 0x03a1b4e0
2323
#define PHY_ID_AQCS109 0x03a1b5c2
2424
#define PHY_ID_AQR405 0x03a1b4b0
25+
#define PHY_ID_AQR111 0x03a1b610
26+
#define PHY_ID_AQR111B0 0x03a1b612
2527
#define PHY_ID_AQR112 0x03a1b662
2628
#define PHY_ID_AQR412 0x03a1b712
2729
#define PHY_ID_AQR113C 0x31c31c12
@@ -755,6 +757,16 @@ static int aqr107_probe(struct phy_device *phydev)
755757
return aqr_hwmon_probe(phydev);
756758
}
757759

760+
static int aqr111_config_init(struct phy_device *phydev)
761+
{
762+
/* AQR111 reports supporting speed up to 10G,
763+
* however only speeds up to 5G are supported.
764+
*/
765+
phy_set_max_speed(phydev, SPEED_5000);
766+
767+
return aqr107_config_init(phydev);
768+
}
769+
758770
static struct phy_driver aqr_driver[] = {
759771
{
760772
PHY_ID_MATCH_MODEL(PHY_ID_AQ1202),
@@ -828,6 +840,44 @@ static struct phy_driver aqr_driver[] = {
828840
.get_stats = aqr107_get_stats,
829841
.link_change_notify = aqr107_link_change_notify,
830842
},
843+
{
844+
PHY_ID_MATCH_MODEL(PHY_ID_AQR111),
845+
.name = "Aquantia AQR111",
846+
.probe = aqr107_probe,
847+
.get_rate_matching = aqr107_get_rate_matching,
848+
.config_init = aqr111_config_init,
849+
.config_aneg = aqr_config_aneg,
850+
.config_intr = aqr_config_intr,
851+
.handle_interrupt = aqr_handle_interrupt,
852+
.read_status = aqr107_read_status,
853+
.get_tunable = aqr107_get_tunable,
854+
.set_tunable = aqr107_set_tunable,
855+
.suspend = aqr107_suspend,
856+
.resume = aqr107_resume,
857+
.get_sset_count = aqr107_get_sset_count,
858+
.get_strings = aqr107_get_strings,
859+
.get_stats = aqr107_get_stats,
860+
.link_change_notify = aqr107_link_change_notify,
861+
},
862+
{
863+
PHY_ID_MATCH_MODEL(PHY_ID_AQR111B0),
864+
.name = "Aquantia AQR111B0",
865+
.probe = aqr107_probe,
866+
.get_rate_matching = aqr107_get_rate_matching,
867+
.config_init = aqr111_config_init,
868+
.config_aneg = aqr_config_aneg,
869+
.config_intr = aqr_config_intr,
870+
.handle_interrupt = aqr_handle_interrupt,
871+
.read_status = aqr107_read_status,
872+
.get_tunable = aqr107_get_tunable,
873+
.set_tunable = aqr107_set_tunable,
874+
.suspend = aqr107_suspend,
875+
.resume = aqr107_resume,
876+
.get_sset_count = aqr107_get_sset_count,
877+
.get_strings = aqr107_get_strings,
878+
.get_stats = aqr107_get_stats,
879+
.link_change_notify = aqr107_link_change_notify,
880+
},
831881
{
832882
PHY_ID_MATCH_MODEL(PHY_ID_AQR405),
833883
.name = "Aquantia AQR405",
@@ -903,6 +953,8 @@ static struct mdio_device_id __maybe_unused aqr_tbl[] = {
903953
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR107) },
904954
{ PHY_ID_MATCH_MODEL(PHY_ID_AQCS109) },
905955
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR405) },
956+
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR111) },
957+
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR111B0) },
906958
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR112) },
907959
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR412) },
908960
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) },

0 commit comments

Comments
 (0)