From patchwork Fri Jul 21 06:00:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raju Lakkaraju X-Patchwork-Id: 12377 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp5675vqg; Thu, 20 Jul 2023 23:29:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlEf1xOWKqkfdkPpadYODoJ+lA3v9aGeroBytA400zEvnfKhpADCgB3XhFT4B3IsjKryQIXc X-Received: by 2002:a17:902:a414:b0:1b8:c972:606a with SMTP id p20-20020a170902a41400b001b8c972606amr976941plq.51.1689920997576; Thu, 20 Jul 2023 23:29:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689920997; cv=none; d=google.com; s=arc-20160816; b=cs59jan8Px6RjL4960HRdTNbQbtZt8IetAknsbTe+8snJxcr4/+Gfn2EIWMcrjC/Lg nSRpcIuZyrxBWP/vWowE5WlTDy6hRTqxxGQro2Ma7MG18iB5hJAtIYnOBCJi50+5rZRV p9CTGnYtorLe2e+zoTEP2mp3FeCa2dCDb+VJ7p5nfTGF03wG0TQJqdDCHO6YneMDt0VW d84lIBtzdeXAj3IJfEa7SlLIn0PJqvn1AkT7D57hAmjUu9e1VkGDE0nbG4wLBu93uH11 YYYzpx0KrMvQqtykj3PM3B8YUkaFc07DEyhRmh68XZpQ4U9fhJ3fuN0ke8amFj6FZ11p QHFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=UunMlPb7k64OkTgGvZ1mwry7p3vrAKRpWI/hXEECouw=; fh=qv6R2IaILI1S1xEIxOZzAcF4rN0hGtVsF9kjKc0mAD0=; b=dFZcwSVMyMtPBFBf6SQ2dxrikOYnTfZobbyZXVIrZIymYCQWfkOcB+NwcXjcgS6nNm aBhrqICNHnj+CvctVmXnhg0JzcJl8tn9SeULhdnjgzaYSq27Na7FElIt623bL8A8F+sY 9gxffClWSwg2/aD//K80aO8ZZJmXoHTTYf7ZzEuURPEXvNjISWqPzowjG0srv//BIkI8 SdhRsUGEVbREzapKdSqOtBMAuNkAf0dgaOt8wA4/9o14yN0CV1ja7cqpfxQcPF1IYvEi gnlKfzWDent1ijlyULZ6Cc3DFidee8+ddaYUL1zDQ4Sj/s75YFu5bgVdxVt+JAzifvH5 Xfxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=hnpDb29w; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w3-20020a170902ca0300b001afc602cd5esi2306286pld.90.2023.07.20.23.29.44; Thu, 20 Jul 2023 23:29:57 -0700 (PDT) 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; dkim=pass header.i=@microchip.com header.s=mchp header.b=hnpDb29w; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229783AbjGUGAm (ORCPT + 99 others); Fri, 21 Jul 2023 02:00:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229553AbjGUGAl (ORCPT ); Fri, 21 Jul 2023 02:00:41 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2759010E5; Thu, 20 Jul 2023 23:00:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1689919240; x=1721455240; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=WKA/IGfWnpS4IR7jGsDv1clVOOBnyLhIowkT0Wqkn7M=; b=hnpDb29wOLUIey3jmVHd6tO4tN65YesFSnLQHMmx4WNsePVjbxMOoOrC 5vAqxeSvXr4dIScGmsQao4wR1tWH0rKL679qNNNxIHowm9AB2/u52vMCV dp/WNPf5nu6ME4eoYUZqHRVchuyhePcV2CFb9fkjx77EYzUPMBnAsbcBK kAF3kiTPPzrIKXZjogC6/48rxoYlnj7q4ehKeXk/Kl/Xb84uHR2kvPwj0 yJhswNLbZ3ssP+9i7fU8dARxhEyPWOQKvM2v+18Dt03mQ1QOzLrS+tnN0 Jx0vopuAFFbV796pjuBYBSjrzsQyHYSLuPscywMP9E4j9zfVl6D78rroc w==; X-IronPort-AV: E=Sophos;i="6.01,220,1684825200"; d="scan'208";a="225102692" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 20 Jul 2023 23:00:39 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 20 Jul 2023 23:00:33 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Thu, 20 Jul 2023 23:00:30 -0700 From: Raju Lakkaraju To: CC: , , , , , , Subject: [PATCH net-next 0/7] Add support to PHYLINK and SFP for PCI11x1x chips Date: Fri, 21 Jul 2023 11:30:12 +0530 Message-ID: <20230721060019.2737-1-Raju.Lakkaraju@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: INBOX X-GMAIL-THRID: 1772010599834824148 X-GMAIL-MSGID: 1772010599834824148 This patch series adds support to PHYLINK and SFP pluggable module. Add software-nodes to hold the network interface phylink, sfp, i2c and GPIO configuration and integrates the PCI1x1x chip I2C driver and GPIO driver to access the SFP module EEPROM data. Tested on chip PCI11010 Rev-B with Bridgeport Evaluation board Rev-1 with following SFP modules: 1. FS's 2.5G SFP (SFP-2.5G-T) with 2.5 Gbps speed (interface 2500Base-X) 2. FS's DAC10G SFP (SFPP-PC01) with 2.5 Gbps speed (interface 2500Base-X) 3. FS's 1G SFP (SFP-GB-GE-TL) with 1G/100M/10M bps speed (interface SGMII) 4. Axcen's 1G SFP (AXGT-R1T4-05I1) with 1G/100M/10M bps speed (interface SGMII) 5. Excom's 1G SFP (SFP-T) with 1G/100M/10M bps speed (interface SGMII) Raju Lakkaraju (7): net: lan743x: Create separate PCS power reset function net: lan743x: Create separate Link Speed Duplex state function net: lan743x: Add SFP support check flag net: lan743x: Add support to software-nodes for SFP and PHYLINK net: lan743x: Add support to the Phylink framework net: lan743x: Add support to ethtool phylink get and set settings net: lan743x: Register the platform device for sfp pluggable module drivers/net/ethernet/microchip/Kconfig | 4 +- .../net/ethernet/microchip/lan743x_ethtool.c | 34 +- drivers/net/ethernet/microchip/lan743x_main.c | 707 ++++++++++++++++-- drivers/net/ethernet/microchip/lan743x_main.h | 42 ++ 4 files changed, 718 insertions(+), 69 deletions(-)