-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
base: main
Are you sure you want to change the base?
drivers: crc: initial support for renesas,ra-crc driver #87557
Conversation
The following west manifest projects have changed revision in this Pull Request:
⛔ DNM label due to: 1 project with PR revision Note: This message is automatically posted and updated by the Manifest GitHub Action. |
@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. |
bce01eb
to
6b4d778
Compare
Please rebase to slove conflict. |
5e366bc
to
6c12cb7
Compare
d9db36b
to
ea016fb
Compare
Last push just to rebase and solve conflict |
0c100b8
to
f342368
Compare
Last push just to rebase and solve conflict |
f342368
to
40751ca
Compare
Update rev of hal_renesas to add support for crc driver Signed-off-by: Duy Vo <[email protected]>
- Implement CRC syscall. - Add CRC driver API. - Introduce support for the CRC driver. Signed-off-by: Duy Vo <[email protected]>
Add device tree node for CRC driver on all Renesas MCU Signed-off-by: Duy Vo <[email protected]>
Enable and add CRC node to aliases, chosen for all Renesas MCU Signed-off-by: Duy Vo <[email protected]>
40751ca
to
19ee23d
Compare
Hello @henrikbrixandersen , @pdgendt , @kartben . I've updated according to WG's review items. Could you please take a look? |
subsys/crc/Kconfig
Outdated
|
||
config CRC4 | ||
bool "CRC-4 (Generic)" | ||
depends on CRC_DRIVER_HAS_CRC4 || CRC_SW_HANDLER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like an "all or nothing" for being able to select HW or SW CRC handlers. You can't have HW capable CRC drivers for some 32-bit variant, while having the SW CRC handlers for the others as a fallback.
Not sure how this could be achieved easily, maybe a chosen
per CRC type? Or add boolean dts binding properties for hardware to describe which variants are supported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how this could be achieved easily, maybe a chosen per CRC type?
Do you mean that for each CRC type we should have a specific chosen alias for it (ex: zephyr,crc4, zephyr,crc4ti, zephyr,crc7be, ...)? There are more than 10 type of CRC currently and the number could be increased. So, defining lots of aliases just to use one driver may not provide a good user experience.
Or add boolean dts binding properties for hardware to describe which variants are supported?
There is a large of number of properties should be added. So, if it's simply to add a way to check the hardware capability, how about adding the crc_device_get_capabilities
as CRC driver API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah splitting all of them isn't ideal, but don't really have other suggestions.
how about adding the
crc_device_get_capabilities
as CRC driver API?
You'd probably want to set these as bit flags, but you'd also run quickly out of available bits, maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah splitting all of them isn't ideal, but don't really have other suggestions.
Okay. If there is no better choice, let me follow your idea.
@henrikbrixandersen , @nashif , @kartben . Do you have any comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another option would be to do something similar to the hwinfo
driver subsystem, where only a single driver can implement a given CRC variant, and leave the SW handlers as __weak
?
Just spitballing here, this might not be considered a clean solution either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 90 out of 100 changed files in this pull request and generated no comments.
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
19ee23d
to
9a77e1f
Compare
9a77e1f
to
6af150c
Compare
Migrate support from crc library to new crc subsystem Add hardware acclerator backend for crc subsystem Signed-off-by: Duy Vo <[email protected]>
Add samples for CRC driver Signed-off-by: Duy Vo <[email protected]>
Add samples for CRC subsystem Signed-off-by: Duy Vo <[email protected]>
Add ztests for CRC driver Signed-off-by: Duy Vo <[email protected]>
Add ztests for CRC subsystem Signed-off-by: Duy Vo <[email protected]>
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 <[email protected]>
6af150c
to
578b46a
Compare
There was a problem hiding this 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
This PR is inherited from #74977 to add a CRC device driver with hardware accelerator. We'd like to introduce:
include/zephyr/drivers/crc.h
include/zephyr/sys/crc.h
The crc subsys implementation can be chosen as:
zephyr,crc
alias if it's defined