Skip to content

Conversation

@vjardin
Copy link

@vjardin vjardin commented Dec 14, 2025

Add I2C slave support for Renesas RA microcontrollers:

  • Add I2C slave source files (r_iic_slave.c, r_iica_slave.c, r_iic_b_slave.c) from fsp
  • Add corresponding header files in fsp/inc/instances/
  • Add configuration files for each slave implementation
  • Update CMakeLists.txt to include conditional compilation
  • Follow the same pattern as existing master implementations

The implementation supports three variants:

  • Standard IIC slave
  • Enhanced IICA slave
  • I3C-capable IIC_B slave

This provides a complete I2C solution for slave modes on RA microcontrollers.

@vjardin
Copy link
Author

vjardin commented Dec 14, 2025

It is WIP, only for eyes checking per my former comments few months ago. Do not merge it yet.

The WIP zephyr update is at https://github.com/vjardin/zephyr/tree/vj_add_i2c_slave

Import I2C slave driver files from Renesas FSP v6.2.0:

API:
- fsp/inc/api/r_i2c_slave_api.h

Implementations:
- fsp/src/r_iic_slave/r_iic_slave.c
- fsp/src/r_iic_b_slave/r_iic_b_slave.c
- fsp/src/r_iica_slave/r_iica_slave.c

Headers:
- fsp/inc/instances/r_iic_slave.h
- fsp/inc/instances/r_iic_b_slave.h
- fsp/inc/instances/r_iica_slave.h

These files are imported verbatim from the upstream Renesas FSP
repository to add I2C slave (target) mode support for RA MCUs.

Three I2C slave variants are provided:
- IIC: Standard I2C peripheral
- IIC_B: I3C-capable I2C peripheral (RA8 series)
- IICA: Simplified I2C peripheral (RA2 series)

Signed-off-by: Vincent Jardin <[email protected]>
Add configuration headers and CMake rules for building the IIC, IIC_B,
and IICA slave drivers with Zephyr.

Configuration headers provide the necessary declarations and macros
expected by the FSP driver sources. CMakeLists.txt is updated with
conditional compilation rules using the following Kconfig options:
- CONFIG_USE_RA_FSP_IIC_SLAVE
- CONFIG_USE_RA_FSP_IIC_B_SLAVE
- CONFIG_USE_RA_FSP_IICA_SLAVE

Signed-off-by: Vincent Jardin <[email protected]>
@vjardin vjardin marked this pull request as ready for review December 15, 2025 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant