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 Flash HP driver for Renesas RA6, RA4 devices #79858

Conversation

khoa-nguyen-18
Copy link
Contributor

@khoa-nguyen-18 khoa-nguyen-18 commented Oct 15, 2024

Add support for Flash HP driver for RA6, RA4 devices

  • Add Flash HP driver support on EK_RA6E2, EK_RA6M1, EK_RA6M2, EK_RA6M3, EK_RA6M4, EK_RA6M5, FPB_RA6E1, FPB_RA6E2, EK_RA4E2, EK_RA4M2, EK_RA4M3
  • Move Flash RA8 HW depend macro in flash_hp_ra.h to device tree configuration
  • Change to use irq_lock instead of seemaphore for code flash
  • Modify and add conditions to check, erase and write at the last block
  • Remove the .code_in_ram section in the linker file of all boards supported

Copy link

Hello @khoa-nguyen-18, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

@zephyrbot
Copy link
Collaborator

zephyrbot commented Oct 15, 2024

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

Name Old Revision New Revision Diff
hal_renesas zephyrproject-rtos/hal_renesas@3a8466b zephyrproject-rtos/hal_renesas@64fce2e zephyrproject-rtos/[email protected]

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 This PR should not be merged (Do Not Merge) labels Oct 15, 2024
@khoa-nguyen-18 khoa-nguyen-18 marked this pull request as ready for review October 16, 2024 00:53
@zephyrbot zephyrbot added area: Flash platform: Renesas RA Renesas Electronics Corporation, RA labels Oct 16, 2024
@khoa-nguyen-18 khoa-nguyen-18 force-pushed the support_renesas_ra6_flash_hp branch 2 times, most recently from 769ca3c to 1ba5766 Compare October 21, 2024 01:29
@khoa-nguyen-18 khoa-nguyen-18 changed the title Support Flash HP driver for Renesas RA6 devices Support Flash HP driver for Renesas RA6, RA4 devices Oct 21, 2024
@khoa-nguyen-18 khoa-nguyen-18 force-pushed the support_renesas_ra6_flash_hp branch from 1ba5766 to b5674f0 Compare October 24, 2024 04:36
@khoa-nguyen-18 khoa-nguyen-18 force-pushed the support_renesas_ra6_flash_hp branch from b5674f0 to f75cc59 Compare November 8, 2024 05:00
@zephyrbot zephyrbot requested a review from rghaddab November 8, 2024 05:01
@khoa-nguyen-18
Copy link
Contributor Author

  • Rebase main to solve the conflicts
  • Add missing doc for flash for RA4E2, RA4M2, RA4M3

@khoa-nguyen-18 khoa-nguyen-18 force-pushed the support_renesas_ra6_flash_hp branch from f75cc59 to 29a4f8e Compare November 19, 2024 09:46
@khoa-nguyen-18
Copy link
Contributor Author

Change the layout and modify the message of commits

@khoa-nguyen-18 khoa-nguyen-18 force-pushed the support_renesas_ra6_flash_hp branch 2 times, most recently from 7854ca9 to 636e146 Compare November 25, 2024 11:14
@zephyrbot zephyrbot removed the DNM This PR should not be merged (Do Not Merge) label Nov 25, 2024
@khoa-nguyen-18
Copy link
Contributor Author

I just rebased main to solve conflicts and updated the revision for hal_renesas in manifest commit. @KhiemNguyenT @soburi @de-nordic can you please take a look?

@khoa-nguyen-18 khoa-nguyen-18 force-pushed the support_renesas_ra6_flash_hp branch from 636e146 to 3018d5b Compare November 29, 2024 08:48
@khoa-nguyen-18
Copy link
Contributor Author

Hi, @de-nordic, @KhiemNguyenT, @soburi, @thaoluonguw, @duynguyenxa Can you please take a look at this Flash PR?

KhiemNguyenT
KhiemNguyenT previously approved these changes Dec 25, 2024
drivers/flash/flash_hp_ra.c Outdated Show resolved Hide resolved
drivers/flash/flash_hp_ra.c Outdated Show resolved Hide resolved
@khoa-nguyen-18 khoa-nguyen-18 force-pushed the support_renesas_ra6_flash_hp branch from 10c3f19 to 62bfb21 Compare December 27, 2024 01:31
@zephyrbot zephyrbot added manifest manifest-hal_renesas DNM This PR should not be merged (Do Not Merge) labels Dec 27, 2024
@khoa-nguyen-18
Copy link
Contributor Author

khoa-nguyen-18 commented Dec 27, 2024

  • Add conditions to check for overflow when summing 2 variables
  • Add a commit to remove the .code_in_ram section of all devices using flash-hp
  • Add a manifest commit to modify the revision of hal_renesas

@khoa-nguyen-18 khoa-nguyen-18 force-pushed the support_renesas_ra6_flash_hp branch from 62bfb21 to 23e5728 Compare December 27, 2024 01:39
@khoa-nguyen-18
Copy link
Contributor Author

Rebase main to solve conflicts

@khoa-nguyen-18 khoa-nguyen-18 force-pushed the support_renesas_ra6_flash_hp branch from 23e5728 to 988105e Compare December 27, 2024 03:07
@zephyrbot zephyrbot removed the DNM This PR should not be merged (Do Not Merge) label Dec 27, 2024
@khoa-nguyen-18 khoa-nguyen-18 force-pushed the support_renesas_ra6_flash_hp branch from 988105e to 3607785 Compare December 27, 2024 09:43
@khoa-nguyen-18
Copy link
Contributor Author

Add support flash_get_size api

Update hal_renesas to support flash hp on RA

Signed-off-by: Khoa Nguyen <[email protected]>
- Bring macro defined of RA8 in flash_hp_ra.h to device tree
- Change to use irq_lock instead of semaphore for code flash
- Modify and add conditions to check and make decision to perform
action at last block.

Signed-off-by: Khoa Nguyen <[email protected]>
Signed-off-by: Tran Van Quy <[email protected]>
Remove code_in_ram section which is defined in sections.ld
of ra8m1, ra8d1, ra8t1, ra6m5, ra6m4, ra6m3, ra6m2, ra6m1,
ra6e2, ra6e1, ra4m3, ra4m2, ra4e2

Signed-off-by: Khoa Nguyen <[email protected]>
- Add Flash HP support for ra6-cm4, ra6-cm33, ra4-cm33 (except
r7fa4w1ad2cng)
- Add config to set the minimal size of data which can be written
for RA4E2, RA4M2, RA4M3, RA6E1, RA6E2, RA6M1, RA6M2, RA6M3, RA6M4,
RA6M5

Signed-off-by: Khoa Nguyen <[email protected]>
Signed-off-by: Phi Tran <[email protected]>
- Add Flash HP support for ek_ra6m1, ek_ra6m2, ek_ra6m3, ek_ra6m4,
ek_ra6m5, ek_ra6e2, fpb_ra6e1, fpb_ra6e2, ek_ra4e2, ek_ra4m2,
ek_ra4m3
- Add doc about Flash for these boards

Signed-off-by: Khoa Nguyen <[email protected]>
Signed-off-by: Phi Tran <[email protected]>
Add overlay to support test flash/commone for: ek_ra6m1,
ek_ra6m2, ek_ra6m3, ek_ra6m4, ek_ra6m5, ek_ra6e2, fpb_ra6e1,
fpb_ra6e2, ek_ra4m2, ek_ra4m3, ek_ra4e2

Signed-off-by: Khoa Nguyen <[email protected]>
Signed-off-by: Phi Tran <[email protected]>
@khoa-nguyen-18 khoa-nguyen-18 force-pushed the support_renesas_ra6_flash_hp branch from 3607785 to 2cc5907 Compare December 27, 2024 10:28
@KhiemNguyenT KhiemNguyenT self-requested a review December 30, 2024 08:06
@khoa-nguyen-18
Copy link
Contributor Author

@de-nordic can you please have a look at this PR?

@de-nordic de-nordic added this to the v4.1.0 milestone Jan 8, 2025
@henrikbrixandersen henrikbrixandersen merged commit 5acf8a2 into zephyrproject-rtos:main Jan 8, 2025
36 checks passed
@khoa-nguyen-18 khoa-nguyen-18 deleted the support_renesas_ra6_flash_hp branch January 9, 2025 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants