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: 4918 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp684878wrn; Thu, 2 Feb 2023 23:03:57 -0800 (PST) X-Google-Smtp-Source: AK7set95sx06LXJTEzIsNTq4PJxxTxrd9XF00S7H9zKiGFDFPTFPxJywB67UKByE/NlHaP/3lxSE X-Received: by 2002:a17:90a:3dc5:b0:22c:816e:d67d with SMTP id i63-20020a17090a3dc500b0022c816ed67dmr9610229pjc.24.1675407837209; Thu, 02 Feb 2023 23:03:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675407837; cv=none; d=google.com; s=arc-20160816; b=uHtXPV3Mgz1GcjVqsWSjeWrkJFOSUU8Ozcay9DcgrehvO+c2GheFf74u8ULuS6bKJu l5jhkBybgiLWk8uLtsfiYRUQAC3KhQafOo3nAEIcz7CpF+PueynkPD1sbfzHKzr+Xq4R v13ZeIw/+ysFPZ2VqWl44r3wjYrDlB0dlEJg8ycnXLOys6m1RirhoeTaeNEkrkj1vAVS sVBpnY1Re4Av7Zk/a/RRPG/dRFehdnVIPuSgHwZ06XOqSCoIY6DqNyxp6fBEZUnHG0hL MRGdjkUuBcMlnOpx+J95x4LzgAqW68PC9EusiSh7uoTWk3o7ESdrdF5woWpEV5dLVf0u HD9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date; bh=SksYxWRyC5fDGiRLfHXiOATVG3QTLAcKAjCKUwaWuro=; b=rA97mDxrobKDiPuRmtFTw3VvAPSPCOSUXFL2izF2Ubr85VN9GzSO4VmgUNxc8zrcZF /KcerFoPEqneEyP4bcoPPyFuz9YKEusGVVAMUSvOp7OGT1RY/YYqp81u/BGtuPJw+Yxg Zo6LQ6XFgUQsNtYciLq6ieasGg/bvQ+VW4KX+qDZTl0INlUQU2rGK7bDlQxaWzIUi37H 3B99oVvU2KPHR1feVNrH2qFi4Rr/JtTZrYcoMqnD+NeZtMu7/iha2RdzUPMBfpxlmIZn KFZgxg1osqdKgA2iJJhxtfnFQP6lCfNQemsAlobPburUssjYQpAenDbay2qbKrFQV1MM EjeA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w8-20020a17090aad4800b0023045b96652si4968805pjv.119.2023.02.02.23.03.45; Thu, 02 Feb 2023 23:03:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232007AbjBCHAm (ORCPT + 99 others); Fri, 3 Feb 2023 02:00:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231486AbjBCHAl (ORCPT ); Fri, 3 Feb 2023 02:00:41 -0500 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE5808DAF1; Thu, 2 Feb 2023 23:00:39 -0800 (PST) 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-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756792447922886943?= X-GMAIL-MSGID: =?utf-8?q?1756792447922886943?= 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