From patchwork Sun Jan 28 14:06:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Palumbo X-Patchwork-Id: 13534471 X-Patchwork-Delegate: kuba@kernel.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2040.outbound.protection.outlook.com [40.92.91.40]) (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 3B7FB23748; Sun, 28 Jan 2024 14:06:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.91.40 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706450821; cv=fail; b=MM/h+6Y9c1h1THKJ904NoMUfX0+G6fQmEXUCdKDNsNx0KXAgltuZJXs+lOUsf087/O8N8hH769wwGhGrxdwMHLgcyP5yAI2CBGqBeGZJrRdNwG4nuxs3NWZIkh0XeBZ6hkB7lHw7EJ/A1/Gu8zLyHhNj5GwCV+oZ9zyMU5OlW3M= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706450821; c=relaxed/simple; bh=Pwy3+XnTJFvvlQdROLru3bEVpmPaK+4+cIH3qbGxrWk=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=XVqUhHHuDAqIeKLNsmjdoiEjSbqQrOHXtiObMcO18prziQns+Z6PZsboJDlOSJ3MUhlbZFwx4ubuvc/QlhxYgieMP4oWwk+8PKrvV1GVUbtE65geN6rCz81hJuemnP9H5wkGE3oHDDQOTsmoKQaEe7KYJdfWwHbylfCSEyNaaiY= 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.91.40 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=JP3/FRp0CMeL8eu8lz8vGE2qBtSY25rfuAkYOaVb+N+9P0USvsATA1gaToJl2zohTO4kwVuaHSt8zwoyhYm9r2yDnn4tTUPck6w70YnjqL6WTT432eeFuicEd+o+4iKPOI/Xoo02J8DFbWWmuaZW1NFcKT9IGC2NhzfCAFHfxYz96XbNuX8FuBLDX5Nhy4tUJ9gJOu8IfyWKL2yFDlDXpSbNRmQO0ltRewV+0LKrf8JmMaHebHBcHOkDk9tU6wE6tdfBA5D0kDYuQm2kFABRnthQhVhm+/84dllTbrnN8LL0eHsWuhyo8HKhioLI5XzWsySFaGaMSLn15yKWYcfCog== 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=q2sEBf9r0iv6Sdjil6/yna65vQCMIk1zB8mnfFh3XNY=; b=Wu/ysNzX6Qh7cZwZ5qhcLYVNF2vp4WJE5K1zE5TlAC2DuTqtoJNN/pusW5z9Z/ls3EbwodzvxWE8NOKK4liRXwYH31w8HEK1jq/HJDoZCJEmh1EQvOuGfpIVSGyI6BlNubKDeNuNlz2jo6s72tygFtaMwNU3zF/NQQEB3zrCkdJlk6boQDrVFpZubz8J9TRsIiT/Cbe6F9//xOgavDcdZHUFoz18V30I1xgNIkZccdsEmqSRIP2/YOdBnGwZoHXKMmc6ENnNv2cE081vh/cZh8cU5FOyoxgf07F99U+DeNXra3lNNSRunyeDdZyk8k9vDsu12D/l06iS5vpxKW4Jng== 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 AM9PR03MB7742.eurprd03.prod.outlook.com (2603:10a6:20b:3dc::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.32; Sun, 28 Jan 2024 14:06:56 +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:06:50 +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 Date: Sun, 28 Jan 2024 15:06:33 +0100 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [G3Q7lYVxeWH//9HFfIlTk0Lwc/MFRxg+] X-ClientProxiedBy: MRXP264CA0041.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:14::29) To AS1PR03MB8189.eurprd03.prod.outlook.com (2603:10a6:20b:47d::10) X-Microsoft-Original-Message-ID: <20240128140633.8753-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_|AM9PR03MB7742:EE_ X-MS-Office365-Filtering-Correlation-Id: 580f6c84-c2cf-4a8f-cf06-08dc200a5f61 X-MS-Exchange-SLBlob-MailProps: Mga27o8vReGfIc1VICO0dmEM3GFX/n+pKij/noRrFm5eFC94ZWVs7OYPy+eLKYealSEu5Rzm/dABZiPST74dh61UzERh93w7y3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SIP4kL8rsgcPNu9SeNlfiqCM82XpN92rsK+E4R93RFLQqCidjSkqBR+6v6XndP5QsTU2VzyBb9u3TSGZiItUxWutVHNrKqQ0/l/Mqa6p66/O1G+eNsjuKEhXawKY75o3I8EII/bYSBpHJxMkPgtZP0UNL6WWYaH1pzu4zmiWw+mFbr1p5ZXMGHKqX/Ts2DpQ5irNqWDTRdgTmOeXqaFROW+/Slhj0OICXKq57nYxmDI8YQY7ZfFWggIW7ol+WOX4YQP4Z/n6VLj4uLXZc5N3y1uFmiGV5Rd7+hitLDpY6uyBsojABSsE5vgIw/fStjc/h5Lcq+gteiEJY2dI4oVlVpstrJgEM04nK/Wmkm5eNCT+3KPz1wrAgXZOIYgK1/YLkvT7qrV6Ja5jpfNe2r4FhMFrGo4lgef32X4Q9/T0KktmTOeqT6iCocoe8WypKY6kPdLKFuJCXXZJPXjw56P4GnaO4JbpETr2Z1U+8GvEn0j/IKqyIerNHDOAvjZF9s9vJegpvuwwCq6GUhy9o7FHAE= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-76d7b.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 580f6c84-c2cf-4a8f-cf06-08dc200a5f61 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:06:50.3777 (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: AM9PR03MB7742 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 "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..3c0028a4af92 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 DFP-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),