Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4400204rdb; Mon, 11 Dec 2023 19:46:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IGTr3TocxW63b+NrrzohdEpHxELvZakffoqZDWjv0rsYRhTEGA/7n29cgz4X9USnOsoY1p5 X-Received: by 2002:a05:6870:d208:b0:1fb:75b:1308 with SMTP id g8-20020a056870d20800b001fb075b1308mr7192121oac.90.1702352782444; Mon, 11 Dec 2023 19:46:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702352782; cv=none; d=google.com; s=arc-20160816; b=fEyqlEs7+93cBtLUHIQ0QdBcuG3p7r/QZRFBLHqmWG6+Ii62uy0SkP1BEDoktMs51g b5CzByZzUtnKtwCNj58258lM8SRvkURyGO0nLqCPBXHiF4klTk33UJagDboK/sZIvg1Y 2onwUsgtHFQC0YLLAd1et14B/fCaR6IvRTrgGjoekFg+wiGrOFseL2amIEv38lZQUfUi mVFbtSfGD7QHOe7ShlBjwHxtmSvmCtWwE+OIP+lFWhYt1xuDqR1O1IoSQhdZ3rPWoVgF 7Hiok/tR+Tu72GiuZbYb1ir3Bm1rbzh/u1WkailBzpoe6UU+ji4Hye2ax6XRN6ssUGPH BzTA== 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:to:from:date; bh=q7yVvz/YIUHCsnXwREJIESDRJ53QxXczqGjWFfsByzA=; fh=VcHBNiCddDnfhprzQQwl3LJj+5QOydyMTBcmXdsB0QY=; b=kj3/plqNFGpz5TNtB/jsb/KKJ/SERGVZU9i2gEL/2wFa6bRr03r8kQlYSXYX6IJZJM QQsRv9+8mPkT8P70hdYhHPRogMVCv/ZYx+foOpFLEmFa4XYO/wu1mpT5OkpKqESUle/W DDHGArLP/YiG9bQdTXvs6g0USJgnL6EOqF6pFEwl/HPQ8viDxi/F4Kkw1bCfyoFqyVRs l0FkCYvyDeoKeQahInCnsltImuC7cfKaiiX0rS1VGm/JddrE+CBLkEs5MVQRzwEEcvvJ kDz+mRWNuvQ80o7WJW1to7F6Ut3VkO+UPXTRLbRQ9dGJB7DUF1uEQfMbIkFtPFu7KCpk 1Abw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id u8-20020a63df08000000b005c5e2165e37si7259408pgg.125.2023.12.11.19.46.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 19:46:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id B32E68046F05; Mon, 11 Dec 2023 19:46:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229530AbjLLDqD (ORCPT + 99 others); Mon, 11 Dec 2023 22:46:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbjLLDqB (ORCPT ); Mon, 11 Dec 2023 22:46:01 -0500 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5C17AC; Mon, 11 Dec 2023 19:46:07 -0800 (PST) Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96.2) (envelope-from ) id 1rCtiL-0002os-2z; Tue, 12 Dec 2023 03:45:47 +0000 Date: Tue, 12 Dec 2023 03:45:42 +0000 From: Daniel Golle To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , Matthias Brugger , AngeloGioacchino Del Regno , Andrew Lunn , Heiner Kallweit , Russell King , Alexander Couzens , Daniel Golle , Qingfang Deng , SkyLake Huang , Philipp Zabel , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-phy@lists.infradead.org Subject: [RFC PATCH net-next v3 0/8] Add support for 10G Ethernet SerDes on MT7988 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 11 Dec 2023 19:46:19 -0800 (PST) This series aims to add support for GMAC2 and GMAC3 of the MediaTek MT7988 SoC. While the vendor SDK stuffs all this into their Ethernet driver, I've tried to seperate things into a PHY driver, a PCS driver as well as changes to the existing Ethernet and LynxI PCS driver. +--------------+ +----------------+ +------------------+ | +---| USXGMII PCS |---+ | | Ethernet MAC | +----------------+ | PEXTP SerDes PHY | | +---| SGMII PCS |---+ | +--------------+ +----------------+ +------------------+ Alltogether this allows using GMAC2 and GMAC3 with all possible interface modes, including in-band-status if needed. Note that this series depends on series "dt-bindings: clock: mediatek: add MT7988 clock IDs"[1] as well as "dt-bindings: watchdog: mediatek,mtk-wdt: add MT7988 watchdog and toprgu"[2] being merged before. [1]: https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=809031 [2]: https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=802588 Changes since RFC v2: - use clk_bulk_* when ever feasible - rework Ethernet <-> PCS driver link, use device_link Changes since RFC v1: - drop patch inhibiting SGMII AN in 2500Base-X mode - make pcs-mtk-lynxi a proper platform driver - ... hence allowing to remove all the wrappers from the usxgmii driver - attach PEXTP to MAC instead of to USXGMII PCS Daniel Golle (8): dt-bindings: phy: mediatek,xfi-pextp: add new bindings phy: add driver for MediaTek pextp 10GE SerDes PHY net: pcs: pcs-mtk-lynxi: add platform driver for MT7988 dt-bindings: net: pcs: add bindings for MediaTek USXGMII PCS net: pcs: add driver for MediaTek USXGMII PCS dt-bindings: net: mediatek: remove wrongly added clocks and SerDes dt-bindings: net: mediatek,net: fix and complete mt7988-eth binding net: ethernet: mtk_eth_soc: add paths and SerDes modes for MT7988 .../devicetree/bindings/net/mediatek,net.yaml | 180 +++++-- .../bindings/net/pcs/mediatek,usxgmii.yaml | 60 +++ .../bindings/phy/mediatek,xfi-pextp.yaml | 80 +++ MAINTAINERS | 3 + drivers/net/ethernet/mediatek/mtk_eth_path.c | 122 ++++- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 291 +++++++++-- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 107 +++- drivers/net/pcs/Kconfig | 11 + drivers/net/pcs/Makefile | 1 + drivers/net/pcs/pcs-mtk-lynxi.c | 226 ++++++++- drivers/net/pcs/pcs-mtk-usxgmii.c | 456 ++++++++++++++++++ drivers/phy/mediatek/Kconfig | 11 + drivers/phy/mediatek/Makefile | 1 + drivers/phy/mediatek/phy-mtk-pextp.c | 361 ++++++++++++++ include/linux/pcs/pcs-mtk-lynxi.h | 11 + include/linux/pcs/pcs-mtk-usxgmii.h | 27 ++ 16 files changed, 1859 insertions(+), 89 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/pcs/mediatek,usxgmii.yaml create mode 100644 Documentation/devicetree/bindings/phy/mediatek,xfi-pextp.yaml create mode 100644 drivers/net/pcs/pcs-mtk-usxgmii.c create mode 100644 drivers/phy/mediatek/phy-mtk-pextp.c create mode 100644 include/linux/pcs/pcs-mtk-usxgmii.h -- 2.43.0