Skip to content

Commit

Permalink
net: airoha: Introduce Airoha NPU support
Browse files Browse the repository at this point in the history
Packet Processor Engine (PPE) module available on EN7581 SoC populates
the PPE table with 5-tuples flower rules learned from traffic forwarded
between the GDM ports connected to the Packet Switch Engine (PSE) module.
The airoha_eth driver can enable hw acceleration of learned 5-tuples
rules if the user configure them in netfilter flowtable (netfilter
flowtable support will be added with subsequent patches).
airoha_eth driver configures and collects data from the PPE module via a
Network Processor Unit (NPU) RISC-V module available on the EN7581 SoC.
Introduce basic support for Airoha NPU module.

Tested-by: Sayantan Nandy <sayantan.nandy@airoha.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
Lorenzo Bianconi authored and Paolo Abeni committed Mar 4, 2025
1 parent 9b1a0b7 commit 23290c7
Show file tree
Hide file tree
Showing 5 changed files with 566 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/net/ethernet/airoha/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@ config NET_VENDOR_AIROHA

if NET_VENDOR_AIROHA

config NET_AIROHA_NPU
tristate "Airoha NPU support"
select WANT_DEV_COREDUMP
select REGMAP_MMIO
help
This driver supports Airoha Network Processor (NPU) available
on the Airoha Soc family.

config NET_AIROHA
tristate "Airoha SoC Gigabit Ethernet support"
depends on NET_DSA || !NET_DSA
select NET_AIROHA_NPU
select PAGE_POOL
help
This driver supports the gigabit ethernet MACs in the
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/airoha/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
#

obj-$(CONFIG_NET_AIROHA) += airoha_eth.o
obj-$(CONFIG_NET_AIROHA_NPU) += airoha_npu.o
2 changes: 2 additions & 0 deletions drivers/net/ethernet/airoha/airoha_eth.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ struct airoha_eth {
unsigned long state;
void __iomem *fe_regs;

struct airoha_npu __rcu *npu;

struct reset_control_bulk_data rsts[AIROHA_MAX_NUM_RSTS];
struct reset_control_bulk_data xsi_rsts[AIROHA_MAX_NUM_XSI_RSTS];

Expand Down
Loading

0 comments on commit 23290c7

Please sign in to comment.