Add RZ/V2N I2C support
Subsystems (6)
cover Add RZ/V2N I2C support
Hi,
This patch series adds I2C support for the Renesas RZ/V2N SoC.
Patches were cherry-picked from mainline kernel.
Best regards,
Ovidiu
Lad Prabhakar (4):
clk: renesas: r9a09g056: Add clock and reset entries for RIIC
controllers
dt-bindings: i2c: renesas,riic: Document RZ/V2N (R9A09G056) support
arm64: dts: renesas: r9a09g056: Add RIIC controllers
arm64: dts: renesas: r9a09g056n48-rzv2n-evk: Enable RIIC controllers
.../devicetree/bindings/i2c/renesas,riic.yaml | 1 + arch/arm64/boot/dts/renesas/r9a09g056.dtsi | 189 ++++++++++++++++++ .../dts/renesas/r9a09g056n48-rzv2n-evk.dts | 95 +++++++++ drivers/clk/renesas/r9a09g056-cpg.c | 27 +++ 4 files changed, 312 insertions(+)
Signature · 1 line
2.51.0
PATCH 1/4 clk: renesas: r9a09g056: Add clock and reset entries for RIIC controllers
From: Lad Prabhakar <[email protected]>
commit d3c25dd1612da7ddf5857190e92b0c36d803c4d9 upstream.
Add module clock and reset definitions for RIIC controllers 0-8, which are available on the RZ/V2N (R9A09G056) SoC.
--- drivers/clk/renesas/r9a09g056-cpg.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
drivers/clk/renesas/r9a09g056-cpg.c +27 -0
@@ -170,6 +170,24 @@ static const struct rzv2h_mod_clk r9a09g056_mod_clks[] __initconst = { BUS_MSTOP(5, BIT(13))),DEF_MOD ("scif_0_clk_pck" ,CLK_PLLCM33_DIV16 ,8 ,15 ,4 ,15 ,BUS_MSTOP (3 ,BIT (14 ))), +DEF_MOD ("riic_8_ckm" ,CLK_PLLCM33_DIV16 ,9 ,3 ,4 ,19 , +BUS_MSTOP (3 ,BIT (13 ))), +DEF_MOD ("riic_0_ckm" ,CLK_PLLCLN_DIV16 ,9 ,4 ,4 ,20 , +BUS_MSTOP (1 ,BIT (1 ))), +DEF_MOD ("riic_1_ckm" ,CLK_PLLCLN_DIV16 ,9 ,5 ,4 ,21 , +BUS_MSTOP (1 ,BIT (2 ))), +DEF_MOD ("riic_2_ckm" ,CLK_PLLCLN_DIV16 ,9 ,6 ,4 ,22 , +BUS_MSTOP (1 ,BIT (3 ))), +DEF_MOD ("riic_3_ckm" ,CLK_PLLCLN_DIV16 ,9 ,7 ,4 ,23 , +BUS_MSTOP (1 ,BIT (4 ))), +DEF_MOD ("riic_4_ckm" ,CLK_PLLCLN_DIV16 ,9 ,8 ,4 ,24 , +BUS_MSTOP (1 ,BIT (5 ))), +DEF_MOD ("riic_5_ckm" ,CLK_PLLCLN_DIV16 ,9 ,9 ,4 ,25 , +BUS_MSTOP (1 ,BIT (6 ))), +DEF_MOD ("riic_6_ckm" ,CLK_PLLCLN_DIV16 ,9 ,10 ,4 ,26 , +BUS_MSTOP (1 ,BIT (7 ))), +DEF_MOD ("riic_7_ckm" ,CLK_PLLCLN_DIV16 ,9 ,11 ,4 ,27 , +BUS_MSTOP (1 ,BIT (8 ))),DEF_MOD ("sdhi_0_imclk" ,CLK_PLLCLN_DIV8 ,10 ,3 ,5 ,3 ,BUS_MSTOP (8 ,BIT (2 ))), DEF_MOD("sdhi_0_imclk2", CLK_PLLCLN_DIV8, 10, 4, 5, 4,
@@ -237,6 +255,15 @@ static const struct rzv2h_reset r9a09g056_resets[] __initconst = {DEF_RST (7 ,7 ,3 ,8 ),/* WDT_2_RESET */ DEF_RST (7 ,8 ,3 ,9 ),/* WDT_3_RESET */ DEF_RST (9 ,5 ,4 ,6 ),/* SCIF_0_RST_SYSTEM_N */ +DEF_RST (9 ,8 ,4 ,9 ),/* RIIC_0_MRST */ +DEF_RST (9 ,9 ,4 ,10 ),/* RIIC_1_MRST */ +DEF_RST (9 ,10 ,4 ,11 ),/* RIIC_2_MRST */ +DEF_RST (9 ,11 ,4 ,12 ),/* RIIC_3_MRST */ +DEF_RST (9 ,12 ,4 ,13 ),/* RIIC_4_MRST */ +DEF_RST (9 ,13 ,4 ,14 ),/* RIIC_5_MRST */ +DEF_RST (9 ,14 ,4 ,15 ),/* RIIC_6_MRST */ +DEF_RST (9 ,15 ,4 ,16 ),/* RIIC_7_MRST */ +DEF_RST (10 ,0 ,4 ,17 ),/* RIIC_8_MRST */ DEF_RST (10 ,7 ,4 ,24 ),/* SDHI_0_IXRST */ DEF_RST (10 ,8 ,4 ,25 ),/* SDHI_1_IXRST */ DEF_RST(10, 9, 4, 26), /* SDHI_2_IXRST */
Signature · 1 line
2.51.0
PATCH 2/4 dt-bindings: i2c: renesas,riic: Document RZ/V2N (R9A09G056) support
In reply to Ovidiu PanaitFrom: Lad Prabhakar <[email protected]>
commit 8b284979f7fb2f1acfd88a6b96c8863c410eb27f upstream.
Document support for the I2C Bus Interface (RIIC) found on the Renesas RZ/V2N (R9A09G056) SoC. The RIIC IP is identical to that on RZ/V2H(P), so renesas,riic-r9a09g057 will be used as a fallback compatible, enabling reuse of the existing driver without changes.
--- Documentation/devicetree/bindings/i2c/renesas,riic.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/i2c/renesas,riic.yaml +1 -0
@@ -26,6 +26,7 @@ properties: - enum: - renesas,riic-r9a08g045 # RZ/G3S - renesas,riic-r9a09g047 # RZ/G3E + - renesas,riic-r9a09g056 # RZ/V2N - const: renesas,riic-r9a09g057 # RZ/V2H(P) - enum:
Signature · 1 line
2.51.0
PATCH 3/4 arm64: dts: renesas: r9a09g056: Add RIIC controllers
In reply to Ovidiu PanaitFrom: Lad Prabhakar <[email protected]>
commit ece22fc24b0b23e123fde849340f1344f08fe151 upstream.
Add the nine RIIC controllers present on the Renesas RZ/V2N (R9A09G056) SoC to its DTSI.
--- arch/arm64/boot/dts/renesas/r9a09g056.dtsi | 189 +++++++++++++++++++++ 1 file changed, 189 insertions(+)
arch/arm64/boot/dts/renesas/r9a09g056.dtsi +189 -0
@@ -319,6 +319,195 @@ scif: serial@11c01400 { status = "disabled"; }; + i2c0: i2c@14400400 { + compatible = "renesas,riic-r9a09g056", "renesas,riic-r9a09g057"; + reg = <0 0x14400400 0 0x400>; + interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 507 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 506 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 175 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 179 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "tei", "ri", "ti", "spi", "sti", + "naki", "ali", "tmoi"; + clocks = <&cpg CPG_MOD 0x94>; + resets = <&cpg 0x98>; + power-domains = <&cpg>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c1: i2c@14400800 { + compatible = "renesas,riic-r9a09g056", "renesas,riic-r9a09g057"; + reg = <0 0x14400800 0 0x400>; + interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 509 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 508 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "tei", "ri", "ti", "spi", "sti", + "naki", "ali", "tmoi"; + clocks = <&cpg CPG_MOD 0x95>; + resets = <&cpg 0x99>; + power-domains = <&cpg>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c2: i2c@14400c00 { + compatible = "renesas,riic-r9a09g056", "renesas,riic-r9a09g057"; + reg = <0 0x14400c00 0 0x400>; + interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 511 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 510 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "tei", "ri", "ti", "spi", "sti", + "naki", "ali", "tmoi"; + clocks = <&cpg CPG_MOD 0x96>; + resets = <&cpg 0x9a>; + power-domains = <&cpg>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c3: i2c@14401000 { + compatible = "renesas,riic-r9a09g056", "renesas,riic-r9a09g057"; + reg = <0 0x14401000 0 0x400>; + interrupts = <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 513 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 512 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 194 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 195 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "tei", "ri", "ti", "spi", "sti", + "naki", "ali", "tmoi"; + clocks = <&cpg CPG_MOD 0x97>; + resets = <&cpg 0x9b>; + power-domains = <&cpg>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c4: i2c@14401400 { + compatible = "renesas,riic-r9a09g056", "renesas,riic-r9a09g057"; + reg = <0 0x14401400 0 0x400>; + interrupts = <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 515 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 514 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "tei", "ri", "ti", "spi", "sti", + "naki", "ali", "tmoi"; + clocks = <&cpg CPG_MOD 0x98>; + resets = <&cpg 0x9c>; + power-domains = <&cpg>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c5: i2c@14401800 { + compatible = "renesas,riic-r9a09g056", "renesas,riic-r9a09g057"; + reg = <0 0x14401800 0 0x400>; + interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 517 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 516 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "tei", "ri", "ti", "spi", "sti", + "naki", "ali", "tmoi"; + clocks = <&cpg CPG_MOD 0x99>; + resets = <&cpg 0x9d>; + power-domains = <&cpg>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c6: i2c@14401c00 { + compatible = "renesas,riic-r9a09g056", "renesas,riic-r9a09g057"; + reg = <0 0x14401c00 0 0x400>; + interrupts = <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 519 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 518 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "tei", "ri", "ti", "spi", "sti", + "naki", "ali", "tmoi"; + clocks = <&cpg CPG_MOD 0x9a>; + resets = <&cpg 0x9e>; + power-domains = <&cpg>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c7: i2c@14402000 { + compatible = "renesas,riic-r9a09g056", "renesas,riic-r9a09g057"; + reg = <0 0x14402000 0 0x400>; + interrupts = <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 521 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 520 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 221 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "tei", "ri", "ti", "spi", "sti", + "naki", "ali", "tmoi"; + clocks = <&cpg CPG_MOD 0x9b>; + resets = <&cpg 0x9f>; + power-domains = <&cpg>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c8: i2c@11c01000 { + compatible = "renesas,riic-r9a09g056", "renesas,riic-r9a09g057"; + reg = <0 0x11c01000 0 0x400>; + interrupts = <GIC_SPI 222 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 523 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 522 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 224 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 223 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 227 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "tei", "ri", "ti", "spi", "sti", + "naki", "ali", "tmoi"; + clocks = <&cpg CPG_MOD 0x93>; + resets = <&cpg 0xa0>; + power-domains = <&cpg>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + gic: interrupt-controller@14900000 { compatible = "arm,gic-v3"; reg = <0x0 0x14900000 0 0x20000>,
Signature · 1 line
2.51.0
PATCH 4/4 arm64: dts: renesas: r9a09g056n48-rzv2n-evk: Enable RIIC controllers
In reply to Ovidiu PanaitFrom: Lad Prabhakar <[email protected]>
commit f631c8392c9830f354b8b069f87e5ee19303b5b1 upstream.
Enable the RIIC controllers 0, 1, 2, 3, 6, 7, and 8 which are populated on the RZ/V2N EVK.
--- .../dts/renesas/r9a09g056n48-rzv2n-evk.dts | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+)
arch/arm64/boot/dts/renesas/r9a09g056n48-rzv2n-evk.dts +95 -0
@@ -17,6 +17,13 @@ / { aliases { ethernet0 = ð0; ethernet1 = ð1; + i2c0 = &i2c0; + i2c1 = &i2c1; + i2c2 = &i2c2; + i2c3 = &i2c3; + i2c6 = &i2c6; + i2c7 = &i2c7; + i2c8 = &i2c8; mmc1 = &sdhi1; serial0 = &scif; };
@@ -81,6 +88,55 @@ ð1 { status = "okay"; }; +&i2c0 { + pinctrl-0 = <&i2c0_pins>; + pinctrl-names = "default"; + clock-frequency = <400000>; + status = "okay"; +}; + +&i2c1 { + pinctrl-0 = <&i2c1_pins>; + pinctrl-names = "default"; + clock-frequency = <400000>; + status = "okay"; +}; + +&i2c2 { + pinctrl-0 = <&i2c2_pins>; + pinctrl-names = "default"; + clock-frequency = <400000>; + status = "okay"; +}; + +&i2c3 { + pinctrl-0 = <&i2c3_pins>; + pinctrl-names = "default"; + clock-frequency = <400000>; + status = "okay"; +}; + +&i2c6 { + pinctrl-0 = <&i2c6_pins>; + pinctrl-names = "default"; + clock-frequency = <400000>; + status = "okay"; +}; + +&i2c7 { + pinctrl-0 = <&i2c7_pins>; + pinctrl-names = "default"; + clock-frequency = <400000>; + status = "okay"; +}; + +&i2c8 { + pinctrl-0 = <&i2c8_pins>; + pinctrl-names = "default"; + clock-frequency = <400000>; + status = "okay"; +}; + &mdio0 { phy0: ethernet-phy@0 { compatible = "ethernet-phy-id0022.1640", "ethernet-phy-ieee802.3-c22";
@@ -162,6 +218,45 @@ eth1_pins: eth1 { output-enable; }; + i2c0_pins: i2c0 { + pinmux = <RZV2N_PORT_PINMUX(3, 0, 1)>, /* I2C0_SDA */ + <RZV2N_PORT_PINMUX(3, 1, 1)>; /* I2C0_SCL */ + }; + + i2c1_pins: i2c1 { + pinmux = <RZV2N_PORT_PINMUX(3, 2, 1)>, /* I2C1_SDA */ + <RZV2N_PORT_PINMUX(3, 3, 1)>; /* I2C1_SCL */ + }; + + i2c2_pins: i2c2 { + pinmux = <RZV2N_PORT_PINMUX(2, 0, 4)>, /* I2C2_SDA */ + <RZV2N_PORT_PINMUX(2, 1, 4)>; /* I2C2_SCL */ + }; + + i2c3_pins: i2c3 { + pinmux = <RZV2N_PORT_PINMUX(3, 6, 1)>, /* I2C3_SDA */ + <RZV2N_PORT_PINMUX(3, 7, 1)>; /* I2C3_SCL */ + }; + + i2c6_pins: i2c6 { + pinmux = <RZV2N_PORT_PINMUX(4, 4, 1)>, /* I2C6_SDA */ + <RZV2N_PORT_PINMUX(4, 5, 1)>; /* I2C6_SCL */ + /* There are no pull-up resistors on the EVK, so enable the internal pull-up */ + bias-pull-up; + }; + + i2c7_pins: i2c7 { + pinmux = <RZV2N_PORT_PINMUX(4, 6, 1)>, /* I2C7_SDA */ + <RZV2N_PORT_PINMUX(4, 7, 1)>; /* I2C7_SCL */ + /* There are no pull-up resistors on the EVK, so enable the internal pull-up */ + bias-pull-up; + }; + + i2c8_pins: i2c8 { + pinmux = <RZV2N_PORT_PINMUX(0, 6, 1)>, /* I2C8_SDA */ + <RZV2N_PORT_PINMUX(0, 7, 1)>; /* I2C8_SCL */ + }; + scif_pins: scif { pins = "SCIF_TXD", "SCIF_RXD"; renesas,output-impedance = <1>;
Signature · 1 line
2.51.0
Hi!
Quoted 3 lines
This patch series adds I2C support for the Renesas RZ/V2N SoC.
Patches were cherry-picked from mainline kernel.
Series looks ok to me, I can apply it if there are no other comments
and if it passes testing.
Best regards,
Pavel
Signature · 1 line
In cooperation with Nabla.
Pavel Machek
AppliedHi!
Quoted 3 lines
This patch series adds I2C support for the Renesas RZ/V2N SoC.
Patches were cherry-picked from mainline kernel.
Thank you, applied.
Best regards,
Pavel
Signature · 1 line
In cooperation with Nabla.
[email protected]
Reviewed-byHi Pavel,
Quoted 9 lines
-----Original Message-----
From: Pavel Machek <[email protected]>
Sent: Thursday, January 15, 2026 10:09 PM
To: Ovidiu Panait <[email protected]>
Cc: [email protected]; [email protected]; iwamatsu nobuhiro(岩松 信洋 □DITC○CPT) <[email protected]>
Subject: Re: [PATCH 6.12.y-cip 0/4] Add RZ/V2N I2C support
Quoted 7 lines
Hi!
Quoted 3 lines
This patch series adds I2C support for the Renesas RZ/V2N SoC.
Patches were cherry-picked from mainline kernel.
Thank you, applied.
It seems you haven't pushed yet.
Could you please push?
And, I reviewed this series, looks good to me.
Best regards,
Nobuhiro
Hi!
Quoted 4 lines
Quoted 1 line
Thank you, applied.
It seems you haven't pushed yet.
Could you please push?
Aha, sorry about that. I added your reviewed-by and pushed the result.
Best regards,
Pavel
Signature · 1 line
In cooperation with Nabla.