From patchwork Tue Jun 18 07:49:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 13701922 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 C6D51C27C4F for ; Tue, 18 Jun 2024 07:50:06 +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=nZufYwmKIrSDlCGbz+BF04tM+WiqQt2XwF1jCpK7XcY=; b=nM4JbLz3DYM3GedioduBCFFHKP S7noGSZ9ZIdO/W5xmJetLmCQZE+w83X1sVgsxVpQgE0Uh8ZAgoIiQipeuTdbM2FWvZah5CRFpM0HZ WtrzL8ffOgxJGIrk5oRzybQipF+zSFA8WFovn/J5YOOk0br3sTQCT6Kq//IttEZiyfC5v9g1b9OmV nzuRQBgzF/H11gL26o0xaG+6WbPU7TNyXe6tR3bT7JACCtxZVv5zUXR/xEzxUt+yI4tF8K/zW1ckm w91FMTid5v817j1kaV3xPGhuZIAnpsHWRr3xfJcwxa++W3LMTFCrQgr1MoI2RK35lRe3j7glpE2a/ APuGYRcQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJTbE-0000000E0hH-3Eed; Tue, 18 Jun 2024 07:49:52 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJTbB-0000000E0fP-1xYK for linux-arm-kernel@lists.infradead.org; Tue, 18 Jun 2024 07:49:50 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 0F4F3CE12FC; Tue, 18 Jun 2024 07:49:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9AB05C4AF1A; Tue, 18 Jun 2024 07:49:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718696986; bh=00brJ40G8s7wdtc9hTYSuurYO4IZlFNVUi9Bu/7qFLk=; h=From:To:Cc:Subject:Date:From; b=iRjn7SIPptJfgdzD++1A543/qjnD493W3YUsiUT9YJRCF1cEbF44MjP6xIne7oHSO 1GDO8Ego59s2YxF/Z+tDkhDzEIq53KYRkdBV2b1NH4GcfJsCcQE69EnE8JuTH55hsN K3vZ9wHEkP2IFgPkp7p/YFpilbHO+QZ7SkF1Y8zX64MaEmysuPFr44tK5+Z0lsUbfW fmaHgrPwRJVNTVPYQG5YdMz5c1lJTYPaTRCV982cNjdDukVF5K+3LAX1UPJhkQfg7i g9JAH30JHuvt1LUpMLO7KfVbcbcBlSZM+j+PhMHf0weowSqWnDpzV6jcwlLY+pKozj tpGwMzFxyhz+g== 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, linux-clk@vger.kernel.org, rkannoth@marvell.com, sgoutham@marvell.com, andrew@lunn.ch Subject: [PATCH v2 net-next 0/2] Introduce EN7581 ethernet support Date: Tue, 18 Jun 2024 09:49:01 +0200 Message-ID: X-Mailer: git-send-email 2.45.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240618_004949_720970_0CBF3DCE X-CRM114-Status: GOOD ( 10.98 ) 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 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.yaml | 106 + MAINTAINERS | 10 + drivers/net/ethernet/mediatek/Kconfig | 11 +- drivers/net/ethernet/mediatek/Makefile | 1 + drivers/net/ethernet/mediatek/airoha_eth.c | 1804 +++++++++++++++++ drivers/net/ethernet/mediatek/airoha_eth.h | 793 ++++++++ 6 files changed, 2724 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/net/airoha,en7581.yaml create mode 100644 drivers/net/ethernet/mediatek/airoha_eth.c create mode 100644 drivers/net/ethernet/mediatek/airoha_eth.h