* [PATCH v3 0/6] i3c: renesas: Add RZ/G3L support
@ 2026-12-04 13:22 Diogo Ivo
2026-12-04 13:22 ` [PATCH v3 1/6] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses Diogo Ivo
` (5 more replies)
0 siblings, 6 replies; 9+ messages in thread
From: Diogo Ivo @ 2026-12-04 13:22 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, Claudiu Beznea,
Krzysztof Kozlowski
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 bindingsand 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 allback 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.
Patch 6 depends on the binding in patch 3 and the pinctrl support in
patches 4–5.
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
Changes in v3:
- Rebase on top of next-20261127
- Drop old patch 4 from v2 as it was already merged
- Flatten mask struct in new patch 4
- Link to v2: https://patch.msgid.link/20261026-divo-ssgrlpcsrc-2966-i3c-v2-0-2e76b87209bb@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 (6):
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
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/i3c/master/renesas-i3c.c | 12 ++++++--
drivers/pinctrl/renesas/pinctrl-rzg2l.c | 22 +++++---------
6 files changed, 96 insertions(+), 25 deletions(-)
---
base-commit: e5aad2bdbbee783611d32599f89cea3f12f9593d
change-id: 20261020-divo-ssgrlpcsrc-2966-i3c-bca85b48f943
Best regards,
--
Diogo Ivo <diogo.ivo.sx@renesas.com>
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v3 1/6] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses
2026-12-04 13:22 [PATCH v3 0/6] i3c: renesas: Add RZ/G3L support Diogo Ivo
@ 2026-12-04 13:22 ` Diogo Ivo
2026-12-04 13:44 ` sashiko-bot
2026-12-04 13:22 ` [PATCH v3 2/6] i3c: renesas: Drop comma after OF match table sentinel Diogo Ivo
` (4 subsequent siblings)
5 siblings, 1 reply; 9+ messages in thread
From: Diogo Ivo @ 2026-12-04 13:22 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, Claudiu Beznea
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>
Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Reviewed-by: Frank Li <Frank.Li@nxp.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 5719b78f0503..9ae901008c6c 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.1
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 2/6] i3c: renesas: Drop comma after OF match table sentinel
2026-12-04 13:22 [PATCH v3 0/6] i3c: renesas: Add RZ/G3L support Diogo Ivo
2026-12-04 13:22 ` [PATCH v3 1/6] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses Diogo Ivo
@ 2026-12-04 13:22 ` Diogo Ivo
2026-12-04 13:22 ` [PATCH v3 3/6] dt-bindings: i3c: renesas,i3c: Add RZ/G3L support Diogo Ivo
` (3 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Diogo Ivo @ 2026-12-04 13:22 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, Claudiu Beznea
Drop the unnecessary terminator comma on the compatible table.
No functional changes intended.
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
Changes in v2:
- Picked up R-b from Wolfram Sang and Frank Li
---
drivers/i3c/master/renesas-i3c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i3c/master/renesas-i3c.c b/drivers/i3c/master/renesas-i3c.c
index 9ae901008c6c..61991092ede2 100644
--- a/drivers/i3c/master/renesas-i3c.c
+++ b/drivers/i3c/master/renesas-i3c.c
@@ -1623,7 +1623,7 @@ static const struct dev_pm_ops renesas_i3c_pm_ops = {
static const struct of_device_id renesas_i3c_of_ids[] = {
{ .compatible = "renesas,r9a08g045-i3c" },
{ .compatible = "renesas,r9a09g047-i3c" },
- { /* sentinel */ },
+ { /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, renesas_i3c_of_ids);
--
2.56.1
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 3/6] dt-bindings: i3c: renesas,i3c: Add RZ/G3L support
2026-12-04 13:22 [PATCH v3 0/6] i3c: renesas: Add RZ/G3L support Diogo Ivo
2026-12-04 13:22 ` [PATCH v3 1/6] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses Diogo Ivo
2026-12-04 13:22 ` [PATCH v3 2/6] i3c: renesas: Drop comma after OF match table sentinel Diogo Ivo
@ 2026-12-04 13:22 ` Diogo Ivo
2026-12-04 13:22 ` [PATCH v3 4/6] pinctrl: renesas: rzg2l: Split SoC-specific masks in struct rzg2l_register_masks Diogo Ivo
` (2 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Diogo Ivo @ 2026-12-04 13:22 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, Krzysztof Kozlowski
Add device tree binding support for I3C on the Renesas RZ/G3L
(R9A08G046) SoC.
The I3C IP on the RZ/G3L is a subset of the one on the RZ/G3S, as the
RZ/G3L has no HDR Exit Pattern detection interrupt. The resources are
consumed by name (the tclk clock, the presetn and tresetn resets and
seven of the named interrupts), all of which the RZ/G3L provides, so
software can match and bind a RZ/G3L node through the RZ/G3S
compatible. Add the RZ/G3L-specific "renesas,r9a08g046-i3c" compatible
with a fallback to the RZ/G3S "renesas,r9a08g045-i3c" compatible.
The RZ/G3L is not compatible with the RZ/G3E, which has no input analog
filters and supports high-speed mode (up to 3.4 Mbps).
Split the clock and interrupt constraints into separate if/else blocks
so that RZ/G3L nodes inherit the 2-clock limit from the RZ/G3S fallback
while being constrained to 16 interrupts alongside the RZ/G3E.
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
Changes in v2:
- Describe the RZ/G3L by a SoC-specific compatible with a fallback to
the renesas,r9a08g045-i3c compatible of the RZ/G3S, instead of a
plain compatible, and drop the corresponding driver patch.
- Split the clock and interrupt constraints into separate if/else
blocks to handle the RZ/G3S fallback on RZ/G3L nodes.
- Explain in the commit message why the RZ/G3L is not made compatible
with the RZ/G3E.
---
.../devicetree/bindings/i3c/renesas,i3c.yaml | 27 ++++++++++++++--------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/Documentation/devicetree/bindings/i3c/renesas,i3c.yaml b/Documentation/devicetree/bindings/i3c/renesas,i3c.yaml
index a20d875086d4..9f69766df07c 100644
--- a/Documentation/devicetree/bindings/i3c/renesas,i3c.yaml
+++ b/Documentation/devicetree/bindings/i3c/renesas,i3c.yaml
@@ -17,6 +17,9 @@ properties:
- enum:
- renesas,r9a08g045-i3c # RZ/G3S
- renesas,r9a09g047-i3c # RZ/G3E
+ - items:
+ - const: renesas,r9a08g046-i3c # RZ/G3L
+ - const: renesas,r9a08g045-i3c
- items:
- enum:
- renesas,r9a09g056-i3c # RZ/V2N
@@ -120,26 +123,32 @@ allOf:
maxItems: 2
clock-names:
maxItems: 2
- interrupts:
- minItems: 17
- interrupt-names:
- minItems: 17
+ else:
+ properties:
+ clocks:
+ minItems: 3
+ clock-names:
+ minItems: 3
- if:
properties:
compatible:
contains:
- const: renesas,r9a09g047-i3c
+ enum:
+ - renesas,r9a08g046-i3c
+ - renesas,r9a09g047-i3c
then:
properties:
- clocks:
- minItems: 3
- clock-names:
- minItems: 3
interrupts:
maxItems: 16
interrupt-names:
maxItems: 16
+ else:
+ properties:
+ interrupts:
+ minItems: 17
+ interrupt-names:
+ minItems: 17
unevaluatedProperties: false
--
2.56.1
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 4/6] pinctrl: renesas: rzg2l: Split SoC-specific masks in struct rzg2l_register_masks
2026-12-04 13:22 [PATCH v3 0/6] i3c: renesas: Add RZ/G3L support Diogo Ivo
` (2 preceding siblings ...)
2026-12-04 13:22 ` [PATCH v3 3/6] dt-bindings: i3c: renesas,i3c: Add RZ/G3L support Diogo Ivo
@ 2026-12-04 13:22 ` Diogo Ivo
2026-12-04 13:22 ` [PATCH v3 5/6] pinctrl: renesas: rzg2l: Add RZ/G3L support for selecting I3C power source Diogo Ivo
2026-12-04 13:22 ` [PATCH v3 6/6] arm64: dts: renesas: r9a08g046: Add I3C support Diogo Ivo
5 siblings, 0 replies; 9+ messages in thread
From: Diogo Ivo @ 2026-12-04 13:22 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
struct rzg2l_register_masks declares the masks of the OTHER_POC register
of RZ/G3L and of the I3C_SET_POC register of RZ/G3S in two branches of an
anonymous union. As both branches share the same storage, initializing both
other_poc_pvdd1833_oth_awo_poc and i3c_set_poc on RZ/G3L would have the
designated initializers override each other, ending up with the I3C_SET_POC
value in the PVDD1833_OTH_AWO_POC mask.
Fix this by declaring all masks in a flat struct. While this technically
wastes a few bytes in SoCs that don't need all the masks it makes adding
new masks simpler, so the trade-off is worth it.
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
Changes in v3:
- Flatten the layout to a single struct containing all masks
Changes in v2:
- No changes
---
drivers/pinctrl/renesas/pinctrl-rzg2l.c | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
index ca2f36c46c39..d8075671e803 100644
--- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c
+++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
@@ -278,19 +278,10 @@ struct rzg2l_register_offsets {
* @i3c_set_poc: I3C_SET_POC mask
*/
struct rzg2l_register_masks {
- union {
- /* RZ/G3L masks */
- struct {
- u8 other_poc_pvdd1833_oth_awo_poc;
- u8 other_poc_pvdd1833_oth_iso_poc;
- u8 other_poc_wdtovf_n_poc;
- };
-
- /* RZ/G3S masks */
- struct {
- u8 i3c_set_poc;
- };
- };
+ u8 other_poc_pvdd1833_oth_awo_poc;
+ u8 other_poc_pvdd1833_oth_iso_poc;
+ u8 other_poc_wdtovf_n_poc;
+ u8 i3c_set_poc;
};
/**
--
2.56.1
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 5/6] pinctrl: renesas: rzg2l: Add RZ/G3L support for selecting I3C power source
2026-12-04 13:22 [PATCH v3 0/6] i3c: renesas: Add RZ/G3L support Diogo Ivo
` (3 preceding siblings ...)
2026-12-04 13:22 ` [PATCH v3 4/6] pinctrl: renesas: rzg2l: Split SoC-specific masks in struct rzg2l_register_masks Diogo Ivo
@ 2026-12-04 13:22 ` Diogo Ivo
2026-12-04 13:22 ` [PATCH v3 6/6] arm64: dts: renesas: r9a08g046: Add I3C support Diogo Ivo
5 siblings, 0 replies; 9+ messages in thread
From: Diogo Ivo @ 2026-12-04 13:22 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, Claudiu Beznea
The Renesas RZ/G3L I3C pins can be powered at either 1.8V or 1.2V. The
pin controller provides a register to select between these two options.
On RZ/G3L the I3C signals are multiplexed on the P2 port pins. Update
the Renesas RZ/G2L pin controller driver to allow selecting the I3C
power source on RZ/G3L SoC.
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
Changes in v2:
- No changes
---
drivers/pinctrl/renesas/pinctrl-rzg2l.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
index d8075671e803..e7369527f995 100644
--- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c
+++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
@@ -2425,7 +2425,8 @@ static const char * const rzg3l_gpio_names[] = {
static const u64 r9a08g046_gpio_configs[] = {
0x0,
0x0,
- RZG2L_GPIO_PORT_PACK(2, 0x22, PIN_CFG_NF | PIN_CFG_IEN), /* P2 */
+ RZG2L_GPIO_PORT_PACK(2, 0x22, PIN_CFG_NF | PIN_CFG_IEN |
+ PIN_CFG_IO_VMC_I3C), /* P2 */
RZG2L_GPIO_PORT_PACK(7, 0x23, RZG3L_MPXED_PIN_FUNCS_POC(A, AWO)), /* P3 */
0x0,
RZG2L_GPIO_PORT_PACK(7, 0x25, RZG3L_MPXED_PIN_FUNCS_POC(A, ISO)), /* P5 */
@@ -3926,10 +3927,12 @@ static const struct rzg2l_hwcfg rzg3l_hwcfg = {
.sd_ch = 0x3004,
.sd_ch2 = 0x3024,
.eth_poc = 0x3010,
+ .i3c_set = 0x301c,
.oen = 0x3018,
.other_poc = 0x3028,
},
.masks = {
+ .i3c_set_poc = BIT(2),
.other_poc_pvdd1833_oth_awo_poc = BIT(0),
.other_poc_pvdd1833_oth_iso_poc = BIT(1),
.other_poc_wdtovf_n_poc = BIT(2),
--
2.56.1
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3 6/6] arm64: dts: renesas: r9a08g046: Add I3C support
2026-12-04 13:22 [PATCH v3 0/6] i3c: renesas: Add RZ/G3L support Diogo Ivo
` (4 preceding siblings ...)
2026-12-04 13:22 ` [PATCH v3 5/6] pinctrl: renesas: rzg2l: Add RZ/G3L support for selecting I3C power source Diogo Ivo
@ 2026-12-04 13:22 ` Diogo Ivo
5 siblings, 0 replies; 9+ messages in thread
From: Diogo Ivo @ 2026-12-04 13:22 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
Add the I3C Bus Interface node to the RZ/G3L (R9A08G046) SoC DTSI and
enable it on the RZ/G3L SMARC EVK, together with the required pin
control.
The driver only consumes resources that are common to the RZ/G3L and
the RZ/G3S (R9A08G045), so the node uses the SoC-specific
renesas,r9a08g046-i3c compatible with a fallback to the
renesas,r9a08g045-i3c compatible of the RZ/G3S, following the bindings.
The I3C pins are shared with RIIC3, so the controller is only enabled
when the SW_I3C_EN switch is on.
The I3C I/O voltage can be set to 1.2V or 1.8V on the board through
the SYS.3 (I3C_IOVS) switch, so configure the pin controller for the
selected voltage through the power-source property.
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
Changes in v2:
- Declare compatible with G3S fallback
- Sort the &i3c and i3c_pins nodes alphabetically in
r9a08g046l48-smarc.dts
---
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 +++
3 files changed, 60 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
index bb69e5e3528d..7df7e80d1b00 100644
--- a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
@@ -661,6 +661,41 @@ channel2 {
};
};
+ i3c: i3c@100e0000 {
+ compatible = "renesas,r9a08g046-i3c", "renesas,r9a08g045-i3c";
+ reg = <0 0x100e0000 0 0x1000>;
+ interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 359 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 360 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 361 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 362 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 363 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 364 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 369 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 370 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 372 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 373 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 374 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 375 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 376 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "ierr", "terr", "abort", "resp",
+ "cmd", "ibi", "rx", "tx", "rcv",
+ "st", "sp", "tend", "nack", "al",
+ "tmo", "wu";
+ clocks = <&cpg CPG_MOD R9A08G046_I3C_PCLK>,
+ <&cpg CPG_MOD R9A08G046_I3C_TCLK>;
+ clock-names = "pclk", "tclk";
+ resets = <&cpg R9A08G046_I3C_PRESETN>,
+ <&cpg R9A08G046_I3C_TRESETN>;
+ reset-names = "presetn", "tresetn";
+ power-domains = <&cpg>;
+ #address-cells = <3>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
ssi0: ssi@100e4000 {
compatible = "renesas,r9a08g046-ssi", "renesas,rz-ssi";
reg = <0 0x100e4000 0 0x400>;
diff --git a/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts b/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
index 517747aef36e..a924adb43200 100644
--- a/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
+++ b/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
@@ -15,6 +15,7 @@
#define SW_GPIO8_CAN0_STB 0
#define SW_GPIO9_CAN1_STB 0
#define SW_I3C_EN 0
+#define SW_I3C_IOVS 0
#define SW_SER0_PMOD 1
#define PMOD_GPIO4 0
@@ -154,6 +155,16 @@ da7212: codec@1a {
};
#endif
+#if SW_I3C_EN
+&i3c {
+ pinctrl-0 = <&i3c_pins>;
+ pinctrl-names = "default";
+ i2c-scl-hz = <400000>;
+ i3c-scl-hz = <12500000>;
+ status = "okay";
+};
+#endif
+
&keys {
#if !RZ_BOOT_MODE3 || !SW_GPIO4 || PMOD_GPIO4
/delete-node/ key-1;
@@ -209,6 +220,16 @@ i2c3_pins: i2c3 {
<RZG3L_PORT_PINMUX(2, 1, 4)>; /* RIIC3_SDA */
};
+ i3c_pins: i3c {
+ pinmux = <RZG3L_PORT_PINMUX(2, 0, 2)>, /* I3C_SCL */
+ <RZG3L_PORT_PINMUX(2, 1, 2)>; /* I3C_SDA */
+#if SW_I3C_IOVS
+ power-source = <1800>;
+#else
+ power-source = <1200>;
+#endif
+ };
+
pcie-clkreq-n-hog {
gpio-hog;
gpios = <RZG3L_GPIO(G, 6) GPIO_ACTIVE_HIGH>;
diff --git a/arch/arm64/boot/dts/renesas/rzg3l-smarc-som.dtsi b/arch/arm64/boot/dts/renesas/rzg3l-smarc-som.dtsi
index 91b2d0d43104..5959e62ad7ed 100644
--- a/arch/arm64/boot/dts/renesas/rzg3l-smarc-som.dtsi
+++ b/arch/arm64/boot/dts/renesas/rzg3l-smarc-som.dtsi
@@ -13,6 +13,10 @@
* 0 - SMARC_I2C_GP is enabled
* 1 - I3C is enabled
*
+ * Switch position SYS.3, Macro SW_I3C_IOVS:
+ * 0 - I3C voltage is 1.2V (when SW_I3C_EN == 1)
+ * 1 - I3C voltage is 1.8V
+ *
* Switch position SYS.4, Macro SW_SD2_EN:
* 0 - Select I2S0
* 1 - Select SD2
--
2.56.1
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/6] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses
2026-12-04 13:22 ` [PATCH v3 1/6] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses Diogo Ivo
@ 2026-12-04 13:44 ` sashiko-bot
2026-12-04 18:48 ` Diogo Ivo
0 siblings, 1 reply; 9+ messages in thread
From: sashiko-bot @ 2026-12-04 13:44 UTC (permalink / raw)
To: Diogo Ivo
Cc: linux-i3c, devicetree, linux-clk, linux-gpio, robh, conor+dt,
Frank.Li, Alexandre Belloni, wsa+renesas
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 <diogo.ivo.sx@renesas.com>
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/renesas-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_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);
[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 = 1, leaving
od_high_ticks = 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.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-divo-ssgrlpcsrc-2966-i3c-v3-0-f502c6f6947d@renesas.com?part=1
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 1/6] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses
2026-12-04 13:44 ` sashiko-bot
@ 2026-12-04 18:48 ` Diogo Ivo
0 siblings, 0 replies; 9+ messages in thread
From: Diogo Ivo @ 2026-12-04 18:48 UTC (permalink / raw)
To: sashiko-reviews
Cc: linux-i3c, devicetree, linux-clk, linux-gpio, robh, conor+dt,
Frank.Li, Alexandre Belloni, wsa+renesas
On 12/4/2026 1:44 PM, sashiko-bot@kernel.org wrote:
> 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 <diogo.ivo.sx@renesas.com>
>
> 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/renesas-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_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);
>
> [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 = 1, leaving
> od_high_ticks = 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.
I was not expecting this review on v3 when v1 and v2 were identical in
content but oh well. I will take a deeper look but the rest of the
series is independent of this patch, so the G3L enablement can still be
picked up. Let me know if there are any problems in the other patches.
Thank you,
Diogo
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-12-04 18:49 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 13:22 [PATCH v3 0/6] i3c: renesas: Add RZ/G3L support Diogo Ivo
2026-12-04 13:22 ` [PATCH v3 1/6] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses Diogo Ivo
2026-12-04 13:44 ` sashiko-bot
2026-12-04 18:48 ` Diogo Ivo
2026-12-04 13:22 ` [PATCH v3 2/6] i3c: renesas: Drop comma after OF match table sentinel Diogo Ivo
2026-12-04 13:22 ` [PATCH v3 3/6] dt-bindings: i3c: renesas,i3c: Add RZ/G3L support Diogo Ivo
2026-12-04 13:22 ` [PATCH v3 4/6] pinctrl: renesas: rzg2l: Split SoC-specific masks in struct rzg2l_register_masks Diogo Ivo
2026-12-04 13:22 ` [PATCH v3 5/6] pinctrl: renesas: rzg2l: Add RZ/G3L support for selecting I3C power source Diogo Ivo
2026-12-04 13:22 ` [PATCH v3 6/6] arm64: dts: renesas: r9a08g046: Add I3C 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