generic: 6.6: refresh backport patches
[openwrt/staging/981213.git] / target / linux / generic / backport-6.6 / 762-v6.9-net-phy-aquantia-add-AQR813-PHY-ID.patch
1 From 6d47302a3f0ba31445478d518d98bd55918bc8ab Mon Sep 17 00:00:00 2001
2 From: Christian Marangi <ansuelsmth@gmail.com>
3 Date: Thu, 15 Feb 2024 22:43:30 +0100
4 Subject: [PATCH] net: phy: aquantia: add AQR813 PHY ID
5
6 Aquantia AQR813 is the Octal Port variant of the AQR113. Add PHY ID for
7 it to provide support for it.
8
9 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
10 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
11 Signed-off-by: David S. Miller <davem@davemloft.net>
12 ---
13 drivers/net/phy/aquantia/aquantia_main.c | 21 +++++++++++++++++++++
14 1 file changed, 21 insertions(+)
15
16 --- a/drivers/net/phy/aquantia/aquantia_main.c
17 +++ b/drivers/net/phy/aquantia/aquantia_main.c
18 @@ -28,6 +28,7 @@
19 #define PHY_ID_AQR412 0x03a1b712
20 #define PHY_ID_AQR113 0x31c31c40
21 #define PHY_ID_AQR113C 0x31c31c12
22 +#define PHY_ID_AQR813 0x31c31cb2
23
24 #define MDIO_PHYXS_VEND_IF_STATUS 0xe812
25 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK GENMASK(7, 3)
26 @@ -878,6 +879,25 @@ static struct phy_driver aqr_driver[] =
27 .get_stats = aqr107_get_stats,
28 .link_change_notify = aqr107_link_change_notify,
29 },
30 +{
31 + PHY_ID_MATCH_MODEL(PHY_ID_AQR813),
32 + .name = "Aquantia AQR813",
33 + .probe = aqr107_probe,
34 + .get_rate_matching = aqr107_get_rate_matching,
35 + .config_init = aqr107_config_init,
36 + .config_aneg = aqr_config_aneg,
37 + .config_intr = aqr_config_intr,
38 + .handle_interrupt = aqr_handle_interrupt,
39 + .read_status = aqr107_read_status,
40 + .get_tunable = aqr107_get_tunable,
41 + .set_tunable = aqr107_set_tunable,
42 + .suspend = aqr107_suspend,
43 + .resume = aqr107_resume,
44 + .get_sset_count = aqr107_get_sset_count,
45 + .get_strings = aqr107_get_strings,
46 + .get_stats = aqr107_get_stats,
47 + .link_change_notify = aqr107_link_change_notify,
48 +},
49 };
50
51 module_phy_driver(aqr_driver);
52 @@ -896,6 +916,7 @@ static struct mdio_device_id __maybe_unu
53 { PHY_ID_MATCH_MODEL(PHY_ID_AQR412) },
54 { PHY_ID_MATCH_MODEL(PHY_ID_AQR113) },
55 { PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) },
56 + { PHY_ID_MATCH_MODEL(PHY_ID_AQR813) },
57 { }
58 };
59