From patchwork Tue Jul 9 06:05:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 13727286 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 C1DA6C2BD09 for ; Tue, 9 Jul 2024 06:06:22 +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=7R+a79zeVR4TFj+YYO7YF/GrCakPUivgfORSYYvNTMI=; b=0zsSa6oyeKbXddxNuJRWo2e9pG wEGwgxO849Btl3Q8JLc5rBULckz11PHtZRX2ehT/Xiy7XG5KPS4mTVx9MNnbwj+Ugjpl/88Yam8sx As+5WYzDRzXnhmvvNQv5cJXFfBlI437G+72fpMuY208XC89BSU1wd7CchBJLBmeisO0Jki/BmAc+L seO3zkHbXGEY8VDUMeWOFl6BFg11gMpvBeT3Y/Qs3pJWpO+jom0py2UUc1LhUOatHj66wWvE+brbJ 3rcNwJrR0f0tRBidY+QF/SV6VTC9TiRUfa2+hUD1IaQTZWPC32p7iC6W5DNuPQndP0oVYi5hurxLT PGpd+7KQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sR3zQ-000000060qL-1Ntb; Tue, 09 Jul 2024 06:06:12 +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 1sR3zA-000000060m3-10km for linux-arm-kernel@lists.infradead.org; Tue, 09 Jul 2024 06:05:57 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 23E3260DC5; Tue, 9 Jul 2024 06:05:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5001DC32782; Tue, 9 Jul 2024 06:05:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720505154; bh=KC3jL2Vs6jczH8bx3kG9i3v3EvH0EzoOd+MZySOXBG8=; h=From:To:Cc:Subject:Date:From; b=rDQtGuKrMoiJLVzkLfQ+BkaRSBTmF7PRdGIEKqiH0X+t0kNK648/DxoJAYkYKzXy4 j0P9jE93RGSTai27C0ZMBvrjuypMFIEp6Jblr9hcOmvKwSERekShc8vx4rbu3GXQbw ExgoXjT/Uz6Ox/7UWVFEKije1sU+4GoQm8ZLWCpNuZZLDHb+A6xhoud9Qdhxh44P5p qRsmi4M4Pf+TC3ceCvcnZA2rLeNU/+thblhJA2psv7MZCvI7IwmHRpGWZB+dIx9E2+ KXDPzSA+rWBn3GNKSbUrSqfiL72OTIcmFLbbjNsSr+E8M/VOF0XMY3FgpDNEr20XuI hxNydUHRCTUJQ== 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, arnd@arndb.de, horms@kernel.org Subject: [PATCH v6 net-next 0/2] Introduce EN7581 ethernet support Date: Tue, 9 Jul 2024 08:05:20 +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-20240708_230556_402396_4EFE8A43 X-CRM114-Status: GOOD ( 12.28 ) 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 v5: - implement .ndo_get_stats64() callback and remove duplicated ethtool entries - remove "ethernet-controller.yaml#" from parent node in device tree binding - rename child node from "mac" to "ethernet" in device tree binding - fix checkpatch errors Changes since v4: - fix compilation warnings - use airoha_qdma_rr() and not airoha_rr() in airoha_qdma_set_irqmask() - add missing descriptions in dt-binding - remove mdio node in binding example Changes since v3: - rework architecture to allow future gdm{1,4} support - read REG_INT_ENABLE() register in airoha_qdma_set_irqmask() to guarantee airoha_qdma_wr() complete in the spinlock critical section - thx Arnd for the clarification - remove unnecessary wmb() - remove debugfs - move register definitions in .c and remove .h - fix warnings - enable NAPI thread by default 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 | 143 + MAINTAINERS | 9 + drivers/net/ethernet/mediatek/Kconfig | 11 +- drivers/net/ethernet/mediatek/Makefile | 1 + drivers/net/ethernet/mediatek/airoha_eth.c | 2771 +++++++++++++++++ 5 files changed, 2934 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/net/airoha,en7581-eth.yaml create mode 100644 drivers/net/ethernet/mediatek/airoha_eth.c