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

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

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

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@1032651 zephyrproject-rtos/hal_renesas@31f1d1b (main) 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
Copy link
Contributor Author

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

@khoa-nguyen-18
Copy link
Contributor Author

Change the layout and modify the message of commits

Update hal_renesas commit ID for flash HP RA6, RA4 support

Signed-off-by: Khoa Nguyen <[email protected]>
@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?

Comment on lines 7 to 8
#include <stdbool.h>
#define LOG_LEVEL CONFIG_FLASH_LOG_LEVEL
#include <zephyr/logging/log.h>
Copy link
Collaborator

Choose a reason for hiding this comment

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

@khoa-nguyen-18 : Could you please separate between include and define?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, this include is redundant, I removed it

Comment on lines 11 to 25
block-32kb-linear-end:
type: int
required: true

block-32kb-dual-low-end:
type: int

block-32kb-dual-high-end:
type: int

reserved-area-num:
type: int
Copy link
Collaborator

Choose a reason for hiding this comment

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

@khoa-nguyen-18 : Could you please add description for these properties?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have just added the description for these properties, thank you. Can you please take a look?

#address-cells = <1>;
#size-cells = <1>;

/* Set the 2 last block of storage. */
Copy link
Collaborator

Choose a reason for hiding this comment

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

@khoa-nguyen-18 : Is it mistake? If it is correct, please check similar point.

- 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]>
- 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]>
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.

4 participants