leocafonso opened a new pull request, #20676:
URL: https://github.com/apache/nuttx/pull/20676
## Summary
* The RA8M1 port had no I2C master support of any kind. This adds it
through two independent peripheral paths, both exposed through the
generic `struct i2c_master_s` interface as `/dev/i2cN`: the
dedicated I2C Bus Interface (IIC0/IIC1, `CONFIG_RA_IIC0`/
`RA_IIC1`), and any SCI_B channel's Simple IIC mode used in place
of its UART mode (`CONFIG_RA_SCIn_I2C`) -- the latter lets a board
use more I2C buses than there are dedicated IIC channels.
* Both backends are interrupt-driven and support optional DTC
offload (`CONFIG_RA_IICn_DTC`/`RA_SCIn_DTC`): once a message's
address byte is acknowledged, its data bytes move through the DTC
instead of one byte per interrupt.
* The board (`ek-ra8m1`) registers whichever of these channels its
build enables, each through its own init call with no shared
dispatcher; `/dev/i2cN` numbering is assigned compactly by a local
counter in `ra8m1_bringup()`, in source order, rather than a fixed
per-channel table.
* Changes are split into three commits: `arch` (the two drivers),
`boards` (registration + board pin definitions), `Documentation`
(platform and board documentation for both backends).
## Impact
* Is new feature added? Is existing feature changed? YES -- new
feature (I2C master support for RA8M1), no existing feature
changed.
* Impact on user (will user need to adapt to change)? NO -- opt-in
via Kconfig, nothing enabled by default.
* Impact on build (will build process change)? NO.
* Impact on hardware (will arch(s)/board(s)/driver(s) change)? YES --
adds `arch/arm/src/ra8m1/ra_iic_i2c.c`/`ra_sci_i2c.c` and their
Kconfig options; adds `ek-ra8m1` board I2C registration and GPIO
pin definitions. No existing driver or board behavior changed.
* Impact on documentation (is update required/provided)? YES --
provided in this PR (platform and board pages).
* Impact on security (any sort of implications)? NO.
* Impact on compatibility (backward/forward/interoperability)? NO.
* Anything else to consider or add? Both backends are master-only
(no slave mode, no 10-bit addressing).
## Testing
I confirm that changes are verified on local setup and works as intended:
* Build Host(s): Linux x86_64 (Ubuntu, kernel 6.8), arm-none-eabi-gcc
13.2.1 (Arm GNU Toolchain 13.2.rel1).
* Target(s): arm, `ek-ra8m1:nsh` (EK-RA8M1, R7FA8M1AHECBD).
* Tested on real hardware against a real I2C sensor via
`apps/system/i2c` (i2ctool get/dump): IIC1 through the board's
Grove2 connector, and SCI2 in Simple IIC mode, each with and
without DTC offload enabled, single-byte and multi-byte
repeated-start transfers.
## PR verification Self-Check
* [x] This PR introduces only one functional change.
* [x] I have updated all required description fields above.
* [x] My PR adheres to Contributing Guidelines and Documentation (git commit
title and message, coding standard, etc).
* [ ] My PR is still work in progress (not ready for review).
* [x] My PR is ready for review and can be safely merged into a codebase.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]