Skip to content

drivers: crc: initial support for renesas,ra-crc driver #87557

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

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

Conversation

thenguyenyf
Copy link
Collaborator

@thenguyenyf thenguyenyf commented Mar 24, 2025

This PR is inherited from #74977 to add a CRC device driver with hardware accelerator. We'd like to introduce:

  • New CRC device drivers: include/zephyr/drivers/crc.h
  • New CRC subsystem: using the same interface with include/zephyr/sys/crc.h

The crc subsys implementation can be chosen as:

  • A CRC device driver, get by zephyr,crc alias if it's defined
  • CRC software-based library, that migrated from old lib/crc to new location: subsys/crc/crc*_sw.c

@zephyrbot
Copy link
Collaborator

zephyrbot commented Mar 24, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff

All manifest checks OK

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

@zephyrbot zephyrbot added manifest manifest-hal_renesas DNM (manifest) This PR should not be merged (controlled by action-manifest) labels Mar 24, 2025
@henrikbrixandersen henrikbrixandersen self-requested a review March 24, 2025 20:32
@henrikbrixandersen henrikbrixandersen added the Architecture Review Discussion in the Architecture WG required label Mar 24, 2025
@henrikbrixandersen
Copy link
Member

@thenguyenyf Nice, thanks! Are you able to give a short presentation of this in an Architecture Working Group meeting?

@thenguyenyf
Copy link
Collaborator Author

@thenguyenyf Nice, thanks! Are you able to give a short presentation of this in an Architecture Working Group meeting?

Hello @henrikbrixandersen . I'm willing to join and give a presentation for the new CRC subsystem. How about next week meeting? I may not be able to join this week.

@thenguyenyf thenguyenyf force-pushed the renesas_ra_crc_driver_support branch 3 times, most recently from bce01eb to 6b4d778 Compare March 28, 2025 03:30
@thaoluonguw
Copy link
Collaborator

Please rebase to slove conflict.

@thenguyenyf thenguyenyf force-pushed the renesas_ra_crc_driver_support branch 2 times, most recently from 5e366bc to 6c12cb7 Compare March 31, 2025 06:30
@thenguyenyf thenguyenyf force-pushed the renesas_ra_crc_driver_support branch 2 times, most recently from d9db36b to ea016fb Compare April 1, 2025 11:43
@thenguyenyf
Copy link
Collaborator Author

Last push just to rebase and solve conflict

@thenguyenyf thenguyenyf force-pushed the renesas_ra_crc_driver_support branch from 6af150c to 578b46a Compare April 25, 2025 11:39
@thenguyenyf thenguyenyf requested a review from pdgendt April 25, 2025 11:39
@kartben kartben requested a review from Copilot April 25, 2025 18:40
@kartben kartben removed their assignment Apr 25, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces initial support for the Renesas RA CRC driver by adding hardware-accelerated CRC functionality and updating board configuration files and maintainers accordingly.

  • Added "crc" as a supported feature in multiple Renesas board YAML files.
  • Updated the MAINTAINERS file with new CRC subsystem source file paths.

Reviewed Changes

Copilot reviewed 90 out of 100 changed files in this pull request and generated no comments.

