istoreos/target/linux/airoha/patches-6.6/116-06-net-airoha-add-initial-fixup-for-GDM3-4-port-support.patch
Christian Marangi 262b537f48
airoha: backport upstream patch for AN7583 Ethernet support
Backport upstream patch for AN7583 Ethernet support. While at it also
backport some additional fixes required to apply the AN7583 patches
cleanly.

Refresh all affected patch automatically (aside from the XSI patch that
changed the implementation)

Link: https://github.com/openwrt/openwrt/pull/20489
(cherry picked from commit 46a454fb9b)
[ fix conflict errors ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-10 17:53:47 +01:00

41 lines
1.5 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(3), GDM_PAD_EN);
- airoha_fe_set(eth, REG_GDM_FWD_CFG(4), GDM_PAD_EN);
+ airoha_fe_set(eth, REG_GDM_FWD_CFG(3),
+ GDM_PAD_EN | GDM_STRIP_CRC);
+ airoha_fe_set(eth, REG_GDM_FWD_CFG(4),
+ GDM_PAD_EN | GDM_STRIP_CRC);
airoha_fe_crsn_qsel_init(eth);
@@ -1630,7 +1632,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