From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796391859; b=E/b56XW7aydT/mUdgd7fnXRWvCC0Iiun3a22vktAJZ1070H8iZsvovf8XCbEJVnKG+Ac 7Qj36jiTn0I/B1WaZ3SlWYNlHDaibL1Ms0c0Yjq159/0z9JS03fK2HcE8Z6xmYX4u6Vxh g9l0Phx/azkxPWWAaeOjMEnFpHv6juaI0OB7CljP15ykbK02xsK8D/1jkyJIxw7MhauQy JbASern5jQHJpBRAlE0JyiJ+61gpu5Cot8X1cxp9PttEst905+JRDz3kYp8Bj6wVkRKJ6 hUO2pYTVuSSmG7nAHEt6TM1RQPBjiH6NleXXN9SckAguOXdkr43eJjTBmV89QgAGg2w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796391859; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=vZSpgSVNPi7vCAhq154CPy/az/YEq/aNCjYqg50btHU=; b=QWxI9Sok77EjA8yDDqA5QGgHFI0ayv6thC607Pgzcm899FYJ1CK18ORJsb/wNDG+4bHa GrfDmFi7jPTRDvPtBJZNluWyEuRwnTa14k3RhC56BteONcRsnc8L5WTuzF6XVIU1VJZAh sFQH4Nxk/VS6fQ31mu+l9zwhrWEvUhsTGYV8vSCuOWPJZ21qsH54aD5EnRuwCaTRvJAQS 2U3Ja77STFtWrX0aT9wHcS7kqQrFCSbbrPoiPzBakzXvLP8NZotv71wuPpnFtUGxEBqvp I7LeOdLZo8qVlBzROsUOwtLSOWe/KNULAsi9tIBa44t6LbFYTXWRNIk38Ncxe0GUYFw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=G+nZFvM9; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C7AC3606A682; Fri, 4 Dec 2026 13:44:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=G+nZFvM9 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E131F1F00A10; Fri, 4 Dec 2026 13:44:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796391859; bh=vZSpgSVNPi7vCAhq154CPy/az/YEq/aNCjYqg50btHU=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=G+nZFvM9pfSGbhPlMA4D4fdoV9+uyX6N4R8nNMixdb/LIMb+SSTcm/VF/AxTppaZa kBFsDEXFaown3QXQPWY+MjGH5H2+JKdeo01rOH+x/H61pTMQh9N2wzjnuZmiom2UlI vTi7tmVmd3C6kPxGkJaY2rsSejEfOM55m1KDt9UJD5GgXhkl7j0PsSD7/3Dzq7Kidw DKuK/xj5QPNzBCtf7qNxIHli2xouVC/yVzqP0nT67EPtCrcFtvFRGzg4UJjul82vci lrIx2gkXQ9aryZrTRaCv5k2FJZ+lJ3fzi7ENccIRdLpXHdTdlH3053OWJnLNjInTOv Nv91U2pKYqpyA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v3 1/6] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses Reply-To: sashiko-reviews@lists.linux.dev To: "Diogo Ivo" Cc: linux-i3c@lists.infradead.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org, Frank.Li@kernel.org, "Alexandre Belloni" , wsa+renesas@sang-engineering.com In-Reply-To: <20261204-divo-ssgrlpcsrc-2966-i3c-v3-1-f502c6f6947d@renesas.com> References: <20261204-divo-ssgrlpcsrc-2966-i3c-v3-0-f502c6f6947d@renesas.com> <20261204-divo-ssgrlpcsrc-2966-i3c-v3-1-f502c6f6947d@renesas.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 13:44:18 +0000 X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] i3c: renesas: uncapped 1 MHz OD fallback exceeds low i3c-scl-hz -- commit ea7d51bd4ae0958787be77dec64c429b5eefe33b Author: Diogo Ivo i3c: renesas: Fix zero I2C SCL rate on pure I3C buses This patch falls back to I3C_BUS_I2C_FM_PLUS_SCL_MAX_RATE (1 MHz) when calculating i2c_total_ticks in renesas_i3c_bus_init() if bus->scl_rate.i2c is zero on a pure I3C bus. > diff --git a/drivers/i3c/master/renesas-i3c.c b/drivers/i3c/master/renesa= s-i3c.c > index 5719b78f05036..9ae901008c6c5 100644 > --- a/drivers/i3c/master/renesas-i3c.c > +++ b/drivers/i3c/master/renesas-i3c.c > @@ -579,7 +579,15 @@ static int renesas_i3c_bus_init(struct i3c_master_co= ntroller *m) > if (!i3c->rate) > return -EINVAL; > =20 > - i2c_total_ticks =3D DIV_ROUND_UP(i3c->rate, bus->scl_rate.i2c); > + /* > + * A pure I3C bus has no I2C devices, so the I3C core leaves > + * scl_rate.i2c at zero if not explicitly defined in DT. The > + * open-drain SCL fields of STDBR, which are used for the DAA > + * pending read, are derived from it though, so fall back to > + * the 1 MHz FM+ limit instead of programming a zero-width clock. > + */ > + i2c_total_ticks =3D DIV_ROUND_UP(i3c->rate, > + bus->scl_rate.i2c ?: I3C_BUS_I2C_FM_PLUS_SCL_MAX_RATE); > i3c_total_ticks =3D DIV_ROUND_UP(i3c->rate, bus->scl_rate.i3c); [Severity: Medium] Can this fall back to 1 MHz even when bus->scl_rate.i3c is configured below 1 MHz? On a pure I3C bus with i2c-scl-hz omitted, i3c_bus_set_mode() allows any i3c-scl-hz below 1 MHz while leaving bus->scl_rate.i2c at zero. In that case open-drain SCL runs faster than the configured push-pull rate. The shared cks prescaler loop also halves i2c_total_ticks alongside i3c_total_ticks to fit pp_low_ticks. At 25 kHz on a 200 MHz tclk, i2c_total_ticks shrinks to 1 with od_low_ticks =3D 1, leaving od_high_ticks =3D 0 in STDBR_SBRHO and breaking open-drain transfers. Capping the fallback to min_t(unsigned long, bus->scl_rate.i3c, I3C_BUS_I2C_FM_PLUS_SCL_MAX_RATE) would keep open-drain SCL bounded by the configured I3C rate. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204-divo-ssgrl= pcsrc-2966-i3c-v3-0-f502c6f6947d@renesas.com?part=3D1