hoahuubui opened a new pull request, #22112:
URL: https://github.com/apache/nuttx/pull/22112

   ## Summary
   
   Add I2C master support for the Renesas RZ/V2H (Cortex-R8, CPU0)
   through two peripherals (riic and sci_i2c):
   
   - RIIC I2C (`rzv2h_riic_i2c`): channels 0-8, RZV2H-EVK only.
   - SCI simple I2C (`rzv2h_sci_i2c`): channels 0-9, RZV2H-EVK and RZV2H-RDK.
     An SCI channel is either UART or I2C, so the Kconfig symbols are
     mutually exclusive with `RZV2H_SCI_B_UARTn`.
   
   The series has three commits:
   
   1. `arch/arm/rzv2h`: the two I2C drivers, Kconfig, Make.defs, CMake, 
       SCI I2C pin definitions.
   3. `boards/arm/rzv2h`: RIIC and SCI I2C pin definitions in `board.h`, I2C
      bus registration in board bring-up, and the `riic-i2c` (EVK only) and
      `sci-i2c` defconfigs.
   4. `Documentation/arm/rzv2h`: documentation for both drivers and boards.
   
   RIIC is not routed to any connector on the RZV2H-RDK, so only SCI I2C is
   available there. `board.h` raises an `#error` if an unsupported channel is
   enabled.
   
   ## Impact
   
   - New feature, off by default. Nothing changes for existing RZ/V2H
     configurations unless an I2C driver is enabled.
   - Three new board configurations: `rzv2h-evk:riic-i2c`,
     `rzv2h-evk:sci-i2c` and `rzv2h-rdk:sci-i2c`.
   - Documentation: new RIIC I2C and SCI I2C sections for the RZ/V2H platform
     page and both board pages, plus a section on changing interrupt-select IDs.
   - No compatibility or security impact expected.
   
   ## Testing
   
   Host: Linux Ubuntu 24.04, arm-none-eabi-gcc 13.2.1
   
   Build checks:
   - `rzv2h-evk:riic-i2c`, `rzv2h-evk:sci-i2c` and `rzv2h-rdk:sci-i2c` build
     with the new drivers compiling without warnings.
   - `tools/checkpatch.sh` passes on all changed files, and the pre-commit
     hooks (nxstyle, cmake-format, codespell) pass.
   
   Runtime checks on hardware:
   **Board: RZ/V2H-RDK**:
   
   **_SCI-I2C:_** 
   
   `./tools/configure.sh -l rzv2h-rdk:sci-i2c && make`
   ```
   NuttShell (NSH) NuttX-13.1.1-RC0
   nsh> ls /dev
   /dev:
   console
   gpio0
   gpio1
   gpio2
   i2c17
   null
   ttyS0
   zero
   nsh> i2c dev -b 17 0x70 0x77
   NOTE: Some devices may not appear with this scan.
   You may also try a scan with the -z flag to discover more devices using a 
zero-byte write request.
        0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
   00:
   10:
   20:
   30:
   40:
   50:
   60:
   70: -- -- -- -- -- -- -- --
   nsh>
   ```
   
   **Board: RZ/V2H-EVK:**
   
   **_SCI-I2C:_** 
   
   `./tools/configure.sh -l rzv2h-evk:sci-i2c && make`
   ```
   NuttShell (NSH) NuttX-13.1.1-RC0
   nsh> ls /dev
   /dev:
   console
   gpio0
   gpio1
   gpio2
   i2c17
   null
   ttyS0
   zero
   nsh> i2c dev -b 17 0x70 0x77
   NOTE: Some devices may not appear with this scan.
   You may also try a scan with the -z flag to discover more devices using a 
zero-byte write request.
        0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
   00:
   10:
   20:
   30:
   40:
   50:
   60:
   70: -- -- -- -- -- -- -- --
   nsh>
   ```
   
   **_RIIC-I2C:_** 
   
   `./tools/configure.sh -l rzv2h-evk:riic-i2c && make`
   ```
   NuttShell (NSH) NuttX-13.1.1-RC0
   nsh> ls /dev
   /dev:
   console
   gpio0
   gpio1
   gpio2
   i2c2
   null
   ttyS0
   zero
   nsh> i2c dev -b 2 0x70 0x77
   NOTE: Some devices may not appear with this scan.
   You may also try a scan with the -z flag to discover more devices using a 
zero-byte write request.
        0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
   00:
   10:
   20:
   30:
   40:
   50:
   60:
   70: -- -- -- -- -- -- -- --
   nsh>
   ```


-- 
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]

  • [PR] arch/arm/rzv2h: Add RIIC... hoahuubui (via GitHub) via commits

Reply via email to