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

   # arch/arm/rzv2h: Add SPI support for Renesas RZ/V2H
   
   ## Summary
   
   Add SPI master and slave support for the Renesas RZ/V2H (Cortex-R8, CPU0)
   through the `r_spi_b` peripheral.
   
   - SPI_B (`rzv2h_spi`): channels 0-2, available on RZV2H-EVK and RZV2H-RDK.
   - Each channel's hardware role (master or slave) can be selected
     independently via Kconfig. Master channels use the standard NuttX SPI
     interface; slave channels use the NuttX SPI slave-controller interface.
   
   The series has three commits:
   
   1. `arch/arm/rzv2h`: the SPI_B driver, Kconfig, Make.defs, CMake, and
      SPI_B pin definitions.
   2. `boards/arm/rzv2h`: SPI_B pin definitions in `board.h`, SPI bus
      registration in board bring-up, and the `nsh-spi` defconfig for both
      boards.
   3. `Documentation/arm/rzv2h`: documentation for the driver and both
      boards.
   
   `board.h` raises an `#error` if an unsupported SSL (chip-select) route is
   configured for a channel.
   
   ## Impact
   
   - New feature, off by default. Nothing changes for existing RZ/V2H
     configurations unless SPI is enabled.
   - Two new board configurations: `rzv2h-evk:nsh-spi` and
     `rzv2h-rdk:nsh-spi`.
   - Documentation: new SPI_B section for the RZ/V2H platform page and both
     board pages.
   - No compatibility or security impact expected.
   
   ## Testing
   
   Host: Linux Ubuntu 24.04, arm-none-eabi-gcc 13.2.1
   
   Build checks:
   
   - `rzv2h-evk:nsh-spi` and `rzv2h-rdk:nsh-spi` build with the new driver
     compiling without warnings.
   - `tools/checkpatch.sh` passes on all changed files; pre-commit hooks
     (nxstyle, cmake-format, codespell) pass.
   
   Runtime checks on hardware 
   - **Board: RZ/V2H-RDK**, `rzv2h-rdk:nsh-spi`
   - **Board: RZ/V2H-EVK**, `rzv2h-evk:nsh-spi`
   (master loopback on channel 1, plus slave/master exchange between
   channels 0 and 2):
   
   ```
   nsh> spi exch -b1 -f1000000 -m0 -w8 -x4 00112233
   Sending:          00 11 22 33
   Received:         00 11 22 33
   nsh> spi exch -b1 -f400000 -m0 -w8 -x4 44556677
   Sending:          44 55 66 77
   Received:         44 55 66 77
   nsh> spi exch -b1 -f400000 -m3 -w8 -x4 44556677
   Sending:          44 55 66 77
   Received:         44 55 66 77
   nsh> spi exch -b1 -f1000000 -m0 -w8 -x8 00112233445566778899
   Sending:          00 11 22 33 44 55 66 77
   Received:         00 11 22 33 44 55 66 77
   nsh> spi exch -b1 -f1000000 -m0 -w16 -x4 00112233445566778899
   Sending:          1100 3322 5544 7766
   Received:         1100 3322 5544 7766
   nsh> spi exch -b1 -f1000000 -m0 -w8 -x4 -r2 00112233445566778899
   Sending:          00 11 22 33 44 55 66 77
   Received:         00 11 22 33 44 55 66 77
   nsh> spislv -p /dev/spislv2 -x8 0011223344556677 &
   spislv [11:100]
   nsh> Slave: Queuing 8 bytes for sending to master: 00 11 22 33 44 55 66 77
   spi exch -b0 -f1000000 -m0 -w8 -x4 8899AABBCCDDEEFF
   Sending:          88 99 AA BB CC DD EE FF
   Data received from master (8 bytes): 88 99 AA BB CC DD EE FF
   Received:         00 11 22 33 44 55 66 77
   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] Rzv2h spi driver upstrea... binhnguyen2434 (via GitHub) via commits

Reply via email to