Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp685351rdb; Tue, 5 Dec 2023 17:44:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IECp6fUpb0REK9fYRtGiLFpg/1MgjR/rpo6kPNlQv4LlqELdPKo8JW880B4qcXcDfonfzYX X-Received: by 2002:a17:90b:1088:b0:286:8daf:85b4 with SMTP id gj8-20020a17090b108800b002868daf85b4mr2571673pjb.2.1701827072419; Tue, 05 Dec 2023 17:44:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701827072; cv=none; d=google.com; s=arc-20160816; b=spnkJ01zIV8ilm8OK3KGUSHsXgd+mxek8cHMrDaDAmXJhimedrVzJdKrvGyQVA84ke MDF7BbAH2vFak3p/rYFIQBn7F2WLtRKQvrIg00zWkRg2odxyYz3vRf1tPU+cn32i+98I AdVph8w4CjM83v15tr4r4onlKr/4l0YRpJezz3RPMxl+D/QJcdzGdh1w/pkD22yB6RXx /z2ikBW37+FwrMWknE9ny3wWFsRpLO4y3gFf5P6sQcmZa7ZXKJxJK3Cum+02HzBskaAP cTHQLrrij00U3yG5hFce6LBkt3x0WGMqJI5tLHhzgb3qhTaWxmUi91bfTSQV4WBt+pF+ Vf4Q== 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=UJpZNZ8ZbTL/bjhXPu3ciobGpQGDmeQH4Mywv+BbzOo=; fh=VcHBNiCddDnfhprzQQwl3LJj+5QOydyMTBcmXdsB0QY=; b=pXkSxz8bLj52RqlZG/fyFGT4JSKMoXk0e2o6p28YhwHUAIgetxSsy7lKfVsjdjRaY2 yegr0KMqimZWXJhdS981CIElj/OuRbhQ34SpC33HIstIS7k8sEv7cDIv6+eSASMfsPrg AzbBv1+4Yf/YYfVbTCAQSs8NvtHak/StmDanuiM92UU98r9A6ZervPd49NwAVGZ4meM6 c/gb26eI3Ju/xaOVoLaQq39ItZXncxbrTgUe5VzNWzlxvMZo1S/5sK6WF8uvYl3Kn9l5 +gxzM5fUSkYiZipLqXwcU8WuY3CC4gkxNmMT8PLMFCtkacQoLfTy4mKnZAD9edDnMd+2 Xojg== 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:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id ie2-20020a17090b400200b002886d6c7ea2si96438pjb.177.2023.12.05.17.44.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 17:44:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 87C8380310D3; Tue, 5 Dec 2023 17:44:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235227AbjLFBoK (ORCPT + 99 others); Tue, 5 Dec 2023 20:44:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235267AbjLFBoH (ORCPT ); Tue, 5 Dec 2023 20:44:07 -0500 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D3951AA; Tue, 5 Dec 2023 17:44:13 -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 1rAgx1-0002eo-1a; Wed, 06 Dec 2023 01:43:48 +0000 Date: Wed, 6 Dec 2023 01:43:44 +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 v2 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 05 Dec 2023 17:44:29 -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 patch "dt-bindings: clock: mediatek: add MT7988 clock IDs" being merged before. https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=807227 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 | 284 ++++++++++-- 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 | 170 ++++++- drivers/net/pcs/pcs-mtk-usxgmii.c | 413 ++++++++++++++++++ drivers/phy/mediatek/Kconfig | 11 + drivers/phy/mediatek/Makefile | 1 + drivers/phy/mediatek/phy-mtk-pextp.c | 365 ++++++++++++++++ include/linux/pcs/pcs-mtk-lynxi.h | 1 + include/linux/pcs/pcs-mtk-usxgmii.h | 26 ++ 16 files changed, 1746 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