]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: phy: realtek: Modify 2.5G PHY name to RTL8226
authorWilly Liu <willy.liu@realtek.com>
Wed, 30 Sep 2020 06:48:58 +0000 (14:48 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Oct 2020 01:49:47 +0000 (18:49 -0700)
Realtek single-chip Ethernet PHY solutions can be separated as below:
10M/100Mbps: RTL8201X
1Gbps: RTL8211X
2.5Gbps: RTL8226/RTL8221X
RTL8226 is the first version for realtek that compatible 2.5Gbps single PHY.
Since RTL8226 is single port only, realtek changes its name to RTL8221B from
the second version.
PHY ID for RTL8226 is 0x001cc800 and RTL8226B/RTL8221B is 0x001cc840.

RTL8125 is not a single PHY solution, it integrates PHY/MAC/PCIE bus
controller and embedded memory.

Signed-off-by: Willy Liu <willy.liu@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/realtek.c

index 4bf54cded48ab4329ea496aebd6139afb5931dcc..1af874d36ced8ff5c5b920ca738bb606f3de1739 100644 (file)
@@ -409,7 +409,7 @@ static int rtlgen_write_mmd(struct phy_device *phydev, int devnum, u16 regnum,
        return ret;
 }
 
-static int rtl8125_read_mmd(struct phy_device *phydev, int devnum, u16 regnum)
+static int rtl822x_read_mmd(struct phy_device *phydev, int devnum, u16 regnum)
 {
        int ret = rtlgen_read_mmd(phydev, devnum, regnum);
 
@@ -433,7 +433,7 @@ static int rtl8125_read_mmd(struct phy_device *phydev, int devnum, u16 regnum)
        return ret;
 }
 
-static int rtl8125_write_mmd(struct phy_device *phydev, int devnum, u16 regnum,
+static int rtl822x_write_mmd(struct phy_device *phydev, int devnum, u16 regnum,
                             u16 val)
 {
        int ret = rtlgen_write_mmd(phydev, devnum, regnum, val);
@@ -450,7 +450,7 @@ static int rtl8125_write_mmd(struct phy_device *phydev, int devnum, u16 regnum,
        return ret;
 }
 
-static int rtl8125_get_features(struct phy_device *phydev)
+static int rtl822x_get_features(struct phy_device *phydev)
 {
        int val;
 
@@ -468,7 +468,7 @@ static int rtl8125_get_features(struct phy_device *phydev)
        return genphy_read_abilities(phydev);
 }
 
-static int rtl8125_config_aneg(struct phy_device *phydev)
+static int rtl822x_config_aneg(struct phy_device *phydev)
 {
        int ret = 0;
 
@@ -488,7 +488,7 @@ static int rtl8125_config_aneg(struct phy_device *phydev)
        return __genphy_config_aneg(phydev, ret);
 }
 
-static int rtl8125_read_status(struct phy_device *phydev)
+static int rtl822x_read_status(struct phy_device *phydev)
 {
        int ret;
 
@@ -530,7 +530,7 @@ static int rtlgen_match_phy_device(struct phy_device *phydev)
               !rtlgen_supports_2_5gbps(phydev);
 }
 
-static int rtl8125_match_phy_device(struct phy_device *phydev)
+static int rtl8226_match_phy_device(struct phy_device *phydev)
 {
        return phydev->phy_id == RTL_GENERIC_PHYID &&
               rtlgen_supports_2_5gbps(phydev);
@@ -635,29 +635,29 @@ static struct phy_driver realtek_drvs[] = {
                .read_mmd       = rtlgen_read_mmd,
                .write_mmd      = rtlgen_write_mmd,
        }, {
-               .name           = "RTL8125 2.5Gbps internal",
-               .match_phy_device = rtl8125_match_phy_device,
-               .get_features   = rtl8125_get_features,
-               .config_aneg    = rtl8125_config_aneg,
-               .read_status    = rtl8125_read_status,
+               .name           = "RTL8226 2.5Gbps PHY",
+               .match_phy_device = rtl8226_match_phy_device,
+               .get_features   = rtl822x_get_features,
+               .config_aneg    = rtl822x_config_aneg,
+               .read_status    = rtl822x_read_status,
                .suspend        = genphy_suspend,
                .resume         = rtlgen_resume,
                .read_page      = rtl821x_read_page,
                .write_page     = rtl821x_write_page,
-               .read_mmd       = rtl8125_read_mmd,
-               .write_mmd      = rtl8125_write_mmd,
+               .read_mmd       = rtl822x_read_mmd,
+               .write_mmd      = rtl822x_write_mmd,
        }, {
                PHY_ID_MATCH_EXACT(0x001cc840),
-               .name           = "RTL8125B 2.5Gbps internal",
-               .get_features   = rtl8125_get_features,
-               .config_aneg    = rtl8125_config_aneg,
-               .read_status    = rtl8125_read_status,
+               .name           = "RTL8226B_RTL8221B 2.5Gbps PHY",
+               .get_features   = rtl822x_get_features,
+               .config_aneg    = rtl822x_config_aneg,
+               .read_status    = rtl822x_read_status,
                .suspend        = genphy_suspend,
                .resume         = rtlgen_resume,
                .read_page      = rtl821x_read_page,
                .write_page     = rtl821x_write_page,
-               .read_mmd       = rtl8125_read_mmd,
-               .write_mmd      = rtl8125_write_mmd,
+               .read_mmd       = rtl822x_read_mmd,
+               .write_mmd      = rtl822x_write_mmd,
        }, {
                PHY_ID_MATCH_EXACT(0x001cc961),
                .name           = "RTL8366RB Gigabit Ethernet",