From patchwork Sun Jun 23 16:19:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 13708678 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EAFD4C27C4F for ; Sun, 23 Jun 2024 16:20:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=dhxjvxiA9O91gdyPUBPvWBhSi+hVvNA/U4OrSpb/yGo=; b=dme+lNWJW86Mxv4CoXLhzqVIkc NWgXXjbwvwpE0smzmlZIUPRtdJ+Ob++gRsm6+MS6jvQECF2ulyNXfZXcPdDPcqBDBK4ExG1G5+vJy gwhlT9SGp36yu6vvOKF/MHGBsuxo7O5mLs3ohe33DjV/tdre3gGfEIl2B/Zl61E5Oebso4CxQDa1P hhXLKT2C9c4mgPF1T4QbxKFPhRUqvji5FC9nvXcYDTENHpdrLo3oWYpfl5OodWME2AwnSdctQskDA UatacHlt6JqlQSwL61jPcUGGDxB2ItF2LRjZ49/TtqcJBJ1IyKVX0jpFbe32bk3lz0ErWyn2rufeC LPWsrriA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sLPxD-0000000EMVl-0cka; Sun, 23 Jun 2024 16:20:35 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sLPx8-0000000EMV3-1G4N for linux-arm-kernel@lists.infradead.org; Sun, 23 Jun 2024 16:20:31 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 172C560DE8; Sun, 23 Jun 2024 16:20:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 063A7C2BD10; Sun, 23 Jun 2024 16:20:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719159628; bh=2W3n7QEpgfPvKDfZlzj4iobwCUXzXN/FvDR+WAOxruc=; h=From:To:Cc:Subject:Date:From; b=Fa1ZVjraLovOEBQLOeN7wXzUeRRksZgqiKFwqR5dqpSppb+AhheE0hgDArkwbmK23 tIU44xm6k62ri2JLxLhce8NfCYu2uWHSnX0ibokica9LNg58AzF1xEm0qylVoNfwGG /Yb3GK4t+DytrDXmWL2fLl6Mcc/ydNu31EYbo8221kvLHcigX1e1YWTWmxMhTwR/vS VPlWXWoKjKJLzI5Ep3rFUoTEp0wCS9sOvJJqUyvStHnFPxG7uIyiW5Qgdktr/ru8Vu SzDDrs96TLSsx3WJv58zocL66c1igs5MdkLQ87WqnsdllHSaBnHPF1xXWNOqB8XuOn JfMfolHsel3kw== From: Lorenzo Bianconi To: netdev@vger.kernel.org Cc: nbd@nbd.name, lorenzo.bianconi83@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, conor@kernel.org, linux-arm-kernel@lists.infradead.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, devicetree@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org, upstream@airoha.com, angelogioacchino.delregno@collabora.com, benjamin.larsson@genexis.eu, rkannoth@marvell.com, sgoutham@marvell.com, andrew@lunn.ch Subject: [PATCH v3 net-next 0/2] Introduce EN7581 ethernet support Date: Sun, 23 Jun 2024 18:19:55 +0200 Message-ID: X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240623_092030_407492_82389E23 X-CRM114-Status: GOOD ( 10.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add airoha_eth driver in order to introduce ethernet support for Airoha EN7581 SoC available on EN7581 development board. EN7581 mac controller is mainly composed by Frame Engine (FE) and QoS-DMA (QDMA) modules. FE is used for traffic offloading (just basic functionalities are supported now) while QDMA is used for DMA operation and QOS functionalities between mac layer and the dsa switch (hw QoS is not available yet and it will be added in the future). Currently only hw lan features are available, hw wan will be added with subsequent patches. Changes since v2: - rename airoha,en7581.yaml in airoha,en7581-eth.yaml - remove reset dependency in airoha,en7581-eth.yaml - remove airoha_dev_change_mtu() callback Changes since v1: - drop patch 2/3 - remove queue lock for rx queues - add bql support - add ethtool stats support - fix possible infinite loop in airoha_qdma_rx_process routine - always destroy page_pool in case of error during initialization - cosmetics Lorenzo Bianconi (2): dt-bindings: net: airoha: Add EN7581 ethernet controller net: airoha: Introduce ethernet support for EN7581 SoC .../bindings/net/airoha,en7581-eth.yaml | 108 + MAINTAINERS | 10 + drivers/net/ethernet/mediatek/Kconfig | 11 +- drivers/net/ethernet/mediatek/Makefile | 1 + drivers/net/ethernet/mediatek/airoha_eth.c | 1783 +++++++++++++++++ drivers/net/ethernet/mediatek/airoha_eth.h | 793 ++++++++ 6 files changed, 2705 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/net/airoha,en7581-eth.yaml create mode 100644 drivers/net/ethernet/mediatek/airoha_eth.c create mode 100644 drivers/net/ethernet/mediatek/airoha_eth.h