[{"id":3656491,"web_url":"http://patchwork.ozlabs.org/comment/3656491/","msgid":"<4be6f824-fa05-490b-8414-e08e654523ff@alliedtelesis.co.nz>","list_archive_url":null,"date":"2026-03-01T19:19:37","subject":"Re: [PATCH] i2c: rtl9300: add support for 50 kHz and 2.5 MHz bus\n speeds","submitter":{"id":27499,"url":"http://patchwork.ozlabs.org/api/people/27499/","name":"Chris Packham","email":"chris.packham@alliedtelesis.co.nz"},"content":"Hi Jan,\n\nOn 28/02/2026 00:11, Jan Kantert wrote:\n> Some SFP modules on certain switches (for example the ONTi ONT-S508CL-8S and\n> XikeStor SKS8300-8X) exhibit unreliable I2C communication at the currently\n> supported speeds. Add support for 50 kHz and 2.5 MHz I2C bus modes on the\n> RTL9300 to improve compatibility with these devices.\n>\n> Signed-off-by: Jan Kantert <jan-kernel@kantert.net>\n\nReviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>\n\nThanks,\n\n> ---\n>   drivers/i2c/busses/i2c-rtl9300.c | 16 ++++++++++++++--\n>   1 file changed, 14 insertions(+), 2 deletions(-)\n>\n> diff --git a/drivers/i2c/busses/i2c-rtl9300.c b/drivers/i2c/busses/i2c-rtl9300.c\n> index 672cb978066d..67a5c4228fc9 100644\n> --- a/drivers/i2c/busses/i2c-rtl9300.c\n> +++ b/drivers/i2c/busses/i2c-rtl9300.c\n> @@ -11,10 +11,16 @@\n>   #include <linux/unaligned.h>\n>   \n>   enum rtl9300_bus_freq {\n> -\tRTL9300_I2C_STD_FREQ,\n> -\tRTL9300_I2C_FAST_FREQ,\n> +\tRTL9300_I2C_STD_FREQ,\t\t\t// 100kHz\n> +\tRTL9300_I2C_FAST_FREQ,\t\t\t// 400kHz\n> +\tRTL9300_I2C_SUPER_FAST_FREQ,\t\t// 2.5MHz\n> +\tRTL9300_I2C_SLOW_FREQ,\t\t\t// 50kHz\n>   };\n>   \n> +#define RTL9300_I2C_MAX_SUPER_FAST_FREQ\t\t2500000\n> +#define RTL9300_I2C_MAX_SLOW_FREQ\t\t50000\n> +\n> +\n>   struct rtl9300_i2c;\n>   \n>   struct rtl9300_i2c_chan {\n> @@ -433,6 +439,12 @@ static int rtl9300_i2c_probe(struct platform_device *pdev)\n>   \t\tcase I2C_MAX_FAST_MODE_FREQ:\n>   \t\t\tchan->bus_freq = RTL9300_I2C_FAST_FREQ;\n>   \t\t\tbreak;\n> +\t\tcase RTL9300_I2C_MAX_SUPER_FAST_FREQ:\n> +\t\t\tchan->bus_freq = RTL9300_I2C_SUPER_FAST_FREQ;\n> +\t\t\tbreak;\n> +\t\tcase RTL9300_I2C_MAX_SLOW_FREQ:\n> +\t\t\tchan->bus_freq = RTL9300_I2C_SLOW_FREQ;\n> +\t\t\tbreak;\n>   \t\tdefault:\n>   \t\t\tdev_warn(i2c->dev, \"SDA%d clock-frequency %d not supported using default\\n\",\n>   \t\t\t\t sda_num, clock_freq);","headers":{"Return-Path":"\n <linux-i2c+bounces-16299-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-i2c@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=alliedtelesis.co.nz header.i=@alliedtelesis.co.nz\n header.a=rsa-sha256 header.s=mail181024 header.b=XPQKmITe;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-i2c+bounces-16299-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=alliedtelesis.co.nz\n header.i=@alliedtelesis.co.nz header.b=\"XPQKmITe\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=202.36.163.20","smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=alliedtelesis.co.nz","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=alliedtelesis.co.nz"],"Received":["from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fPBw22YpPz1xy2\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 02 Mar 2026 06:29:38 +1100 (AEDT)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 14BD73012BFA\n\tfor <incoming@patchwork.ozlabs.org>; Sun,  1 Mar 2026 19:29:36 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 98BF5325710;\n\tSun,  1 Mar 2026 19:29:33 +0000 (UTC)","from gate2.alliedtelesis.co.nz (gate2.alliedtelesis.co.nz\n [202.36.163.20])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id F34C4302753\n\tfor <linux-i2c@vger.kernel.org>; Sun,  1 Mar 2026 19:29:30 +0000 (UTC)","from svr-chch-seg1.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n\t(Client did not present a certificate)\n\tby gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 361D12C083A\n\tfor <linux-i2c@vger.kernel.org>; Mon,  2 Mar 2026 08:19:38 +1300 (NZDT)","from svr-chch-ex2.atlnz.lc (Not Verified[2001:df5:b000:bc8::76]) by\n svr-chch-seg1.atlnz.lc with Trustwave SEG (v8,2,6,11305)\n\tid <B69a4914a0001>; Mon, 02 Mar 2026 08:19:38 +1300","from svr-chch-ex2.atlnz.lc (2001:df5:b000:bc8::76) by\n svr-chch-ex2.atlnz.lc (2001:df5:b000:bc8::76) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.2.1748.39; Mon, 2 Mar 2026 08:19:37 +1300","from svr-chch-ex2.atlnz.lc ([fe80::a9eb:c9b7:8b52:9567]) by\n svr-chch-ex2.atlnz.lc ([fe80::a9eb:c9b7:8b52:9567%15]) with mapi id\n 15.02.1748.039; Mon, 2 Mar 2026 08:19:37 +1300"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1772393373; cv=none;\n b=P61BVgQnwpNXP6KFGKUnoPFqFdOQX6EqFSVOUoZTJF6YiARjrOoYAglbiJ+PYXCv8ypcc3hzYWi3hFJjHSiWx763snk6dxurvfFqkenNtycXTGMWxh9TI41Ddut8//O/7TXU0dAde6HkhXv+9Nbeddw5zFeIC7HT0WJ/kLwlTMI=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1772393373; c=relaxed/simple;\n\tbh=2NqTcIliIP77dCY1wsxxiykKVs/kDKw87cIQmtO8uXA=;\n\th=From:To:Subject:Date:Message-ID:References:In-Reply-To:\n\t Content-Type:MIME-Version;\n b=a6GqP7c+VmPikFYDWlpZpXi72eyQZMFzOPnnXvxSnZY+3rMNWaVnzMajHz9rHrojvmygOjYyyBJR54CyKSSKLsqD3ISvQ6HJRxXZgwuy2pzFpil06J1RiqTHmU+jrytrThgqSc7LUGDaE1td39YnzeKDCVDQZkg6aZr4ViYFdw0=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=alliedtelesis.co.nz;\n spf=pass smtp.mailfrom=alliedtelesis.co.nz;\n dkim=pass (2048-bit key) header.d=alliedtelesis.co.nz\n header.i=@alliedtelesis.co.nz header.b=XPQKmITe;\n arc=none smtp.client-ip=202.36.163.20","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz;\n\ts=mail181024; t=1772392778;\n\tbh=2NqTcIliIP77dCY1wsxxiykKVs/kDKw87cIQmtO8uXA=;\n\th=From:To:Subject:Date:References:In-Reply-To:From;\n\tb=XPQKmITeAAIMCJGLZuCOQQiLSghHxz8h1CU/sRuLmPFHUOkbgqT6AO+mHJjP6FjV6\n\t MYBYJRw7LH23VqpSzddCsvtIkW9uuNhlCZjz4UAv9AASvPAbYdKlnQfAGw/pHzZ9aQ\n\t fHnRijwwv1PEzl5W4ZKZyQqPcxEDloa0CrtunFa40lxNfCHieBaoURFxkBvLpLCqi2\n\t QpqVU01UPN9loaLBPlWOsfoWqb3b43j7zbwK0E8s3RR2MP+ZMTmpanoBNRbMpGxpqj\n\t 8y5jfLHPB1ZwXSnFlXbU0DJclC68lqb8r2ikerwFnm4rTKL3ewODGezWmipjX9KL5e\n\t cSntZFYO9vE4g==","From":"Chris Packham <Chris.Packham@alliedtelesis.co.nz>","To":"Jan Kantert <jan-kernel@kantert.net>, \"linux-i2c@vger.kernel.org\"\n\t<linux-i2c@vger.kernel.org>","Subject":"Re: [PATCH] i2c: rtl9300: add support for 50 kHz and 2.5 MHz bus\n speeds","Thread-Topic":"[PATCH] i2c: rtl9300: add support for 50 kHz and 2.5 MHz bus\n speeds","Thread-Index":"AQHcp9nlfaiyPOZwFkOkq2cdAuASo7WZNw6A","Date":"Sun, 1 Mar 2026 19:19:37 +0000","Message-ID":"<4be6f824-fa05-490b-8414-e08e654523ff@alliedtelesis.co.nz>","References":"<20260227111134.2163701-1-jan-kernel@kantert.net>","In-Reply-To":"<20260227111134.2163701-1-jan-kernel@kantert.net>","Accept-Language":"en-NZ, en-US","Content-Language":"en-US","X-MS-Has-Attach":"","X-MS-TNEF-Correlator":"","Content-Type":"text/plain; charset=\"utf-8\"","Content-ID":"<505EBE91AC551C449B7CCCA8D0AF953F@alliedtelesis.co.nz>","Content-Transfer-Encoding":"base64","Precedence":"bulk","X-Mailing-List":"linux-i2c@vger.kernel.org","List-Id":"<linux-i2c.vger.kernel.org>","List-Subscribe":"<mailto:linux-i2c+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-i2c+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","X-SEG-SpamProfiler-Analysis":"v=2.4 cv=d/NWygjE c=1 sm=1 tr=0 ts=69a4914a\n a=Xf/6aR1Nyvzi7BryhOrcLQ==:117 a=xqWC_Br6kY4A:10 a=drD7vYo3kbIA:10\n a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=yYSUFh-PAAAA:8 a=DGfo-y3Mp4DUiHDfqWQA:9\n a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=CgABnY4_5IjXit5a9HeR:22","X-SEG-SpamProfiler-Score":"0"}},{"id":3672451,"web_url":"http://patchwork.ozlabs.org/comment/3672451/","msgid":"<ac2Vet5edXeh_wo2@zenone.zhora.eu>","list_archive_url":null,"date":"2026-04-01T22:06:24","subject":"Re: [PATCH] i2c: rtl9300: add support for 50 kHz and 2.5 MHz bus\n speeds","submitter":{"id":85956,"url":"http://patchwork.ozlabs.org/api/people/85956/","name":"Andi Shyti","email":"andi.shyti@kernel.org"},"content":"Hi Jan,\n\nOn Fri, Feb 27, 2026 at 12:11:34PM +0100, Jan Kantert wrote:\n> Some SFP modules on certain switches (for example the ONTi ONT-S508CL-8S and\n> XikeStor SKS8300-8X) exhibit unreliable I2C communication at the currently\n> supported speeds. Add support for 50 kHz and 2.5 MHz I2C bus modes on the\n> RTL9300 to improve compatibility with these devices.\n> \n> Signed-off-by: Jan Kantert <jan-kernel@kantert.net>\n\nmerged to i2c/i2c-host.\n\nThanks,\nAndi","headers":{"Return-Path":"\n <linux-i2c+bounces-16916-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-i2c@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=XU5G4DZV;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c15:e001:75::12fc:5321; helo=sin.lore.kernel.org;\n envelope-from=linux-i2c+bounces-16916-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"XU5G4DZV\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"],"Received":["from sin.lore.kernel.org (sin.lore.kernel.org\n [IPv6:2600:3c15:e001:75::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fmJwm6Vgjz1yFv\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 02 Apr 2026 09:06:32 +1100 (AEDT)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id 469DD3007293\n\tfor <incoming@patchwork.ozlabs.org>; Wed,  1 Apr 2026 22:06:30 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id E0EAF317162;\n\tWed,  1 Apr 2026 22:06:28 +0000 (UTC)","from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A76830DEDC\n\tfor <linux-i2c@vger.kernel.org>; Wed,  1 Apr 2026 22:06:28 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id 9E9CFC4CEF7;\n\tWed,  1 Apr 2026 22:06:27 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775081188; cv=none;\n b=nUel12oi45qOl5YFHM6NhkJ157z3ikcjC1RWmUcCYyniw9kep0+kpDCfO84Zx9VetmnacHE5Vg8RWzHvEcJZ4YeF7zQTUyzILWN+RF/5f5BVaX8PerlJ0vSmjOAtnhipHYJHmtGn/DDTTLtiZdtxOv9YK8nKqx8wfsEO02nQ0pI=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775081188; c=relaxed/simple;\n\tbh=8vJKSGysDA+Db+T4KKo1vQ8Mi9ErglfPxx7WPr0AiQ8=;\n\th=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:\n\t Content-Type:Content-Disposition:In-Reply-To;\n b=HQvSfw/Iu46olo7w6oAumLTRjstzlCL19+7xZA/F9iUy5i5hlmbLMQvuuArpkpAxtOWStmpAR8PdHU3EIzz79pbSjYXioMgzY0aY5xgxhPTX2Hi8jCkpjW97+/EFEJQi3Kx6tx1sJnwdPsFMJ/3v/4zYBihFfUFjgDR5fCkBl7E=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=XU5G4DZV; arc=none smtp.client-ip=10.30.226.201","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1775081188;\n\tbh=8vJKSGysDA+Db+T4KKo1vQ8Mi9ErglfPxx7WPr0AiQ8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=XU5G4DZVbHJtG3eftyAkyT2nzohl/uX0nUWgirpVRO/HUOy7TNaZ3w2LHQnK6r2NB\n\t 172b9X6fxbdEBrfD8GO5IJn69MlwAOBkA5MsomxpBW+wzpAQK/hdWmduuNGVysVdC+\n\t Z8Gk8LZcaOqaqHnCEmLbbTy5HQNEUcIbqDKshPo8vze/IOVawFqF6HHkjjV8GhGuHX\n\t orUuM5Im636cnlSscnQmZAzsn3x0VAhAMouuLSeMvCi7V50AvT8/b7SMvzuOXgK0U+\n\t L/u8Yx2DtBAgZcQIEWWdnJEyVpgVENi5DJAKeacMrnOrbLEZR5tz12h+oN8+GYeV/e\n\t uKCO0BKp0ZbPw==","Date":"Thu, 2 Apr 2026 00:06:24 +0200","From":"Andi Shyti <andi.shyti@kernel.org>","To":"Jan Kantert <jan-kernel@kantert.net>","Cc":"chris.packham@alliedtelesis.co.nz, linux-i2c@vger.kernel.org","Subject":"Re: [PATCH] i2c: rtl9300: add support for 50 kHz and 2.5 MHz bus\n speeds","Message-ID":"<ac2Vet5edXeh_wo2@zenone.zhora.eu>","References":"<20260227111134.2163701-1-jan-kernel@kantert.net>","Precedence":"bulk","X-Mailing-List":"linux-i2c@vger.kernel.org","List-Id":"<linux-i2c.vger.kernel.org>","List-Subscribe":"<mailto:linux-i2c+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-i2c+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20260227111134.2163701-1-jan-kernel@kantert.net>"}}]