Skip to content

Add support I2C driver for Renesas RZ/A3UL, T2M, N2L, V2L #93754

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions boards/renesas/rza3ul_smarc/rza3ul_smarc-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,11 @@
slew-rate = "fast";
};
};

/omit-if-no-ref/ i2c1_pins: i2c1 {
i2c1-spins {
pins = <BSP_IO_RIIC1_SDA>, <BSP_IO_RIIC1_SCL>;
input-enable;
};
};
};
6 changes: 6 additions & 0 deletions boards/renesas/rza3ul_smarc/rza3ul_smarc.dts
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,9 @@
pinctrl-names = "default";
status = "okay";
};

&i2c1 {
pinctrl-0 = <&i2c1_pins>;
pinctrl-names = "default";
status = "okay";
};
1 change: 1 addition & 0 deletions boards/renesas/rza3ul_smarc/rza3ul_smarc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ toolchain:
supported:
- uart
- gpio
- i2c
testing:
ignore_tags:
- bluetooth
7 changes: 7 additions & 0 deletions boards/renesas/rzn2l_rsk/rzn2l_rsk-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,11 @@
<RZN_PINMUX(PORT_04, 0, 3)>; /* GTIOCB */
};
};

/omit-if-no-ref/ i2c1_default: i2c1_default {
i2c1-pinmux {
pinmux = <RZN_PINMUX(PORT_05, 2, 8)>, /* SCL */
<RZN_PINMUX(PORT_05, 3, 9)>; /* SDA */
};
};
};
6 changes: 6 additions & 0 deletions boards/renesas/rzn2l_rsk/rzn2l_rsk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,9 @@
&gpio5 {
status = "okay";
};

&i2c1 {
pinctrl-0 = <&i2c1_default>;
pinctrl-names = "default";
status = "okay";
};
1 change: 1 addition & 0 deletions boards/renesas/rzn2l_rsk/rzn2l_rsk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ supported:
- uart
- gpio
- pwm
- i2c
vendor: renesas
7 changes: 7 additions & 0 deletions boards/renesas/rzt2m_rsk/rzt2m_rsk-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,11 @@
<RZT_PINMUX(PORT_03, 6, 5)>; /* GTIOCB */
};
};

/omit-if-no-ref/ i2c1_default: i2c1_default {
i2c1-pinmux {
pinmux = <RZT_PINMUX(PORT_22, 6, 2)>, /* SCL */
<RZT_PINMUX(PORT_22, 7, 2)>; /* SDA */
};
};
};
6 changes: 6 additions & 0 deletions boards/renesas/rzt2m_rsk/rzt2m_rsk_r9a07g075m24gbg_cr520.dts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@
status = "okay";
};

&i2c1 {
pinctrl-0 = <&i2c1_default>;
pinctrl-names = "default";
status = "okay";
};

&gpio10 {
irqs = <5 2>;
status = "okay";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ supported:
- uart
- gpio
- pwm
- i2c
vendor: renesas
7 changes: 7 additions & 0 deletions boards/renesas/rzv2l_smarc/rzv2l_smarc-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,11 @@
pinmux = <RZV_PINMUX(PORT_41, 0, 2)>; /* GTIOCA */
};
};

/omit-if-no-ref/ i2c3_pins: i2c3 {
i2c3-pinmux {
pinmux = <RZV_PINMUX(PORT_18, 0, 3)>, /* SDA */
<RZV_PINMUX(PORT_18, 1, 3)>; /* SCL */
};
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,9 @@
pinctrl-names = "default";
status = "okay";
};

&i2c3 {
pinctrl-0 = <&i2c3_pins>;
pinctrl-names = "default";
status = "okay";
};
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ supported:
- uart
- gpio
- pwm
- i2c
vendor: renesas
1 change: 1 addition & 0 deletions drivers/i2c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ zephyr_library_sources_ifdef(CONFIG_I2C_RCAR i2c_rcar.c)
zephyr_library_sources_ifdef(CONFIG_I2C_RENESAS_RA_IIC i2c_renesas_ra_iic.c)
zephyr_library_sources_ifdef(CONFIG_I2C_RENESAS_RA_SCI_B i2c_renesas_ra_sci_b.c)
zephyr_library_sources_ifdef(CONFIG_I2C_RENESAS_RX_RIIC i2c_renesas_rx_riic.c)
zephyr_library_sources_ifdef(CONFIG_I2C_RENESAS_RZ_IIC i2c_renesas_rz_riic.c)
zephyr_library_sources_ifdef(CONFIG_I2C_RENESAS_RZ_RIIC i2c_renesas_rz_riic.c)
zephyr_library_sources_ifdef(CONFIG_I2C_RTS5912 i2c_realtek_rts5912.c)
zephyr_library_sources_ifdef(CONFIG_I2C_RV32M1_LPI2C i2c_rv32m1_lpi2c.c)
Expand Down
12 changes: 11 additions & 1 deletion drivers/i2c/Kconfig.renesas_rz
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
# Copyright (c) 2024 Renesas Electronics Corporation
# Copyright (c) 2024-2025 Renesas Electronics Corporation
# SPDX-License-Identifier: Apache-2.0

config I2C_RENESAS_RZ_RIIC
bool "Renesas RZ I2C RIIC Master"
default y
depends on DT_HAS_RENESAS_RZ_RIIC_ENABLED
select USE_RZ_FSP_RIIC_MASTER
select PINCTRL
help
Enable Renesas RZ I2C RIIC Driver.

config I2C_RENESAS_RZ_IIC
bool "Renesas RZ I2C IIC Master"
default y
depends on DT_HAS_RENESAS_RZ_IIC_ENABLED
select USE_RZ_FSP_IIC_MASTER
select PINCTRL
help
Enable Renesas RZ I2C IIC Driver.
Loading