Skip to content
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

Support SPI driver for Renesas RA6 devices #79285

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

thaoluonguw
Copy link
Collaborator

Add support for SPI driver for RA6 devices

  • Add SPI driver support on EK_RA6E2, EK_RA6M1, EK_RA6M2, EK_RA6M3, EK_RA6M4, EK_RA6M5, FPB_RA6E1, FPB_RA6E2

@thaoluonguw thaoluonguw added the platform: Renesas RA Renesas Electronics Corporation, RA label Oct 1, 2024
@zephyrbot
Copy link
Collaborator

zephyrbot commented Oct 1, 2024

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
hal_renesas zephyrproject-rtos/hal_renesas@3dafd03 zephyrproject-rtos/hal_renesas@6ebe2c4 (main) zephyrproject-rtos/hal_renesas@3dafd030..6ebe2c40

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@zephyrbot zephyrbot added manifest manifest-hal_renesas DNM This PR should not be merged (Do Not Merge) labels Oct 1, 2024
@zephyrbot zephyrbot removed the DNM This PR should not be merged (Do Not Merge) label Oct 11, 2024
@thaoluonguw thaoluonguw marked this pull request as ready for review October 11, 2024 17:23
@zephyrbot zephyrbot added the area: SPI SPI bus label Oct 11, 2024
@soburi
Copy link
Member

soburi commented Oct 11, 2024

Does this work with RA2, 4, 8?

Tri Nguyen and others added 2 commits October 14, 2024 15:05
Add SPI driver code and basic support for RA6

Signed-off-by: Tri Nguyen <tri.nguyen.wj@bp.renesas.com>
Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
Update hal_renesas which support for spi on RA6

Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
@thaoluonguw
Copy link
Collaborator Author

Hello @soburi,

Does this work with RA2, 4, 8?

It expects to work with RA2 and RA4. We are updating device tree and verifying for RA4 and RA2. They will be update later or in another PR.

For RA8, it already supported. It uses sci_b (spi_b_renesas_ra8.c).

@soburi
Copy link
Member

soburi commented Oct 14, 2024

Hello @soburi,

Does this work with RA2, 4, 8?

It expects to work with RA2 and RA4. We are updating device tree and verifying for RA4 and RA2. They will be update later or in another PR.

For RA8, it already supported. It uses sci_b (spi_b_renesas_ra8.c).

Understood. I was worried that the implementation would need to be tweaked for each model.

Copy link
Collaborator

@tbursztyka tbursztyka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All seems quite fine to me (but for the tiny comment I made on the code part)

Aside of this, could you split your first commit in 3:

  • one for the driver (its dts bindings and the actual driver)
  • one for the boards
  • and one for the tests

case SPI_EVENT_ERR_FRAMING: /* Framing error */
case SPI_EVENT_ERR_MODE_UNDERRUN: /* Underrun error */
spi_context_cs_control(&data->ctx, false);
spi_context_complete(&data->ctx, dev, 0);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this path seems to be the one for errors, but you still return 0 as code? (it should be -EIO)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants