Files
eternalwrt-mt798x/target/linux/airoha/patches-6.12/310-06-net-airoha-add-initial-fixup-for-GDM3-4-port-support.patch
T
Christian Marangi 25de25827e airoha: backport additional rework in preparation for multi-serdes support
Backport additional upstream patch in preparation for multi-serdes and
proper PCS support.

Automatically refresh all affected patch.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-03-24 19:35:02 +01:00

41 lines
1.6 KiB
Diff

From a3cd6eb3259282a68b608fc923121460c0d3d2f7 Mon Sep 17 00:00:00 2001
From: Christian Marangi <ansuelsmth@gmail.com>
Date: Fri, 17 Jan 2025 10:35:41 +0100
Subject: [PATCH 6/9] net: airoha: add initial fixup for GDM3/4 port support
GDM3 and GDM4 require different configuration for max long frame
definition, needs the QDMA to strip CRC on RX and require the SPORT to
be enabled to correctly be identified.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
drivers/net/ethernet/airoha/airoha_eth.c | 12 ++++++++++--
drivers/net/ethernet/airoha/airoha_regs.h | 1 +
2 files changed, 11 insertions(+), 2 deletions(-)
--- a/drivers/net/ethernet/airoha/airoha_eth.c
+++ b/drivers/net/ethernet/airoha/airoha_eth.c
@@ -514,8 +514,10 @@ static int airoha_fe_init(struct airoha_
FIELD_PREP(IP_ASSEMBLE_PORT_MASK, 0) |
FIELD_PREP(IP_ASSEMBLE_NBQ_MASK, 22));
- airoha_fe_set(eth, REG_GDM_FWD_CFG(AIROHA_GDM3_IDX), GDM_PAD_EN_MASK);
- airoha_fe_set(eth, REG_GDM_FWD_CFG(AIROHA_GDM4_IDX), GDM_PAD_EN_MASK);
+ airoha_fe_set(eth, REG_GDM_FWD_CFG(AIROHA_GDM3_IDX),
+ GDM_PAD_EN_MASK | GDM_STRIP_CRC_MASK);
+ airoha_fe_set(eth, REG_GDM_FWD_CFG(AIROHA_GDM4_IDX),
+ GDM_PAD_EN_MASK | GDM_STRIP_CRC_MASK);
airoha_fe_crsn_qsel_init(eth);
@@ -1641,7 +1643,8 @@ static int airoha_dev_open(struct net_de
if (err)
return err;
- if (netdev_uses_dsa(dev))
+ /* It seems GDM3 and GDM4 needs SPORT enabled to correctly work */
+ if (netdev_uses_dsa(dev) || port->id > 2)
airoha_fe_set(qdma->eth, REG_GDM_INGRESS_CFG(port->id),
GDM_STAG_EN_MASK);
else