Message ID | cover.1675407169.git.daniel@makrotopia.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> 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 <rfc822;il.mystafa@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <daniel@makrotopia.org>) id 1pNq3j-0000mC-0n; Fri, 03 Feb 2023 08:00:31 +0100 Date: Fri, 3 Feb 2023 06:58:48 +0000 From: Daniel Golle <daniel@makrotopia.org> To: netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Russell King <linux@armlinux.org.uk>, Heiner Kallweit <hkallweit1@gmail.com>, Lorenzo Bianconi <lorenzo@kernel.org>, Mark Lee <Mark-MC.Lee@mediatek.com>, John Crispin <john@phrozen.org>, Felix Fietkau <nbd@nbd.name>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Matthias Brugger <matthias.bgg@gmail.com>, DENG Qingfang <dqfext@gmail.com>, Landen Chao <Landen.Chao@mediatek.com>, Sean Wang <sean.wang@mediatek.com>, Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>, Eric Dumazet <edumazet@google.com>, "David S. Miller" <davem@davemloft.net>, Vladimir Oltean <olteanv@gmail.com>, Florian Fainelli <f.fainelli@gmail.com>, Andrew Lunn <andrew@lunn.ch> Cc: Jianhui Zhao <zhaojh329@gmail.com>, =?iso-8859-1?q?Bj=F8rn?= Mork <bjorn@mork.no> Subject: [PATCH 0/9] net: ethernet: mtk_eth_soc: various enhancements Message-ID: <cover.1675407169.git.daniel@makrotopia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: <linux-kernel.vger.kernel.org> 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?= |
Series |
net: ethernet: mtk_eth_soc: various enhancements
|
|
Message
Daniel Golle
Feb. 3, 2023, 6:58 a.m. UTC
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
Comments
Daniel Golle <daniel@makrotopia.org> writes: > 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. Thanks! I've now successfully tested this on an MT7986 board with 2.5G phys (GPY211C) connected to one of the mtk_eth_soc macs and on port 5 of the the MT7531. The series fixes a number of issues for me, including a mysterious packet drop at 1G only which I believe is related to the undocumented MAC_MCR_BIT_12 in patch 5. With Vladimir's (WiP?) "PCS and PHY in-band sync" patch set and your related implementations in mxl-gpy, mt7530 and mtk_eth_soc to top of this series, both 2.5G ports are now usable at any speed. Note that the mt7530.c part of the series depends on https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git/commit/?id=697c3892d825fb78f42ec8e53bed065dd728db3e which is not yet in net-next. It appears to be destined for v6.2 so this is not a problem. Just mentioning it in case someone else is struggling with the testing of this series. Feel free to add Tested-by: Bjørn Mork <bjorn@mork.no> to the complete series. Bjørn