Skip to content

Commit 219cecb

Browse files
onlyfly34davem330
authored andcommitted
net: phy: mediatek: add MT7530 & MT7531's PHY ID macros
This patch adds MT7530 & MT7531's PHY ID macros in mtk-ge.c so that it follows the same rule of mtk-ge-soc.c. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 3cb1a3c commit 219cecb

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

drivers/net/phy/mediatek/mtk-ge.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55

66
#include "mtk.h"
77

8+
#define MTK_GPHY_ID_MT7530 0x03a29412
9+
#define MTK_GPHY_ID_MT7531 0x03a29441
10+
811
#define MTK_EXT_PAGE_ACCESS 0x1f
912
#define MTK_PHY_PAGE_STANDARD 0x0000
1013
#define MTK_PHY_PAGE_EXTENDED 0x0001
@@ -59,7 +62,7 @@ static int mt7531_phy_config_init(struct phy_device *phydev)
5962

6063
static struct phy_driver mtk_gephy_driver[] = {
6164
{
62-
PHY_ID_MATCH_EXACT(0x03a29412),
65+
PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7530),
6366
.name = "MediaTek MT7530 PHY",
6467
.config_init = mt7530_phy_config_init,
6568
/* Interrupts are handled by the switch, not the PHY
@@ -73,7 +76,7 @@ static struct phy_driver mtk_gephy_driver[] = {
7376
.write_page = mtk_phy_write_page,
7477
},
7578
{
76-
PHY_ID_MATCH_EXACT(0x03a29441),
79+
PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7531),
7780
.name = "MediaTek MT7531 PHY",
7881
.config_init = mt7531_phy_config_init,
7982
/* Interrupts are handled by the switch, not the PHY
@@ -91,8 +94,8 @@ static struct phy_driver mtk_gephy_driver[] = {
9194
module_phy_driver(mtk_gephy_driver);
9295

9396
static struct mdio_device_id __maybe_unused mtk_gephy_tbl[] = {
94-
{ PHY_ID_MATCH_EXACT(0x03a29441) },
95-
{ PHY_ID_MATCH_EXACT(0x03a29412) },
97+
{ PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7530) },
98+
{ PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7531) },
9699
{ }
97100
};
98101

0 commit comments

Comments
 (0)