mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-06-08 11:32:05 +08:00

The MediaTek Ethernet PHY drivers are going to be used by multiple targets (airoha, mediatek, ramips). Add generic backports of changes required for recently added Ethernet PHYs. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
57 lines
1.9 KiB
Diff
57 lines
1.9 KiB
Diff
From e6579df175d5b1baa605c82f8e759542262637cf Mon Sep 17 00:00:00 2001
|
|
From: "SkyLake.Huang" <skylake.huang@mediatek.com>
|
|
Date: Sat, 9 Nov 2024 00:34:55 +0800
|
|
Subject: [PATCH 08/20] 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>
|
|
---
|
|
drivers/net/phy/mediatek/mtk-ge.c | 11 +++++++----
|
|
1 file changed, 7 insertions(+), 4 deletions(-)
|
|
|
|
--- a/drivers/net/phy/mediatek/mtk-ge.c
|
|
+++ b/drivers/net/phy/mediatek/mtk-ge.c
|
|
@@ -5,6 +5,9 @@
|
|
|
|
#include "mtk.h"
|
|
|
|
+#define MTK_GPHY_ID_MT7530 0x03a29412
|
|
+#define MTK_GPHY_ID_MT7531 0x03a29441
|
|
+
|
|
#define MTK_EXT_PAGE_ACCESS 0x1f
|
|
#define MTK_PHY_PAGE_STANDARD 0x0000
|
|
#define MTK_PHY_PAGE_EXTENDED 0x0001
|
|
@@ -59,7 +62,7 @@ static int mt7531_phy_config_init(struct
|
|
|
|
static struct phy_driver mtk_gephy_driver[] = {
|
|
{
|
|
- PHY_ID_MATCH_EXACT(0x03a29412),
|
|
+ PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7530),
|
|
.name = "MediaTek MT7530 PHY",
|
|
.config_init = mt7530_phy_config_init,
|
|
/* Interrupts are handled by the switch, not the PHY
|
|
@@ -73,7 +76,7 @@ static struct phy_driver mtk_gephy_drive
|
|
.write_page = mtk_phy_write_page,
|
|
},
|
|
{
|
|
- PHY_ID_MATCH_EXACT(0x03a29441),
|
|
+ PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7531),
|
|
.name = "MediaTek MT7531 PHY",
|
|
.config_init = mt7531_phy_config_init,
|
|
/* Interrupts are handled by the switch, not the PHY
|
|
@@ -91,8 +94,8 @@ static struct phy_driver mtk_gephy_drive
|
|
module_phy_driver(mtk_gephy_driver);
|
|
|
|
static struct mdio_device_id __maybe_unused mtk_gephy_tbl[] = {
|
|
- { PHY_ID_MATCH_EXACT(0x03a29441) },
|
|
- { PHY_ID_MATCH_EXACT(0x03a29412) },
|
|
+ { PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7530) },
|
|
+ { PHY_ID_MATCH_EXACT(MTK_GPHY_ID_MT7531) },
|
|
{ }
|
|
};
|
|
|