mirror of
https://github.com/Heleguo/lede.git
synced 2025-12-16 19:01:32 +00:00
Compared to MT7988 (NETSYSv3) the Ethernet Frame Engine of MT7987 has been slighly updated (NETSYSv3.1), among other things the packet scheduler (shaper) has apparently been reworked. Import patches for basic support of the Ethernet Frame Engine of the MT7987 SoC. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
From 6e9ec5ade644eeb136c6b827d72fac80bf2c3817 Mon Sep 17 00:00:00 2001
|
|
From: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
|
|
Date: Fri, 9 May 2025 13:22:14 +0800
|
|
Subject: [PATCH] net: pcs: mtk_lynxi add mt7987 support
|
|
|
|
Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
|
|
---
|
|
drivers/net/pcs/pcs-mtk-lynxi.c | 10 +++++++---
|
|
1 file changed, 7 insertions(+), 3 deletions(-)
|
|
|
|
--- a/drivers/net/pcs/pcs-mtk-lynxi.c
|
|
+++ b/drivers/net/pcs/pcs-mtk-lynxi.c
|
|
@@ -413,9 +413,12 @@ static int mtk_pcs_lynxi_probe(struct pl
|
|
if (of_property_read_bool(np->parent, "mediatek,pnswap"))
|
|
flags |= MTK_SGMII_FLAG_PN_SWAP;
|
|
|
|
- mpcs->rstc = of_reset_control_get_shared(np->parent, NULL);
|
|
- if (IS_ERR(mpcs->rstc))
|
|
- return PTR_ERR(mpcs->rstc);
|
|
+ if (of_parse_phandle(np->parent, "resets", 0)) {
|
|
+ mpcs->rstc = of_reset_control_get_shared(np->parent, NULL);
|
|
+ if (IS_ERR(mpcs->rstc))
|
|
+ return PTR_ERR(mpcs->rstc);
|
|
+ } else
|
|
+ mpcs->rstc = NULL;
|
|
|
|
reset_control_deassert(mpcs->rstc);
|
|
mpcs->sgmii_sel = devm_clk_get_enabled(dev, "sgmii_sel");
|
|
@@ -462,6 +465,7 @@ static void mtk_pcs_lynxi_remove(struct
|
|
}
|
|
|
|
static const struct of_device_id mtk_pcs_lynxi_of_match[] = {
|
|
+ { .compatible = "mediatek,mt7987-sgmii", .data = (void *)MTK_NETSYS_V3_AMA_RGC3 },
|
|
{ .compatible = "mediatek,mt7988-sgmii", .data = (void *)MTK_NETSYS_V3_AMA_RGC3 },
|
|
{ /* sentinel */ },
|
|
};
|