1 From e6579df175d5b1baa605c82f8e759542262637cf Mon Sep 17 00:00:00 2001
2 From: "SkyLake.Huang" <skylake.huang@mediatek.com>
3 Date: Sat, 9 Nov 2024 00:34:55 +0800
4 Subject: [PATCH 08/20] net: phy: mediatek: add MT7530 & MT7531's PHY ID macros
6 This patch adds MT7530 & MT7531's PHY ID macros in mtk-ge.c so that
7 it follows the same rule of mtk-ge-soc.c.
9 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
10 Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
11 Signed-off-by: David S. Miller <davem@davemloft.net>
13 drivers/net/phy/mediatek/mtk-ge.c | 11 +++++++----
14 1 file changed, 7 insertions(+), 4 deletions(-)
16 --- a/drivers/net/phy/mediatek/mtk-ge.c
17 +++ b/drivers/net/phy/mediatek/mtk-ge.c
22 +#define MTK_GPHY_ID_MT7530 0x03a29412
23 +#define MTK_GPHY_ID_MT7531 0x03a29441
25 #define MTK_EXT_PAGE_ACCESS 0x1f
26 #define MTK_PHY_PAGE_STANDARD 0x0000
27 #define MTK_PHY_PAGE_EXTENDED 0x0001
28 @@ -59,7 +62,7 @@ static int mt7531_phy_config_init(struct
30 static struct phy_driver mtk_gephy_driver[] = {
32 - PHY_ID_MATCH_EXACT(0x03a29412),
33 + PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7530),
34 .name = "MediaTek MT7530 PHY",
35 .config_init = mt7530_phy_config_init,
36 /* Interrupts are handled by the switch, not the PHY
37 @@ -73,7 +76,7 @@ static struct phy_driver mtk_gephy_drive
38 .write_page = mtk_phy_write_page,
41 - PHY_ID_MATCH_EXACT(0x03a29441),
42 + PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7531),
43 .name = "MediaTek MT7531 PHY",
44 .config_init = mt7531_phy_config_init,
45 /* Interrupts are handled by the switch, not the PHY
46 @@ -91,8 +94,8 @@ static struct phy_driver mtk_gephy_drive
47 module_phy_driver(mtk_gephy_driver);
49 static struct mdio_device_id __maybe_unused mtk_gephy_tbl[] = {
50 - { PHY_ID_MATCH_EXACT(0x03a29441) },
51 - { PHY_ID_MATCH_EXACT(0x03a29412) },
52 + { PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7530) },
53 + { PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7531) },