aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBirger Koblitz <git@birger-koblitz.de>2022-01-30 07:22:21 +0100
committerDaniel Golle <daniel@makrotopia.org>2022-02-17 15:21:47 +0000
commitcaaac9ab3bb34a067001595648f6fb6b57621202 (patch)
treec11ddb14e0ea1760d515df7bac661a92f31fdedb
parent08cf48c344395d69bdd31cc4a9e9cde11295b8a5 (diff)
downloadupstream-caaac9ab3bb34a067001595648f6fb6b57621202.tar.gz
upstream-caaac9ab3bb34a067001595648f6fb6b57621202.tar.bz2
upstream-caaac9ab3bb34a067001595648f6fb6b57621202.zip
realtek: Add support for the RTL8221B PHY
The RTL8221B PHY is a newer version of the RTL8226, also supporting 2.5GBit Ethernet. It is found with RTL931X devices such as the EdgeCore ECS4125-10P Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com> Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
-rw-r--r--target/linux/realtek/files-5.10/drivers/net/phy/rtl83xx-phy.c17
-rw-r--r--target/linux/realtek/files-5.10/drivers/net/phy/rtl83xx-phy.h1
2 files changed, 18 insertions, 0 deletions
diff --git a/target/linux/realtek/files-5.10/drivers/net/phy/rtl83xx-phy.c b/target/linux/realtek/files-5.10/drivers/net/phy/rtl83xx-phy.c
index f44f2f4adc..c1d6af6375 100644
--- a/target/linux/realtek/files-5.10/drivers/net/phy/rtl83xx-phy.c
+++ b/target/linux/realtek/files-5.10/drivers/net/phy/rtl83xx-phy.c
@@ -4026,6 +4026,23 @@ static struct phy_driver rtl83xx_phy_driver[] = {
.get_eee = rtl8218d_get_eee,
},
{
+ PHY_ID_MATCH_MODEL(PHY_ID_RTL8221B),
+ .name = "REALTEK RTL8221B",
+ .features = PHY_GBIT_FEATURES,
+ .probe = rtl8226_phy_probe,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
+ .set_loopback = genphy_loopback,
+ .read_mmd = rtl8226_read_mmd,
+ .write_mmd = rtl8226_write_mmd,
+ .read_page = rtl8226_read_page,
+ .write_page = rtl8226_write_page,
+ .read_status = rtl8226_read_status,
+ .config_aneg = rtl8226_config_aneg,
+ .set_eee = rtl8226_set_eee,
+ .get_eee = rtl8226_get_eee,
+ },
+ {
PHY_ID_MATCH_MODEL(PHY_ID_RTL8226),
.name = "REALTEK RTL8226",
.features = PHY_GBIT_FEATURES,
diff --git a/target/linux/realtek/files-5.10/drivers/net/phy/rtl83xx-phy.h b/target/linux/realtek/files-5.10/drivers/net/phy/rtl83xx-phy.h
index f6e42e4722..1ccb560d2a 100644
--- a/target/linux/realtek/files-5.10/drivers/net/phy/rtl83xx-phy.h
+++ b/target/linux/realtek/files-5.10/drivers/net/phy/rtl83xx-phy.h
@@ -30,6 +30,7 @@ struct __attribute__ ((__packed__)) fw_header {
#define PHY_ID_RTL8218B_E 0x001cc981
#define PHY_ID_RTL8218D 0x001cc983
#define PHY_ID_RTL8218B_I 0x001cca40
+#define PHY_ID_RTL8221B 0x001cc849
#define PHY_ID_RTL8226 0x001cc838
#define PHY_ID_RTL8390_GENERIC 0x001ccab0
#define PHY_ID_RTL8393_I 0x001c8393