* [PATCH 0/8] i3c: renesas: Add RZ/G3L support
@ 2026-10-20 9:14 Diogo Ivo
2026-10-20 9:14 ` [PATCH 1/8] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses Diogo Ivo
` (7 more replies)
0 siblings, 8 replies; 11+ messages in thread
From: Diogo Ivo @ 2026-10-20 9:14 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 driver compatibility
ID, the CPG clocks and resets, and the SoC and board device tree
support for R9A08G046. 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>
---
Diogo Ivo (8):
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
i3c: renesas: 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 | 17 +++++++++++
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 | 16 ++++++++--
drivers/pinctrl/renesas/pinctrl-rzg2l.c | 25 ++++++++--------
7 files changed, 110 insertions(+), 15 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] 11+ messages in thread
* [PATCH 1/8] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses
2026-10-20 9:14 [PATCH 0/8] i3c: renesas: Add RZ/G3L support Diogo Ivo
@ 2026-10-20 9:14 ` Diogo Ivo
2026-10-20 9:27 ` Geert Uytterhoeven
2026-10-20 9:14 ` [PATCH 2/8] i3c: renesas: Drop comma after OF match table sentinel Diogo Ivo
` (6 subsequent siblings)
7 siblings, 1 reply; 11+ messages in thread
From: Diogo Ivo @ 2026-10-20 9:14 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
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
drivers/i3c/master/renesas-i3c.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/i3c/master/renesas-i3c.c b/drivers/i3c/master/renesas-i3c.c
index 8b264f72e55c..1fa115bdab6b 100644
--- a/drivers/i3c/master/renesas-i3c.c
+++ b/drivers/i3c/master/renesas-i3c.c
@@ -579,7 +579,18 @@ 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.
+ */
+ if (!bus->scl_rate.i2c)
+ i2c_total_ticks = DIV_ROUND_UP(i3c->rate, I3C_BUS_I2C_FM_PLUS_SCL_MAX_RATE);
+ else
+ i2c_total_ticks = DIV_ROUND_UP(i3c->rate, bus->scl_rate.i2c);
+
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] 11+ messages in thread
* [PATCH 2/8] i3c: renesas: Drop comma after OF match table sentinel
2026-10-20 9:14 [PATCH 0/8] i3c: renesas: Add RZ/G3L support Diogo Ivo
2026-10-20 9:14 ` [PATCH 1/8] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses Diogo Ivo
@ 2026-10-20 9:14 ` Diogo Ivo
2026-10-20 9:14 ` [PATCH 3/8] dt-bindings: i3c: renesas,i3c: Add RZ/G3L support Diogo Ivo
` (5 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Diogo Ivo @ 2026-10-20 9:14 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
Drop the unnecessary terminator comma on the compatible table.
No functional changes intended.
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
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 1fa115bdab6b..4fddc1b4fdbb 100644
--- a/drivers/i3c/master/renesas-i3c.c
+++ b/drivers/i3c/master/renesas-i3c.c
@@ -1626,7 +1626,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.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 3/8] dt-bindings: i3c: renesas,i3c: Add RZ/G3L support
2026-10-20 9:14 [PATCH 0/8] i3c: renesas: Add RZ/G3L support Diogo Ivo
2026-10-20 9:14 ` [PATCH 1/8] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses Diogo Ivo
2026-10-20 9:14 ` [PATCH 2/8] i3c: renesas: Drop comma after OF match table sentinel Diogo Ivo
@ 2026-10-20 9:14 ` Diogo Ivo
2026-10-20 9:14 ` [PATCH 4/8] i3c: renesas: " Diogo Ivo
` (4 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Diogo Ivo @ 2026-10-20 9:14 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 support for the I3C Bus Interface on the Renesas RZ/G3L (R9A08G046)
SoC. In this SoC, the controller has no HDR Exit Pattern detection
interrupt and no SFRs clock, so constrain its number of interrupts to 16
and the number of clocks to 2.
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
Documentation/devicetree/bindings/i3c/renesas,i3c.yaml | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/Documentation/devicetree/bindings/i3c/renesas,i3c.yaml b/Documentation/devicetree/bindings/i3c/renesas,i3c.yaml
index a20d875086d4..08fcea89a015 100644
--- a/Documentation/devicetree/bindings/i3c/renesas,i3c.yaml
+++ b/Documentation/devicetree/bindings/i3c/renesas,i3c.yaml
@@ -16,6 +16,7 @@ properties:
- items:
- enum:
- renesas,r9a08g045-i3c # RZ/G3S
+ - renesas,r9a08g046-i3c # RZ/G3L
- renesas,r9a09g047-i3c # RZ/G3E
- items:
- enum:
@@ -125,6 +126,22 @@ allOf:
interrupt-names:
minItems: 17
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: renesas,r9a08g046-i3c
+ then:
+ properties:
+ clocks:
+ maxItems: 2
+ clock-names:
+ maxItems: 2
+ interrupts:
+ maxItems: 16
+ interrupt-names:
+ maxItems: 16
+
- if:
properties:
compatible:
--
2.56.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 4/8] i3c: renesas: Add RZ/G3L support
2026-10-20 9:14 [PATCH 0/8] i3c: renesas: Add RZ/G3L support Diogo Ivo
` (2 preceding siblings ...)
2026-10-20 9:14 ` [PATCH 3/8] dt-bindings: i3c: renesas,i3c: Add RZ/G3L support Diogo Ivo
@ 2026-10-20 9:14 ` Diogo Ivo
2026-10-20 9:14 ` [PATCH 5/8] clk: renesas: r9a08g046: Add I3C clocks and resets Diogo Ivo
` (3 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Diogo Ivo @ 2026-10-20 9:14 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 support for the I3C Bus Interface on the Renesas RZ/G3L (R9A08G046)
SoC by adding the renesas,r9a08g046-i3c compatible to the OF match
table.
The controller is very similar to the IP on the RZ/G3S. However, for
instance the RZ/G3L variant has no HDR Exit Pattern detection interrupt:
RZ/G3S exposes 17 interrupts, while RZ/G3L exposes 16. A RZ/G3L node
therefore cannot be described with the RZ/G3S compatible, as its bindings
require at least 17 interrupts. The same point applies to RZ/G3E, that
requires 3 clocks while the RZ/G3L requires 2.
From the driver point of view there is no difference between the two
SoCs: the driver only consumes the tclk clock, the presetn and tresetn
resets and seven named interrupts (resp, rx, tx, st, sp, tend, nack),
all of which are among the 16 shared ones. No driver changes are needed
besides the new compatible.
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
drivers/i3c/master/renesas-i3c.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/i3c/master/renesas-i3c.c b/drivers/i3c/master/renesas-i3c.c
index 4fddc1b4fdbb..80a6df1151bf 100644
--- a/drivers/i3c/master/renesas-i3c.c
+++ b/drivers/i3c/master/renesas-i3c.c
@@ -1625,6 +1625,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,r9a08g046-i3c" },
{ .compatible = "renesas,r9a09g047-i3c" },
{ /* sentinel */ }
};
--
2.56.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 5/8] clk: renesas: r9a08g046: Add I3C clocks and resets
2026-10-20 9:14 [PATCH 0/8] i3c: renesas: Add RZ/G3L support Diogo Ivo
` (3 preceding siblings ...)
2026-10-20 9:14 ` [PATCH 4/8] i3c: renesas: " Diogo Ivo
@ 2026-10-20 9:14 ` Diogo Ivo
2026-10-20 9:15 ` [PATCH 6/8] pinctrl: renesas: rzg2l: Split SoC-specific masks in struct rzg2l_register_masks Diogo Ivo
` (2 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Diogo Ivo @ 2026-10-20 9:14 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 P5 fixed clock, the module clocks for the I3C Bus Interface
(pclk, tclk), along with the corresponding module resets (presetn,
tresetn) on the RZ/G3L (R9A08G046) SoC.
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
drivers/clk/renesas/r9a08g046-cpg.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/clk/renesas/r9a08g046-cpg.c b/drivers/clk/renesas/r9a08g046-cpg.c
index b58057db9c4d..3833f88125ea 100644
--- a/drivers/clk/renesas/r9a08g046-cpg.c
+++ b/drivers/clk/renesas/r9a08g046-cpg.c
@@ -340,6 +340,7 @@ static const struct cpg_core_clk r9a08g046_core_clks[] __initconst = {
dtable_4_128, 0, 0, 0, NULL),
DEF_FIXED("P4", R9A08G046_CLK_P4, CLK_PLL2_DIV2, 1, 5),
DEF_FIXED(".p4_div2", CLK_P4_DIV2, R9A08G046_CLK_P4, 1, 2),
+ DEF_FIXED("P5", R9A08G046_CLK_P5, CLK_PLL2_DIV2, 1, 4),
DEF_FIXED("P8", R9A08G046_CLK_P8, CLK_PLL3_DIV2, 1, 8),
DEF_G3S_DIV("P13", R9A08G046_CLK_P13, CLK_SEL_RSCI0, G3L_DIV_RSCI0, G3L_DIV_RSCI0_STS,
dtable_2_16, 0, 100000000UL, 0, NULL),
@@ -581,6 +582,10 @@ static const struct rzg2l_mod_clk r9a08g046_mod_clks[] = {
MSTOP(BUS_PERI_COM, BIT(10))),
DEF_MOD("pci_clk_pmu", R9A08G046_PCI_CLK_PMU, R9A08G046_CLK_P1, 0x608, 2,
MSTOP(BUS_PERI_COM, BIT(10))),
+ DEF_MOD("i3c_pclk", R9A08G046_I3C_PCLK, R9A08G046_CLK_P20, 0x610, 0,
+ MSTOP(BUS_MCPU3, BIT(10))),
+ DEF_MOD("i3c_tclk", R9A08G046_I3C_TCLK, R9A08G046_CLK_P5, 0x610, 1,
+ MSTOP(BUS_MCPU3, BIT(10))),
DEF_MOD("rsci0_pclk", R9A08G046_RSCI0_PCLK, R9A08G046_CLK_P0, 0x618, 0,
MSTOP(BUS_MCPU2, BIT(7))),
DEF_MOD("rsci1_pclk", R9A08G046_RSCI1_PCLK, R9A08G046_CLK_P0, 0x618, 1,
@@ -662,6 +667,8 @@ static const struct rzg2l_reset r9a08g046_resets[] = {
DEF_RST(R9A08G046_ADC1_ADRST_N, 0x8a8, 3),
DEF_RST(R9A08G046_TSU_PRESETN, 0x8ac, 0),
DEF_RST(R9A08G046_PCI_ARESETN, 0x908, 0),
+ DEF_RST(R9A08G046_I3C_PRESETN, 0x910, 0),
+ DEF_RST(R9A08G046_I3C_TRESETN, 0x910, 1),
DEF_RST(R9A08G046_RSCI0_PRESETN, 0x918, 0),
DEF_RST(R9A08G046_RSCI1_PRESETN, 0x918, 1),
DEF_RST(R9A08G046_RSCI2_PRESETN, 0x918, 2),
--
2.56.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 6/8] pinctrl: renesas: rzg2l: Split SoC-specific masks in struct rzg2l_register_masks
2026-10-20 9:14 [PATCH 0/8] i3c: renesas: Add RZ/G3L support Diogo Ivo
` (4 preceding siblings ...)
2026-10-20 9:14 ` [PATCH 5/8] clk: renesas: r9a08g046: Add I3C clocks and resets Diogo Ivo
@ 2026-10-20 9:15 ` Diogo Ivo
2026-10-20 9:15 ` [PATCH 7/8] pinctrl: renesas: rzg2l: Add RZ/G3L support for selecting I3C power source Diogo Ivo
2026-10-20 9:15 ` [PATCH 8/8] arm64: dts: renesas: r9a08g046: Add I3C support Diogo Ivo
7 siblings, 0 replies; 11+ messages in thread
From: Diogo Ivo @ 2026-10-20 9:15 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.
Split the union into a common area, for masks shared by multiple SoCs, and
per-SoC areas: the RZ/G3S and RZ/G3L I3C_SET_POC mask moves to the common
area, and the RZ/G3L OTHER_POC masks stay in a dedicated RZ/G3L area. This
way every mask gets its own member, and new SoCs can be described by
adding their own struct (possibly inside a union).
The existing RZ/G3S data only initializes i3c_set_poc, so it is not
affected by this change.
---
drivers/pinctrl/renesas/pinctrl-rzg2l.c | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
index 9bf3743dc1ce..f73d273df362 100644
--- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c
+++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
@@ -278,18 +278,14 @@ 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;
- };
+ /* Masks common to multiple SoCs */
+ u8 i3c_set_poc; /* RZ/G3S, RZ/G3L */
+
+ /* RZ/G3L masks */
+ struct {
+ u8 other_poc_pvdd1833_oth_awo_poc;
+ u8 other_poc_pvdd1833_oth_iso_poc;
+ u8 other_poc_wdtovf_n_poc;
};
};
--
2.56.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 7/8] pinctrl: renesas: rzg2l: Add RZ/G3L support for selecting I3C power source
2026-10-20 9:14 [PATCH 0/8] i3c: renesas: Add RZ/G3L support Diogo Ivo
` (5 preceding siblings ...)
2026-10-20 9:15 ` [PATCH 6/8] pinctrl: renesas: rzg2l: Split SoC-specific masks in struct rzg2l_register_masks Diogo Ivo
@ 2026-10-20 9:15 ` Diogo Ivo
2026-10-20 9:15 ` [PATCH 8/8] arm64: dts: renesas: r9a08g046: Add I3C support Diogo Ivo
7 siblings, 0 replies; 11+ messages in thread
From: Diogo Ivo @ 2026-10-20 9:15 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
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.
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
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 f73d273df362..192da9f9a55d 100644
--- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c
+++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
@@ -2431,7 +2431,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 */
@@ -3933,10 +3934,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.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 8/8] arm64: dts: renesas: r9a08g046: Add I3C support
2026-10-20 9:14 [PATCH 0/8] i3c: renesas: Add RZ/G3L support Diogo Ivo
` (6 preceding siblings ...)
2026-10-20 9:15 ` [PATCH 7/8] pinctrl: renesas: rzg2l: Add RZ/G3L support for selecting I3C power source Diogo Ivo
@ 2026-10-20 9:15 ` Diogo Ivo
7 siblings, 0 replies; 11+ messages in thread
From: Diogo Ivo @ 2026-10-20 9:15 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 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.
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
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 f33d5d7468ff..1b0b95b12ef8 100644
--- a/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a08g046.dtsi
@@ -620,6 +620,41 @@ canfd: can@100c0000 {
/* placeholder */
};
+ i3c: i3c@100e0000 {
+ compatible = "renesas,r9a08g046-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 68d7b579e352..0be2936f9424 100644
--- a/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
+++ b/arch/arm64/boot/dts/renesas/r9a08g046l48-smarc.dts
@@ -13,6 +13,7 @@
#define SW_DPI_EN 0
#define SW_GPIO4 1
#define SW_I3C_EN 0
+#define SW_I3C_IOVS 0
#define SW_SER0_PMOD 1
#define PMOD_GPIO4 0
@@ -174,6 +175,16 @@ pcie_pins: pcie {
pinmux = <RZG3L_PORT_PINMUX(G, 7, 1)>; /* PCIE_RST_OUT# */
};
+ 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
+ };
+
rsci1_pins: rsci1 {
pinmux = <RZG3L_PORT_PINMUX(D, 4, 5)>, /* RSCI1_RXD_MISO_SCL */
<RZG3L_PORT_PINMUX(D, 5, 5)>, /* RSCI1_TXD_MOSI_SDA */
@@ -250,6 +261,16 @@ &rsci3 {
};
#endif
+#if SW_I3C_EN
+&i3c {
+ pinctrl-0 = <&i3c_pins>;
+ pinctrl-names = "default";
+ i2c-scl-hz = <400000>;
+ i3c-scl-hz = <12500000>;
+ status = "okay";
+};
+#endif
+
#if !SW_DPI_EN
&rspi2 {
pinctrl-0 = <&rspi2_pins>;
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.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/8] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses
2026-10-20 9:14 ` [PATCH 1/8] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses Diogo Ivo
@ 2026-10-20 9:27 ` Geert Uytterhoeven
2026-10-20 14:13 ` Diogo Ivo
0 siblings, 1 reply; 11+ messages in thread
From: Geert Uytterhoeven @ 2026-10-20 9:27 UTC (permalink / raw)
To: Diogo Ivo
Cc: Wolfram Sang, Tommaso Merciai, Alexandre Belloni, Frank Li,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Magnus Damm,
Stephen Boyd, Brian Masney, Jerome Brunet, Linus Walleij,
linux-i3c, linux-kernel, devicetree, linux-renesas-soc,
linux-clk, linux-gpio, stable
Hi Diogo,
On Tue, 20 Oct 2026 at 11:15, Diogo Ivo <diogo.ivo.sx@renesas.com> 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
> Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
Thanks for your patch!
> --- a/drivers/i3c/master/renesas-i3c.c
> +++ b/drivers/i3c/master/renesas-i3c.c
> @@ -579,7 +579,18 @@ 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.
> + */
> + if (!bus->scl_rate.i2c)
> + i2c_total_ticks = DIV_ROUND_UP(i3c->rate, I3C_BUS_I2C_FM_PLUS_SCL_MAX_RATE);
> + else
> + i2c_total_ticks = DIV_ROUND_UP(i3c->rate, bus->scl_rate.i2c);
> +
> i3c_total_ticks = DIV_ROUND_UP(i3c->rate, bus->scl_rate.i3c);
This looks like a good opportunity to use the shortened tertiary ?:-operator:
bus->scl_rate.i2c ?: I3C_BUS_I2C_FM_PLUS_SCL_MAX_RATE
>
> i2c_parse_fw_timings(&m->dev, &t, true);
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/8] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses
2026-10-20 9:27 ` Geert Uytterhoeven
@ 2026-10-20 14:13 ` Diogo Ivo
0 siblings, 0 replies; 11+ messages in thread
From: Diogo Ivo @ 2026-10-20 14:13 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Wolfram Sang, Tommaso Merciai, Alexandre Belloni, Frank Li,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Magnus Damm,
Stephen Boyd, Brian Masney, Jerome Brunet, Linus Walleij,
linux-i3c, linux-kernel, devicetree, linux-renesas-soc,
linux-clk, linux-gpio, stable
Hi Geert,
On 10/20/2026 10:27 AM, Geert Uytterhoeven wrote:
>
> Hi Diogo,
>
> On Tue, 20 Oct 2026 at 11:15, Diogo Ivo <diogo.ivo.sx@renesas.com> 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
>> Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
>
> Thanks for your patch!
>
>> --- a/drivers/i3c/master/renesas-i3c.c
>> +++ b/drivers/i3c/master/renesas-i3c.c
>> @@ -579,7 +579,18 @@ 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.
>> + */
>> + if (!bus->scl_rate.i2c)
>> + i2c_total_ticks = DIV_ROUND_UP(i3c->rate, I3C_BUS_I2C_FM_PLUS_SCL_MAX_RATE);
>> + else
>> + i2c_total_ticks = DIV_ROUND_UP(i3c->rate, bus->scl_rate.i2c);
>> +
>> i3c_total_ticks = DIV_ROUND_UP(i3c->rate, bus->scl_rate.i3c);
>
> This looks like a good opportunity to use the shortened tertiary ?:-operator:
>
> bus->scl_rate.i2c ?: I3C_BUS_I2C_FM_PLUS_SCL_MAX_RATE
Ack, will change in v2.
Thanks for the review,
Diogo
>>
>> i2c_parse_fw_timings(&m->dev, &t, true);
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2026-10-20 14:13 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-20 9:14 [PATCH 0/8] i3c: renesas: Add RZ/G3L support Diogo Ivo
2026-10-20 9:14 ` [PATCH 1/8] i3c: renesas: Fix zero I2C SCL rate on pure I3C buses Diogo Ivo
2026-10-20 9:27 ` Geert Uytterhoeven
2026-10-20 14:13 ` Diogo Ivo
2026-10-20 9:14 ` [PATCH 2/8] i3c: renesas: Drop comma after OF match table sentinel Diogo Ivo
2026-10-20 9:14 ` [PATCH 3/8] dt-bindings: i3c: renesas,i3c: Add RZ/G3L support Diogo Ivo
2026-10-20 9:14 ` [PATCH 4/8] i3c: renesas: " Diogo Ivo
2026-10-20 9:14 ` [PATCH 5/8] clk: renesas: r9a08g046: Add I3C clocks and resets Diogo Ivo
2026-10-20 9:15 ` [PATCH 6/8] pinctrl: renesas: rzg2l: Split SoC-specific masks in struct rzg2l_register_masks Diogo Ivo
2026-10-20 9:15 ` [PATCH 7/8] pinctrl: renesas: rzg2l: Add RZ/G3L support for selecting I3C power source Diogo Ivo
2026-10-20 9:15 ` [PATCH 8/8] 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
all inboxes | Powered by JetHome®