From patchwork Sun Jan 28 11:56:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Palumbo X-Patchwork-Id: 13534447 X-Patchwork-Delegate: kuba@kernel.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2026.outbound.protection.outlook.com [40.92.59.26]) (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 9858B200AA; Sun, 28 Jan 2024 11:56:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.59.26 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706443017; cv=fail; b=d4FEU11A2xm10MfLUwTkF9dJMKvZZMphsARxy25zudS6GPTiCBEhKhVLQlMUoU7ywtuuORoXS3DrfJNzajA7FaQah6JVcRhZK2xyqG9SnalE5VOLylI51IdYqJwr30S8/WbxK4KZSw4iJFdebZmG14WFBBTkcEde3GPU0t8B+zY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706443017; c=relaxed/simple; bh=UgsXPaoDs8H6h3uiW+dlGv2MoKDLED7s9q+ne/AUsFQ=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=AU8I9cYvroF5ebEbv2gUgrGEYpuz3dQpe1fJU+cY+KryaWBHGn2hPUVgOI2pqjlFmfNnQf9FWpLtYapahAqejVDmeiW02dZZq1IAcNfTcbVu4OaB6/DFmTQ57AG/Yy7aJspozLlUatlAYXoka16tDj0Lvw0tjtMwmFWO6+oncPE= 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.59.26 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=VBe/dxi4GfWKcli80cXbHJUsE05P8AtT01q27lvML/kgN4XdWiD7YnuqM7vUBS+J77OVEpTJvwI0p1ExIEtWRAipYwAsCi2iHTQLDUSkmrGNfzDpNT9ZWv01DMsMNMViTy/WZ29l3Y01EiAM0by+4FW2WdvdBgUnav+dZYhv6uon8xtDJ+sT+R9szvDkUa3DC1XTgRGTXK10o8sKuoNdKLQaybSReR0eEX4NOy7YNRSWMCIiRnQhIGOjq5vZ7lBKVCM+ugp53KUNDWxlcfKt2Xu71wOXWS5z4h+jJl68KVYiWNbgfKvbX36oGoAWbSrzRzzbbmH4rkB/OY6cQFOznQ== 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=2X1cCmQlH7uQqRiokg2ArH8Y4glMulVK9ARLleL7ChI=; b=nfxhRtIGf/2vQi6vGUvuySydQtVsLratd6cFtbO+5H44EKlI2qCPjwfByV4oC4vKr5spP0SdOlerka562U7peoXfZXToGe0Ut0aYELRyGet1JePJDCTENOZ5A4SHOsNU2onAcb7YtWOKQNICd8PGVL6648BkF5zONB3jjnOsaYPacsVMaY4CQU8DMFcMNPinCOoEuhpJsUiyFiSMLgt+/nuykBPp4NPW6BKfUwMMTjz+efR491mzpeVYHAQsa7HajdkJBJiXkGf2Svz7NLxW9QEcXk1F+IH1zG4+wgUJuayl0kmqCvsa4L3o7tTpTYxHfq7J1TV8i+OwiOf0lvs/Bw== 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 PAWPR03MB10134.eurprd03.prod.outlook.com (2603:10a6:102:342::14) 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 11:56:52 +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 11:56:52 +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 OEM DFP-34X-2C2 GPON ONU SFP DFP-34X-2C2 is a GPON spf module working at both1000baseX 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 Date: Sun, 28 Jan 2024 12:56:25 +0100 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [Ij/+dckAOUh8i5q62aimpnsGqBK2bLqw] X-ClientProxiedBy: ZR0P278CA0129.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:40::8) To AS1PR03MB8189.eurprd03.prod.outlook.com (2603:10a6:20b:47d::10) X-Microsoft-Original-Message-ID: <20240128115625.6278-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_|PAWPR03MB10134:EE_ X-MS-Office365-Filtering-Correl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v1JyEwP0u2+FbZHPdTSTv+8/QUrIig+W5AdKd7KIJp3MV2hvc4qhUKO597a46SalhmDwRGMMPFd4MLRY+iLgVZ/xEUGnOvtKR4Cf2wm61RllY/c2b4jXFf7QETlpWewAhxv3aR374c19HjlXdT9Ip+DDWHksPGNf7DwfFzq5NZhlsurMlRvTSc6xq71hrq0JZY1z9hkBeF9gKAHNhFKz1jwobOaqFeiJfxiyle6sOXJnVnMi4eGj4nh6aCN2oy7mg46aGJxyqJEkZCVNCZpxg1jPYAbw2WV33mpoACirGrxc4UMLBvIl+4KfivbDHvWgXX+BLe+U4vp3iERIfaijI2ahrA7YhqsAB0VM92q19c4hGnYQrlOIH2OZ/gziV9mc7ivWLn/QlGdiOagmaFWSypO7C9nnJ3VizM8wb34kbXsf3ep9nKbHwRSoBNQ/AYsqxdF9XuMD7LC4Gt+iy8Onap/9DEI7mDhdExifAu++vsuUSPZhl4Gxf6F0ow9U6QUF01EoCSumedBCVovVprlPeyJ8grxtaGAibKpVTpRsiIzvvig1t3jpAKo+LUAUZrftQV4RHjzJD231z0bICh8dhF9cYZCldA8kc7qEsk+Dmq4Jr6oqhs/6wmNQA8nzL6tESILFOGop1Je85QtpDb//xQcNK/iZNZJots6LpwQUEO/vs3cDFrhioe6/Oh2GYJo1U1Gco6IKjghTu/c8awmJF9SUvRE6Eda4iks3tQ= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-76d7b.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 9b3a6f0f-f4cd-4c2f-67e5-08dc1ff83433 X-MS-Exchange-CrossTenant-AuthSource: AS1PR03MB8189.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jan 2024 11:56:52.3972 (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: PAWPR03MB10134 X-Patchwork-Delegate: kuba@kernel.org 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 10001000baseX 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 "OEM" 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 f75c9eb3958e..260917488c77 100644 --- a/drivers/net/phy/sfp.c +++ b/drivers/net/phy/sfp.c @@ -502,6 +502,9 @@ static const struct sfp_quirk sfp_quirks[] = { SFP_QUIRK_F("Walsun", "HXSX-ATRC-1", sfp_fixup_fs_10gt), SFP_QUIRK_F("Walsun", "HXSX-ATRI-1", sfp_fixup_fs_10gt), + // OEM FP-34X-2C2 GPON ONU support 2500base-X + SFP_QUIRK_M("OEM", "DFP-34X-2C2", sfp_quirk_2500basex), + SFP_QUIRK_F("OEM", "SFP-10G-T", sfp_fixup_rollball_cc), SFP_QUIRK_M("OEM", "SFP-2.5G-T", sfp_quirk_oem_2_5g), SFP_QUIRK_F("OEM", "RTSFP-10", sfp_fixup_rollball_cc),