mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-12-06 20:54:00 -05:00
Backport of the latest upstream Realtek PHY patches. WoL uses devm_pm_set_wake_irq(), so the patch that adds this function has also been backported. Changelog: 4465ae435ddc net: phy: realtek: create rtl8211f_config_phy_eee() helper bb78b71faf60 net: phy: realtek: eliminate priv->phycr1 variable e1a31c41bef6 net: phy: realtek: allow CLKOUT to be disabled on RTL8211F(D)(I)-VD-CG 910ac7bfb1af net: phy: realtek: eliminate has_phycr2 variable 27033d069177 net: phy: realtek: eliminate priv->phycr2 variable 8e982441ba60 net: phy: realtek: create rtl8211f_config_rgmii_delay() b826bf795564 net: phy: realtek: fix RTL8211F wake-on-lan support Tested on Netgear WAX206 with RTL8221B-VB-CG. Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl> Link: https://github.com/openwrt/openwrt/pull/20987 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
74 lines
3.0 KiB
Diff
74 lines
3.0 KiB
Diff
From 85cd45580f5e3b26068cccb7d6173f200e754dc0 Mon Sep 17 00:00:00 2001
|
|
From: Daniel Golle <daniel@makrotopia.org>
|
|
Date: Sun, 2 Apr 2023 23:56:16 +0100
|
|
Subject: [PATCH 1/2] net: phy: realtek: use genphy_soft_reset for 2.5G PHYs
|
|
|
|
Some vendor bootloaders do weird things with those PHYs which result in
|
|
link modes being reported wrongly. Start from a clean sheet by resetting
|
|
the PHY.
|
|
|
|
Reported-by: Yevhen Kolomeiko <jarvis2709@gmail.com>
|
|
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
---
|
|
drivers/net/phy/realtek/realtek_main.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
--- a/drivers/net/phy/realtek/realtek_main.c
|
|
+++ b/drivers/net/phy/realtek/realtek_main.c
|
|
@@ -2094,6 +2094,7 @@ static struct phy_driver realtek_drvs[]
|
|
}, {
|
|
.name = "RTL8226 2.5Gbps PHY",
|
|
.match_phy_device = rtl8226_match_phy_device,
|
|
+ .soft_reset = genphy_soft_reset,
|
|
.get_features = rtl822x_get_features,
|
|
.config_aneg = rtl822x_config_aneg,
|
|
.read_status = rtl822x_read_status,
|
|
@@ -2104,6 +2105,7 @@ static struct phy_driver realtek_drvs[]
|
|
}, {
|
|
.match_phy_device = rtl8221b_match_phy_device,
|
|
.name = "RTL8226B_RTL8221B 2.5Gbps PHY",
|
|
+ .soft_reset = genphy_soft_reset,
|
|
.get_features = rtl822x_get_features,
|
|
.config_aneg = rtl822x_config_aneg,
|
|
.config_init = rtl822xb_config_init,
|
|
@@ -2126,6 +2128,7 @@ static struct phy_driver realtek_drvs[]
|
|
}, {
|
|
PHY_ID_MATCH_EXACT(0x001cc848),
|
|
.name = "RTL8226B-CG_RTL8221B-CG 2.5Gbps PHY",
|
|
+ .soft_reset = genphy_soft_reset,
|
|
.get_features = rtl822x_get_features,
|
|
.config_aneg = rtl822x_config_aneg,
|
|
.config_init = rtl822xb_config_init,
|
|
@@ -2138,6 +2141,7 @@ static struct phy_driver realtek_drvs[]
|
|
}, {
|
|
.match_phy_device = rtl8221b_vb_cg_c22_match_phy_device,
|
|
.name = "RTL8221B-VB-CG 2.5Gbps PHY (C22)",
|
|
+ .soft_reset = genphy_soft_reset,
|
|
.probe = rtl822x_probe,
|
|
.get_features = rtl822x_get_features,
|
|
.config_aneg = rtl822x_config_aneg,
|
|
@@ -2153,6 +2157,7 @@ static struct phy_driver realtek_drvs[]
|
|
.name = "RTL8221B-VB-CG 2.5Gbps PHY (C45)",
|
|
.config_intr = rtl8221b_config_intr,
|
|
.handle_interrupt = rtl8221b_handle_interrupt,
|
|
+ .soft_reset = rtl822x_c45_soft_reset,
|
|
.probe = rtl822x_probe,
|
|
.config_init = rtl822xb_config_init,
|
|
.get_rate_matching = rtl822xb_get_rate_matching,
|
|
@@ -2164,6 +2169,7 @@ static struct phy_driver realtek_drvs[]
|
|
}, {
|
|
.match_phy_device = rtl8221b_vm_cg_c22_match_phy_device,
|
|
.name = "RTL8221B-VM-CG 2.5Gbps PHY (C22)",
|
|
+ .soft_reset = genphy_soft_reset,
|
|
.probe = rtl822x_probe,
|
|
.get_features = rtl822x_get_features,
|
|
.config_aneg = rtl822x_config_aneg,
|
|
@@ -2179,6 +2185,7 @@ static struct phy_driver realtek_drvs[]
|
|
.name = "RTL8221B-VM-CG 2.5Gbps PHY (C45)",
|
|
.config_intr = rtl8221b_config_intr,
|
|
.handle_interrupt = rtl8221b_handle_interrupt,
|
|
+ .soft_reset = rtl822x_c45_soft_reset,
|
|
.probe = rtl822x_probe,
|
|
.config_init = rtl822xb_config_init,
|
|
.get_rate_matching = rtl822xb_get_rate_matching,
|