generic: replace simple AQR hack patch with upstream version
[openwrt/staging/jow.git] / target / linux / generic / backport-5.15 / 739-v6.9-net-phy-aquantia-add-AQR113-PHY-ID.patch
1 From 71b605d32017e5b8d257db7344bc2f8e8fcc973e Mon Sep 17 00:00:00 2001
2 From: Christian Marangi <ansuelsmth@gmail.com>
3 Date: Thu, 15 Feb 2024 16:30:05 +0100
4 Subject: [PATCH] net: phy: aquantia: add AQR113 PHY ID
5
6 Add Aquantia AQR113 PHY ID. Aquantia AQR113 is just a chip size variant of
7 the already supported AQR133C where the only difference is the PHY ID
8 and the hw chip size.
9
10 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
12 Signed-off-by: David S. Miller <davem@davemloft.net>
13 ---
14 drivers/net/phy/aquantia/aquantia_main.c | 21 +++++++++++++++++++++
15 1 file changed, 21 insertions(+)
16
17 --- a/drivers/net/phy/aquantia/aquantia_main.c
18 +++ b/drivers/net/phy/aquantia/aquantia_main.c
19 @@ -24,6 +24,7 @@
20 #define PHY_ID_AQR405 0x03a1b4b0
21 #define PHY_ID_AQR111 0x03a1b610
22 #define PHY_ID_AQR111B0 0x03a1b612
23 +#define PHY_ID_AQR113 0x31c31c40
24 #define PHY_ID_AQR113C 0x31c31c12
25
26 #define MDIO_PHYXS_VEND_IF_STATUS 0xe812
27 @@ -802,6 +803,24 @@ static struct phy_driver aqr_driver[] =
28 .read_status = aqr_read_status,
29 },
30 {
31 + PHY_ID_MATCH_MODEL(PHY_ID_AQR113),
32 + .name = "Aquantia AQR113",
33 + .probe = aqr107_probe,
34 + .config_init = aqr107_config_init,
35 + .config_aneg = aqr_config_aneg,
36 + .config_intr = aqr_config_intr,
37 + .handle_interrupt = aqr_handle_interrupt,
38 + .read_status = aqr107_read_status,
39 + .get_tunable = aqr107_get_tunable,
40 + .set_tunable = aqr107_set_tunable,
41 + .suspend = aqr107_suspend,
42 + .resume = aqr107_resume,
43 + .get_sset_count = aqr107_get_sset_count,
44 + .get_strings = aqr107_get_strings,
45 + .get_stats = aqr107_get_stats,
46 + .link_change_notify = aqr107_link_change_notify,
47 +},
48 +{
49 PHY_ID_MATCH_MODEL(PHY_ID_AQR113C),
50 .name = "Aquantia AQR113C",
51 .probe = aqr107_probe,
52 @@ -834,6 +853,7 @@ static struct mdio_device_id __maybe_unu
53 { PHY_ID_MATCH_MODEL(PHY_ID_AQR405) },
54 { PHY_ID_MATCH_MODEL(PHY_ID_AQR111) },
55 { PHY_ID_MATCH_MODEL(PHY_ID_AQR111B0) },
56 + { PHY_ID_MATCH_MODEL(PHY_ID_AQR113) },
57 { PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) },
58 { }
59 };