From patchwork Sun Jan 28 14:23:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Palumbo X-Patchwork-Id: 13534488 X-Patchwork-Delegate: kuba@kernel.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2067.outbound.protection.outlook.com [40.92.89.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46B97241E7; Sun, 28 Jan 2024 14:23:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.89.67 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706451808; cv=fail; b=fEXMkVWCt2iMafJDCJTr0lk5w+5kEoxZ1So3xyD57hpHsNHylB7qmzyj+Pm245fFPPMq0qR1Ex8tDFuSZsJ0pE9vIBayTaMgd2ZkJwv/kQQ7+6Z6HizBzPyytZydLo0OYlLZXCJSUN5FJj8Vu/MDauna+XsEj4xLDtjh356zfMk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706451808; c=relaxed/simple; bh=d2WMKZY+3t9jbldqzkavAqU5GD8DKg10YeWWzr3jUrE=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=kzgQwOH4odQFUx+oDfsXepeb9CcMWZxJ0U/itub/WQ/jpRxPQ6cWF/C7g/PJ3H+K/ufC2v1QMFOiNv3JCcrNu2JGR3BfoS0IwkCB4DMev3+SLb1/VKYDINA27vtSPISLYCka6R6GyPdIklBANL9EO5lMC0GL8ouWo3Wi9B+5aoY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=outlook.it; spf=pass smtp.mailfrom=outlook.it; arc=fail smtp.client-ip=40.92.89.67 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=outlook.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=outlook.it ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TQroOjk/peCMon7TpLfejotRrjQmFBm3uYh+yMeNdiLFR1yaJII+Oa1HhpXCqiL5Qs39/8aeEvq7mNrFxC9yhnZKF6xzwG4vaeogplkU/sDfO9ZV/mvFA2OyoVHHZAhQjQslYlzCik8095ry10izfh738qhxJtOSv/eMvtAuzmv0iDT3F4WRSGzniIWOb1tH3I5M5hexLcCEpg4Bm+eFNjJlqSke1jPi3EUQD2FKFXWaQg/Umk2ukJh41tWlFqpqJN3b7FWA1piwl/ASW4r3SwclZ5p3NWObt9vmD7IN2S8/CnL162FFltGAZqMrsHsxJuE6aZsg+4UDaqJuhcwLwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Qm3HM7lQpUjQ1nzPiH22X/nSNCuj3o416xBMbM7HM50=; b=NsQGvt3gbu0j0hJM83Pc3eWT84OzQiFu8iWaRJPNmqdZZQCiNfmStIwTjXB7o5Q+PM4xPCUuGBYO7UqNv1R03NoRNDPesS2VRMI9TFzKbPciiQFomZM2xdCSt1qGAqByzCUiJhM8kl9lc2HoYTrCrDUxeolmXfPZmK9BAKbDEwsSwdaYeEynLzFgSJqeGmyHUSalaQWpbyWJZUjRrkU9qgPGHYK71ViQdxr8YJP9zStIY7ZA7UYP3gy3xorqb7zS7AUJ1xBZePsXLrpfpjdbxH0SvUjVz6VOg9cKmJ6Md1FlpiVLvtx7+A6eWZuo0XeNNBEgoWYjrygVgM7kmV3n+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from AS1PR03MB8189.eurprd03.prod.outlook.com (2603:10a6:20b:47d::10) by DB9PR03MB7401.eurprd03.prod.outlook.com (2603:10a6:10:221::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.31; Sun, 28 Jan 2024 14:23:23 +0000 Received: from AS1PR03MB8189.eurprd03.prod.outlook.com ([fe80::ffb3:3ff8:6ea9:52b5]) by AS1PR03MB8189.eurprd03.prod.outlook.com ([fe80::ffb3:3ff8:6ea9:52b5%5]) with mapi id 15.20.7202.035; Sun, 28 Jan 2024 14:23:23 +0000 From: Sergio Palumbo To: Russell King , Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next] net: sfp: add quirk for ODI DFP-34X-2C2 GPON ONU SFP Date: Sun, 28 Jan 2024 15:23:06 +0100 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [IIiiBF5+Rhd7ugK03V6Oe7V70fxjqOGl] X-ClientProxiedBy: MR1P264CA0003.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:2e::8) To AS1PR03MB8189.eurprd03.prod.outlook.com (2603:10a6:20b:47d::10) X-Microsoft-Original-Message-ID: <20240128142306.9120-1-palumbo.ser@outlook.it> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS1PR03MB8189:EE_|DB9PR03MB7401:EE_ X-MS-Office365-Filtering-Correlation-Id: 990fe7c8-c0b2-44a4-ec35-08dc200caf5d X-MS-Exchange-SLBlob-MailProps: Mga27o8vReGfIc1VICO0dmEM3GFX/n+pKij/noRrFm75yCKydnQV05IGpsbeQPm3bsAL+K7Ki3WKjxUWTI4EnK74GQnS0jRKN3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wCilBAdcl58FctlnOkyl2vgJdvPyN9W5hjkjv/lzFlyuaTv3wbxBEAXTEVE19dp4wjV3U+GtOhviA4W3DLjWodJUWDoDxBIycWAAt+oiZ2OeKIkZ+DR4F8E4IIW596rC/UOcCeP9uZ2aRABqYEj3EA4wCvz0TMmibKhlZ3H8wUYXSa18gsqSQ/FpZM2RvF14r6sonVFUhGnWjvXIJotk3sdxiRJeJQhW4spoXYX2O5b+uydiWuhXvqYdrF6om4if6zm6wz2VcRjBQ4y7R/yNu0eSARI+ScAF8wkpIVPMa0lhSF+NLnVjcWFzL7nkAt0s6vjRmGFdr8EJKQe6iuoqDdEKMZsAtcFbcuvHO/rUkeAQQoyt05al8egDxLQIKG/yfVD1NCvQTw9qwWv0ni9QupCDovAZe58vx3l2U9ViRNqTC8w5JTrsseULeILYDmCfX2AGKX90NeBUODco/TLyFdXjQvuiaas8fkvKNucA8OOXzdrZ/hArCt4TgKxF3mSu2Y0gJ62eRYdPdfa/rX2fcNFLufgoE1E/Rc= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-76d7b.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 990fe7c8-c0b2-44a4-ec35-08dc200caf5d X-MS-Exchange-CrossTenant-AuthSource: AS1PR03MB8189.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jan 2024 14:23:23.5314 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR03MB7401 X-Patchwork-Delegate: kuba@kernel.org DFP-34X-2C2 is a GPON spf module working at both 1000baseX and 2500baseX. Setting the module to LAN_SDS_MODE=6 the module is working at 2500baseX with auto negotiation see at https://hack-gpon.org/ont-odi-realtek-dfp-34x-2c2/ Unfortunatly the module's PHY is accessible at 1000baseX only. ethtool returning: Supported ports: [ Fibre ] Supported link modes: 1000baseX/Full After applying the quirk: Supported ports: [ Fibre ] Supported link modes: 1000baseX/Full 2500baseX/Full Tested on BANANA PI R3 in OpenWRT v 23.05.2 Kernel 5.15.137 Tested on sfp to ethernet Media Converter. Autonegotiating 1000baseX or 2500baseX according to the connected host speed. This module is existing in 2 versions: Vendor = "ODI" Vendor = "OEM" This is the patch for vendor "ODI" Patch has been inserted keeping the list in alphabetical order first by vendor first and then by part string. Signed-off-by: Sergio Palumbo --- drivers/net/phy/sfp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c index 3c0028a4af92..410375bc6b94 100644 --- a/drivers/net/phy/sfp.c +++ b/drivers/net/phy/sfp.c @@ -495,6 +495,9 @@ static const struct sfp_quirk sfp_quirks[] = { // 2500MBd NRZ in their EEPROM SFP_QUIRK_M("Lantech", "8330-262D-E", sfp_quirk_2500basex), + // ODI DFP-34X-2C2 GPON ONU support 2500base-X + SFP_QUIRK_M("ODI", "DFP-34X-2C2", sfp_quirk_2500basex), + SFP_QUIRK_M("UBNT", "UF-INSTANT", sfp_quirk_ubnt_uf_instant), // Walsun HXSX-ATR[CI]-1 don't identify as copper, and use the