Skip to content

Commit

Permalink
net: airoha: Introduce ethernet support for EN7581 SoC
Browse files Browse the repository at this point in the history
Add airoha_eth driver in order to introduce ethernet support for
Airoha EN7581 SoC available on EN7581 development board (en7581-evb).
EN7581 mac controller is mainly composed by the Frame Engine (PSE+PPE)
and QoS-DMA (QDMA) modules. FE is used for traffic offloading (just
basic functionalities are currently supported) while QDMA is used for
DMA operations and QOS functionalities between the mac layer and the
external modules conncted to the FE GDM ports (e.g MT7530 DSA switch
or external phys).
A general overview of airoha_eth architecture is reported below:

               ┌───────┐                                     ┌───────┐
               │ QDMA2 │                                     │ QDMA1 │
               └───┬───┘                                     └───┬───┘
                   │                                             │
           ┌───────▼─────────────────────────────────────────────▼────────┐
           │                                                              │
           │       P5                                            P0       │
           │                                                              │
           │                                                              │
           │                                                              │    ┌──────┐
           │                                                           P3 ├────► GDM3 │
           │                                                              │    └──────┘
           │                                                              │
           │                                                              │
┌─────┐    │                                                              │
│ PPE ◄────┤ P4                          PSE                              │
└─────┘    │                                                              │
           │                                                              │
           │                                                              │
           │                                                              │    ┌──────┐
           │                                                           P9 ├────► GDM4 │
           │                                                              │    └──────┘
           │                                                              │
           │                                                              │
           │                                                              │
           │        P2                                           P1       │
           └─────────┬───────────────────────────────────────────┬────────┘
                     │                                           │
                 ┌───▼──┐                                     ┌──▼───┐
                 │ GDM2 │                                     │ GDM1 │
                 └──────┘                                     └──┬───┘
                                                                 │
                                                            ┌────▼─────┐
                                                            │  MT7530  │
                                                            └──────────┘

Currently only hw LAN features (QDMA1+GDM1) are available while hw WAN
(QDMA2+GDM{2,3,4}) ones will be added with subsequent patches introducing
traffic offloading support.

Tested-by: Benjamin Larsson <benjamin.larsson@genexis.eu>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/274945d2391c195098ab180a46d0617b18b9e42c.1720818878.git.lorenzo@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Lorenzo Bianconi authored and Jakub Kicinski committed Jul 14, 2024
1 parent 6bc8719 commit 23020f0
Show file tree
Hide file tree
Showing 4 changed files with 2,749 additions and 1 deletion.
9 changes: 9 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,15 @@ S: Supported
F: fs/aio.c
F: include/linux/*aio*.h

AIROHA ETHERNET DRIVER
M: Lorenzo Bianconi <lorenzo@kernel.org>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
L: linux-mediatek@lists.infradead.org (moderated for non-subscribers)
L: netdev@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/net/airoha,en7581-eth.yaml
F: drivers/net/ethernet/mediatek/airoha_eth.c

AIROHA SPI SNFI DRIVER
M: Lorenzo Bianconi <lorenzo@kernel.org>
M: Ray Liu <ray.liu@airoha.com>
Expand Down
10 changes: 9 additions & 1 deletion drivers/net/ethernet/mediatek/Kconfig
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-only
config NET_VENDOR_MEDIATEK
bool "MediaTek devices"
depends on ARCH_MEDIATEK || SOC_MT7621 || SOC_MT7620 || COMPILE_TEST
depends on ARCH_MEDIATEK || ARCH_AIROHA || SOC_MT7621 || SOC_MT7620 || COMPILE_TEST
help
If you have a Mediatek SoC with ethernet, say Y.

if NET_VENDOR_MEDIATEK

config NET_AIROHA
tristate "Airoha SoC Gigabit Ethernet support"
depends on NET_DSA || !NET_DSA
select PAGE_POOL
help
This driver supports the gigabit ethernet MACs in the
Airoha SoC family.

config NET_MEDIATEK_SOC_WED
depends on ARCH_MEDIATEK || COMPILE_TEST
def_bool NET_MEDIATEK_SOC != n
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/mediatek/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ mtk_eth-$(CONFIG_NET_MEDIATEK_SOC_WED) += mtk_wed_debugfs.o
endif
obj-$(CONFIG_NET_MEDIATEK_SOC_WED) += mtk_wed_ops.o
obj-$(CONFIG_NET_MEDIATEK_STAR_EMAC) += mtk_star_emac.o
obj-$(CONFIG_NET_AIROHA) += airoha_eth.o
Loading

0 comments on commit 23020f0

Please sign in to comment.