]> git.ipfire.org Git - thirdparty/openwrt.git/blob
8b8c97c54f4d3936040dc99eedc4f55cb39a9fd0
[thirdparty/openwrt.git] /
1 From 64ff63aeefb03139ae27454bd4208244579ae88e Mon Sep 17 00:00:00 2001
2 From: Aleksander Jan Bajkowski <olek2@wp.pl>
3 Date: Fri, 17 Jan 2025 23:24:21 +0100
4 Subject: [PATCH] net: phy: realtek: HWMON support for standalone versions of
5 RTL8221B and RTL8251
6
7 HWMON support has been added for the RTL8221/8251 PHYs integrated together
8 with the MAC inside the RTL8125/8126 chips. This patch extends temperature
9 reading support for standalone variants of the mentioned PHYs.
10
11 I don't know whether the earlier revisions of the RTL8226 also have a
12 built-in temperature sensor, so they have been skipped for now.
13
14 Tested on RTL8221B-VB-CG.
15
16 Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
17 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
18 Signed-off-by: David S. Miller <davem@davemloft.net>
19 ---
20 drivers/net/phy/realtek/realtek_main.c | 5 +++++
21 1 file changed, 5 insertions(+)
22
23 --- a/drivers/net/phy/realtek/realtek_main.c
24 +++ b/drivers/net/phy/realtek/realtek_main.c
25 @@ -1474,6 +1474,7 @@ static struct phy_driver realtek_drvs[]
26 }, {
27 .match_phy_device = rtl8221b_vb_cg_c22_match_phy_device,
28 .name = "RTL8221B-VB-CG 2.5Gbps PHY (C22)",
29 + .probe = rtl822x_probe,
30 .get_features = rtl822x_get_features,
31 .config_aneg = rtl822x_config_aneg,
32 .config_init = rtl822xb_config_init,
33 @@ -1486,6 +1487,7 @@ static struct phy_driver realtek_drvs[]
34 }, {
35 .match_phy_device = rtl8221b_vb_cg_c45_match_phy_device,
36 .name = "RTL8221B-VB-CG 2.5Gbps PHY (C45)",
37 + .probe = rtl822x_probe,
38 .config_init = rtl822xb_config_init,
39 .get_rate_matching = rtl822xb_get_rate_matching,
40 .get_features = rtl822x_c45_get_features,
41 @@ -1496,6 +1498,7 @@ static struct phy_driver realtek_drvs[]
42 }, {
43 .match_phy_device = rtl8221b_vn_cg_c22_match_phy_device,
44 .name = "RTL8221B-VM-CG 2.5Gbps PHY (C22)",
45 + .probe = rtl822x_probe,
46 .get_features = rtl822x_get_features,
47 .config_aneg = rtl822x_config_aneg,
48 .config_init = rtl822xb_config_init,
49 @@ -1508,6 +1511,7 @@ static struct phy_driver realtek_drvs[]
50 }, {
51 .match_phy_device = rtl8221b_vn_cg_c45_match_phy_device,
52 .name = "RTL8221B-VN-CG 2.5Gbps PHY (C45)",
53 + .probe = rtl822x_probe,
54 .config_init = rtl822xb_config_init,
55 .get_rate_matching = rtl822xb_get_rate_matching,
56 .get_features = rtl822x_c45_get_features,
57 @@ -1518,6 +1522,7 @@ static struct phy_driver realtek_drvs[]
58 }, {
59 .match_phy_device = rtl8251b_c45_match_phy_device,
60 .name = "RTL8251B 5Gbps PHY",
61 + .probe = rtl822x_probe,
62 .get_features = rtl822x_get_features,
63 .config_aneg = rtl822x_config_aneg,
64 .read_status = rtl822x_read_status,