Show a summary per file
File Description
boards/renesas/ek_ra6e2/ek_ra6e2.yaml Added "crc" to the supported list
boards/renesas/ek_ra4w1/ek_ra4w1.yaml Added "crc" to the supported list
boards/renesas/ek_ra4m3/ek_ra4m3.yaml Added "crc" to the supported list
boards/renesas/ek_ra4m2/ek_ra4m2.yaml Added "crc" to the supported list
boards/renesas/ek_ra4m1/ek_ra4m1.yaml Added "crc" to the supported list
boards/renesas/ek_ra4l1/ek_ra4l1.yaml Added "crc" to the supported list
boards/renesas/ek_ra4e2/ek_ra4e2.yaml Added "crc" to the supported list
boards/renesas/ek_ra2l1/ek_ra2l1.yaml Added "crc" to the supported list
boards/renesas/ek_ra2a1/ek_ra2a1.yaml Added "crc" to the supported list
MAINTAINERS.yml Updated file paths to include new CRC subsystem files
Files not reviewed (10)
  • boards/renesas/ek_ra2a1/ek_ra2a1.dts: Language not supported
  • boards/renesas/ek_ra2l1/ek_ra2l1.dts: Language not supported
  • boards/renesas/ek_ra4e2/ek_ra4e2.dts: Language not supported
  • boards/renesas/ek_ra4l1/ek_ra4l1.dts: Language not supported
  • boards/renesas/ek_ra4m1/ek_ra4m1.dts: Language not supported
  • boards/renesas/ek_ra4m2/ek_ra4m2.dts: Language not supported
  • boards/renesas/ek_ra4m3/ek_ra4m3.dts: Language not supported
  • boards/renesas/ek_ra4w1/ek_ra4w1.dts: Language not supported
  • boards/renesas/ek_ra6e2/ek_ra6e2.dts: Language not supported
  • boards/renesas/ek_ra6m1/ek_ra6m1.dts: Language not supported

@thenguyenyf thenguyenyf force-pushed the renesas_ra_crc_driver_support branch from 578b46a to 0f47e2f Compare May 5, 2025 02:28
@github-actions github-actions bot removed manifest manifest-hal_renesas DNM (manifest) This PR should not be merged (controlled by action-manifest) labels May 5, 2025
@thenguyenyf thenguyenyf force-pushed the renesas_ra_crc_driver_support branch from 0f47e2f to d919d74 Compare May 14, 2025 02:34
@thenguyenyf thenguyenyf force-pushed the renesas_ra_crc_driver_support branch from d919d74 to 2ef4b9e Compare May 16, 2025 11:34
@thenguyenyf thenguyenyf added this to the v4.2.0 milestone May 19, 2025
@thaoluonguw
Copy link
Collaborator

@thenguyenyf : Please solve conflict. Thank you.

@@ -0,0 +1,175 @@
/*
* Copyright (c) 2024 Brill Power Ltd.
Copy link
Member

Choose a reason for hiding this comment

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

Is this copyright notice correct?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I keep this copyright from original contributor due to this interface is inherited from #74977

Copy link
Member

@soburi soburi May 29, 2025

Choose a reason for hiding this comment

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

In that case, it would also be good to add Co-authored-by: to your commit message.
And of course it's a good idea to credit yourself after the original author.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I fixed it

@carlescufi carlescufi removed the Architecture Review Discussion in the Architecture WG required label Jun 2, 2025
@thenguyenyf thenguyenyf force-pushed the renesas_ra_crc_driver_support branch from 2ef4b9e to 040255e Compare June 4, 2025 02:24
Duy Vo and others added 9 commits June 4, 2025 09:28
- Implement CRC syscall.
- Add CRC driver API.
- Introduce support for the CRC driver.

Co-authored-by: Zoe Kaute <zoe.kaute@brillpower.com>
Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
Add device tree node for CRC driver on all Renesas MCU

Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
Enable and add CRC node to aliases, chosen for all
Renesas MCU

Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
Migrate support from crc library to new crc subsystem
Add hardware acclerator backend for crc subsystem

Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
Add samples for CRC driver

Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
Add samples for CRC subsystem

Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
Add ztests for CRC driver

Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
Add ztests for CRC subsystem

Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
Due to the move of lib/crc to subsys/crc, the include path of CRC handler
in this test should be updated:
- tests/unit/crc

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
@thenguyenyf thenguyenyf force-pushed the renesas_ra_crc_driver_support branch from 040255e to 0ddbc7c Compare June 4, 2025 02:30
Copy link

sonarqubecloud bot commented Jun 4, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

9 participants