From patchwork Fri Feb 3 06:58:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 13127065 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 BCFF3C636CC for ; Fri, 3 Feb 2023 07:00:53 +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-Type:MIME-Version: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=SksYxWRyC5fDGiRLfHXiOATVG3QTLAcKAjCKUwaWuro=; b=a2cpZTN4cjDG5pRxuvAOs79iDe 0PrhAbwMCKMKjGQX6OJwrd3ErMjySWlfxkiUn3OoUJBiibojnRguvU4RqQR6yuuNTjbrKUySNEX1p PgboUl0ldH5CU1sR6ut1HTs65FNY7XFJ20pAeYCDnGtKfFSwGsrdJLoADBk/0d6CTxS4gJ5J+uTFu 72SdIydD+vnCRWgriYTPQ38wmZVGeHmZw4GZkbkSc93eIwMuDbujhxnSaic6+gbTCAhOT1DnvZlB/ Wo6uXVbm0idtUMWB59i+S1mmTvil0Wg40LpDdKeynXjN3VnLheK/yKC/Z5ctNfWfs6vSgYGaHkUd0 aMjVUz9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNq3y-000eUA-Cy; Fri, 03 Feb 2023 07:00:46 +0000 Received: from fudo.makrotopia.org ([2a07:2ec0:3002::71]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNq3t-000eQj-VC; Fri, 03 Feb 2023 07:00:45 +0000 Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1pNq3j-0000mC-0n; Fri, 03 Feb 2023 08:00:31 +0100 Date: Fri, 3 Feb 2023 06:58:48 +0000 From: Daniel Golle To: netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Russell King , Heiner Kallweit , Lorenzo Bianconi , Mark Lee , John Crispin , Felix Fietkau , AngeloGioacchino Del Regno , Matthias Brugger , DENG Qingfang , Landen Chao , Sean Wang , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Vladimir Oltean , Florian Fainelli , Andrew Lunn Cc: Jianhui Zhao , =?iso-8859-1?q?Bj=F8rn?= Mork Subject: [PATCH 0/9] net: ethernet: mtk_eth_soc: various enhancements Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230202_230042_032233_F1BB5747 X-CRM114-Status: GOOD ( 10.51 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org This series brings a variety of fixes and enhancements for mtk_eth_soc, adds support for the MT7981 SoC and facilitates sharing the SGMII PCS code between mtk_eth_soc and mt7530. Daniel Golle (9): net: ethernet: mtk_eth_soc: add support for MT7981 SoC net: ethernet: mtk_eth_soc: set MDIO bus clock frequency net: ethernet: mtk_eth_soc: reset PCS state net: ethernet: mtk_eth_soc: only write values if needed net: ethernet: mtk_eth_soc: fix RX data corruption issue net: ethernet: mtk_eth_soc: ppe: add support for flow accounting net: pcs: add driver for MediaTek SGMII PCS net: ethernet: mtk_eth_soc: switch to external PCS driver net: dsa: mt7530: use external PCS driver MAINTAINERS | 7 + drivers/net/dsa/Kconfig | 2 + drivers/net/dsa/mt7530.c | 278 ++++------------ drivers/net/dsa/mt7530.h | 43 +-- drivers/net/ethernet/mediatek/Kconfig | 2 + drivers/net/ethernet/mediatek/mtk_eth_path.c | 14 +- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 69 +++- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 98 ++---- drivers/net/ethernet/mediatek/mtk_ppe.c | 110 +++++- drivers/net/ethernet/mediatek/mtk_ppe.h | 24 +- .../net/ethernet/mediatek/mtk_ppe_debugfs.c | 9 +- .../net/ethernet/mediatek/mtk_ppe_offload.c | 7 + drivers/net/ethernet/mediatek/mtk_ppe_regs.h | 14 + drivers/net/ethernet/mediatek/mtk_sgmii.c | 190 ++--------- drivers/net/pcs/Kconfig | 6 + drivers/net/pcs/Makefile | 1 + drivers/net/pcs/pcs-mtk.c | 314 ++++++++++++++++++ include/linux/pcs/pcs-mtk.h | 13 + 18 files changed, 707 insertions(+), 494 deletions(-) create mode 100644 drivers/net/pcs/pcs-mtk.c create mode 100644 include/linux/pcs/pcs-mtk.h base-commit: 4fafd96910add124586b549ad005dcd179de8a18 Tested-by: Bjørn Mork