* [PATCH v2 0/7] i3c: renesas: Add RZ/G3L support
@ 2026-10-26 11:35 Diogo Ivo
2026-10-26 11:35 ` [PATCH v2 1/7] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses Diogo Ivo
2026-11-25 10:12 ` [PATCH v2 0/7] i3c: renesas: Add RZ/G3L support Diogo Ivo
0 siblings, 2 replies; 5+ messages in thread
From: Diogo Ivo @ 2026-10-26 11:35 UTC (permalink / raw)
To: Wolfram Sang, Tommaso Merciai, Alexandre Belloni, Frank Li,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Stephen Boyd, Brian Masney,
Jerome Brunet, Linus Walleij
Cc: linux-i3c, linux-kernel, devicetree, linux-renesas-soc, linux-clk,
linux-gpio, Diogo Ivo, stable
Hi,
this series adds I3C support for the Renesas RZ/G3L (R9A08G046) SoC and
enables the controller on the RZ/G3L SMARC EVK.
It starts with a driver fix, which is independently applicable and
marked for stable: on a pure I3C bus, the I3C core leaves the I2C SCL
rate at zero, and the driver used to derive a zero-width open-drain SCL
from it. It now falls back to the 1 MHz FM+ limit instead. There is also
a small cosmetic patch removing a comma after the sentinel in the
compatible table, for consistency.
The rest of the series adds the DT bindings, the CPG clocks and resets,
and the SoC and board device tree support for RZ/G3L. The driver only
consumes resources that are common to the RZ/G3L and the RZ/G3S
(R9A08G045) (the tclk clock, the presetn and tresetn resets and seven
named interrupts), so no driver changes are needed: the RZ/G3L is
described by the SoC-specific renesas,r9a08g046-i3c compatible with a
fallback to the renesas,r9a08g045-i3c compatible of the RZ/G3S, which
the driver already matches.
The board enablement is guarded by the SW_I3C_EN switch, as the pins
are shared with RIIC3 and the audio codec behind it.
The I3C I/O voltage can be set to 1.2V or 1.8V on the board through
the SYS.3 (I3C_IOVS) switch. As software needs to tell the pin
controller which voltage is in effect, the series also adds pin
controller support for the I3C power source on RZ/G3L together with the
matching board device tree configuration.
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
Changes in v2:
- Drop the "i3c: renesas: Add RZ/G3L support" patch and express the
compatibility of the RZ/G3L with a fallback to the
renesas,r9a08g045-i3c compatible in the bindings and in the DTS, as
suggested by Krzysztof.
- Split the clock and interrupt constraints in the bindings into
separate if/else blocks to handle the RZ/G3S fallback on RZ/G3L
nodes.
- Sort the &i3c and i3c_pins nodes alphabetically in
r9a08g046l48-smarc.dts.
- Link to v1: https://patch.msgid.link/20261020-divo-ssgrlpcsrc-2966-i3c-v1-0-30a47f25e515@renesas.com
---
Diogo Ivo (7):
i3c: renesas: Fix zero I2C SCL rate on pure I3C buses
i3c: renesas: Drop comma after OF match table sentinel
dt-bindings: i3c: renesas,i3c: Add RZ/G3L support
clk: renesas: r9a08g046: Add I3C clocks and resets
pinctrl: renesas: rzg2l: Split SoC-specific masks in struct rzg2l_register_masks
pinctrl: renesas: rzg2l: Add RZ/G3L support for selecting I3C power source
arm64: dts: renesas: r9a08g046: Add I3C support
.../devicetree/bindings/i3c/renesas,i3c.yaml | 27 +++++++++++------
arch/arm64/boot/dts/renesas/r9a08g046.dtsi | 35 ++++++++++++++++++++++
arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts | 21 +++++++++++++
arch/arm64/boot/dts/renesas/rzg3l-smarc-som.dtsi | 4 +++
drivers/clk/renesas/r9a08g046-cpg.c | 7 +++++
drivers/i3c/master/renesas-i3c.c | 12 ++++++--
drivers/pinctrl/renesas/pinctrl-rzg2l.c | 25 ++++++++--------
7 files changed, 107 insertions(+), 24 deletions(-)
---
base-commit: 5d13f5297a1bd1fdff5fab7efcdbc9bfe407e457
change-id: 20261020-divo-ssgrlpcsrc-2966-i3c-bca85b48f943
Best regards,
--
Diogo Ivo <diogo.ivo.sx@renesas.com>
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH v2 1/7] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses
2026-10-26 11:35 [PATCH v2 0/7] i3c: renesas: Add RZ/G3L support Diogo Ivo
@ 2026-10-26 11:35 ` Diogo Ivo
2026-10-26 20:24 ` Frank Li
2026-11-27 9:12 ` claudiu beznea
2026-11-25 10:12 ` [PATCH v2 0/7] i3c: renesas: Add RZ/G3L support Diogo Ivo
1 sibling, 2 replies; 5+ messages in thread
From: Diogo Ivo @ 2026-10-26 11:35 UTC (permalink / raw)
To: Wolfram Sang, Tommaso Merciai, Alexandre Belloni, Frank Li,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Stephen Boyd, Brian Masney,
Jerome Brunet, Linus Walleij
Cc: linux-i3c, linux-kernel, devicetree, linux-renesas-soc, linux-clk,
linux-gpio, Diogo Ivo, stable
On a pure I3C bus there are no I2C devices, so the I3C core leaves
bus->scl_rate.i2c at zero if i2c-scl-hz is not specified in DT.
Deriving i2c_total_ticks from that zero rate programs a zero-width
open-drain SCL into the STDBR open-drain fields, which are still used
in pure I3C mode for example in DAA.
Fall back to the 1 MHz FM+ limit instead, the fastest rate an I2C
device could have, so that a sane open-drain timing is programmed.
Fixes: d028219a9f14 ("i3c: master: Add basic driver for the Renesas I3C controller")
Cc: stable@vger.kernel.org
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
Changes in v2:
- Substituted if/else with ternary operator
- Picked up R-b from Wolfram Sang
---
drivers/i3c/master/renesas-i3c.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/i3c/master/renesas-i3c.c b/drivers/i3c/master/renesas-i3c.c
index 8b264f72e55c..78d0a2c4a19e 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_controller *m)
if (!i3c->rate)
return -EINVAL;
- i2c_total_ticks = 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 = DIV_ROUND_UP(i3c->rate,
+ bus->scl_rate.i2c ?: I3C_BUS_I2C_FM_PLUS_SCL_MAX_RATE);
i3c_total_ticks = DIV_ROUND_UP(i3c->rate, bus->scl_rate.i3c);
i2c_parse_fw_timings(&m->dev, &t, true);
--
2.56.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v2 1/7] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses
2026-10-26 11:35 ` [PATCH v2 1/7] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses Diogo Ivo
@ 2026-10-26 20:24 ` Frank Li
2026-11-27 9:12 ` claudiu beznea
1 sibling, 0 replies; 5+ messages in thread
From: Frank Li @ 2026-10-26 20:24 UTC (permalink / raw)
To: Diogo Ivo
Cc: Wolfram Sang, Tommaso Merciai, Alexandre Belloni, Frank Li,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Stephen Boyd, Brian Masney,
Jerome Brunet, Linus Walleij, linux-i3c, linux-kernel, devicetree,
linux-renesas-soc, linux-clk, linux-gpio, stable
On Mon, Oct 26, 2026 at 11:35:44AM +0000, Diogo Ivo wrote:
> On a pure I3C bus there are no I2C devices, so the I3C core leaves
> bus->scl_rate.i2c at zero if i2c-scl-hz is not specified in DT.
> Deriving i2c_total_ticks from that zero rate programs a zero-width
> open-drain SCL into the STDBR open-drain fields, which are still used
> in pure I3C mode for example in DAA.
>
> Fall back to the 1 MHz FM+ limit instead, the fastest rate an I2C
> device could have, so that a sane open-drain timing is programmed.
>
> Fixes: d028219a9f14 ("i3c: master: Add basic driver for the Renesas I3C controller")
> Cc: stable@vger.kernel.org
> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> Changes in v2:
> - Substituted if/else with ternary operator
> - Picked up R-b from Wolfram Sang
> ---
> drivers/i3c/master/renesas-i3c.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i3c/master/renesas-i3c.c b/drivers/i3c/master/renesas-i3c.c
> index 8b264f72e55c..78d0a2c4a19e 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_controller *m)
> if (!i3c->rate)
> return -EINVAL;
>
> - i2c_total_ticks = 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 = DIV_ROUND_UP(i3c->rate,
> + bus->scl_rate.i2c ?: I3C_BUS_I2C_FM_PLUS_SCL_MAX_RATE);
> i3c_total_ticks = DIV_ROUND_UP(i3c->rate, bus->scl_rate.i3c);
>
> i2c_parse_fw_timings(&m->dev, &t, true);
>
> --
> 2.56.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v2 1/7] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses
2026-10-26 11:35 ` [PATCH v2 1/7] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses Diogo Ivo
2026-10-26 20:24 ` Frank Li
@ 2026-11-27 9:12 ` claudiu beznea
1 sibling, 0 replies; 5+ messages in thread
From: claudiu beznea @ 2026-11-27 9:12 UTC (permalink / raw)
To: Diogo Ivo, Wolfram Sang, Tommaso Merciai, Alexandre Belloni,
Frank Li, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Stephen Boyd, Brian Masney,
Jerome Brunet, Linus Walleij
Cc: linux-i3c, linux-kernel, devicetree, linux-renesas-soc, linux-clk,
linux-gpio, stable
Hi, Diogo,
On 10/26/26 13:35, Diogo Ivo wrote:
> On a pure I3C bus there are no I2C devices, so the I3C core leaves
> bus->scl_rate.i2c at zero if i2c-scl-hz is not specified in DT.
> Deriving i2c_total_ticks from that zero rate programs a zero-width
> open-drain SCL into the STDBR open-drain fields, which are still used
> in pure I3C mode for example in DAA.
>
> Fall back to the 1 MHz FM+ limit instead, the fastest rate an I2C
> device could have, so that a sane open-drain timing is programmed.
>
> Fixes: d028219a9f14 ("i3c: master: Add basic driver for the Renesas I3C controller")
> Cc: stable@vger.kernel.org
> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
> ---
> Changes in v2:
> - Substituted if/else with ternary operator
> - Picked up R-b from Wolfram Sang
> ---
> drivers/i3c/master/renesas-i3c.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i3c/master/renesas-i3c.c b/drivers/i3c/master/renesas-i3c.c
> index 8b264f72e55c..78d0a2c4a19e 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_controller *m)
> if (!i3c->rate)
> return -EINVAL;
>
> - i2c_total_ticks = 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 = DIV_ROUND_UP(i3c->rate,
> + bus->scl_rate.i2c ?: I3C_BUS_I2C_FM_PLUS_SCL_MAX_RATE);
The manual (at lest the RZ/G3S, Rev.1.30) mentions on the documentation of
BFCTL.FMPE bit:
Set this bit to 1 when using the transmission rate within a range up to 1 Mbps
(Fast-mode Plus [Fm+]) of the I3C-bus specification. Set this bit to 0 when
using the transmission rate at other rates (up to 100 kbps [Sm], up to 400 kbps
[Fm]).
In case the i2c_total_ticks = I3C_BUS_I2C_FM_PLUS_SCL_MAX_RATE should the
BFCTL.FMPE bit also be set for the operation you mentioned? If so, maybe set the
default to I3C_BUS_I2C_FM_SCL_MAX_RATE to avoid any further changes?
Thank you,
Claudiu
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 0/7] i3c: renesas: Add RZ/G3L support
2026-10-26 11:35 [PATCH v2 0/7] i3c: renesas: Add RZ/G3L support Diogo Ivo
2026-10-26 11:35 ` [PATCH v2 1/7] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses Diogo Ivo
@ 2026-11-25 10:12 ` Diogo Ivo
1 sibling, 0 replies; 5+ messages in thread
From: Diogo Ivo @ 2026-11-25 10:12 UTC (permalink / raw)
To: Wolfram Sang, Tommaso Merciai, Alexandre Belloni, Frank Li,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Stephen Boyd, Brian Masney,
Jerome Brunet, Linus Walleij
Cc: linux-i3c, linux-kernel, devicetree, linux-renesas-soc, linux-clk,
linux-gpio, stable
Hi all,
On 10/26/2026 11:35 AM, Diogo Ivo wrote:
> Hi,
>
> this series adds I3C support for the Renesas RZ/G3L (R9A08G046) SoC and
> enables the controller on the RZ/G3L SMARC EVK.
>
> It starts with a driver fix, which is independently applicable and
> marked for stable: on a pure I3C bus, the I3C core leaves the I2C SCL
> rate at zero, and the driver used to derive a zero-width open-drain SCL
> from it. It now falls back to the 1 MHz FM+ limit instead. There is also
> a small cosmetic patch removing a comma after the sentinel in the
> compatible table, for consistency.
>
> The rest of the series adds the DT bindings, the CPG clocks and resets,
> and the SoC and board device tree support for RZ/G3L. The driver only
> consumes resources that are common to the RZ/G3L and the RZ/G3S
> (R9A08G045) (the tclk clock, the presetn and tresetn resets and seven
> named interrupts), so no driver changes are needed: the RZ/G3L is
> described by the SoC-specific renesas,r9a08g046-i3c compatible with a
> fallback to the renesas,r9a08g045-i3c compatible of the RZ/G3S, which
> the driver already matches.
>
> The board enablement is guarded by the SW_I3C_EN switch, as the pins
> are shared with RIIC3 and the audio codec behind it.
>
> The I3C I/O voltage can be set to 1.2V or 1.8V on the board through
> the SYS.3 (I3C_IOVS) switch. As software needs to tell the pin
> controller which voltage is in effect, the series also adds pin
> controller support for the I3C power source on RZ/G3L together with the
> matching board device tree configuration.
>
> Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
> ---
> Changes in v2:
> - Drop the "i3c: renesas: Add RZ/G3L support" patch and express the
> compatibility of the RZ/G3L with a fallback to the
> renesas,r9a08g045-i3c compatible in the bindings and in the DTS, as
> suggested by Krzysztof.
> - Split the clock and interrupt constraints in the bindings into
> separate if/else blocks to handle the RZ/G3S fallback on RZ/G3L
> nodes.
> - Sort the &i3c and i3c_pins nodes alphabetically in
> r9a08g046l48-smarc.dts.
> - Link to v1: https://patch.msgid.link/20261020-divo-ssgrlpcsrc-2966-i3c-v1-0-30a47f25e515@renesas.com
Gentle ping on this series.
Thanks,
Diogo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-27 9:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-26 11:35 [PATCH v2 0/7] i3c: renesas: Add RZ/G3L support Diogo Ivo
2026-10-26 11:35 ` [PATCH v2 1/7] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses Diogo Ivo
2026-10-26 20:24 ` Frank Li
2026-11-27 9:12 ` claudiu beznea
2026-11-25 10:12 ` [PATCH v2 0/7] i3c: renesas: Add RZ/G3L support Diogo Ivo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox