Skip to content

Conversation

khoa-nguyen-18
Copy link
Contributor

@khoa-nguyen-18 khoa-nguyen-18 commented Sep 29, 2025

  • Add support Renesas MRAM driver for RA devices
  • Enable MRAM node on Renesas ek_ra8p1 and mck_ra8t2
  • Move the MRAM and SRAM resources defination to SoC DTS layer
  • Add support test app flash/common to test MRAM on ek_ra8p1 and mck_ra8t2
  • Update SRAM lable for ek_ra8p1 and mck_ra8t2 in samples/subsys/ipc

Copy link

github-actions bot commented Sep 29, 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.

select FLASH_HAS_NO_EXPLICIT_ERASE
select USE_RA_FSP_MRAM
help
Enable Flash HP driver for RA series
Copy link
Contributor

Choose a reason for hiding this comment

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

It should be mram?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My mistake, thank you for pointing this out. I've updated it


if (!size) {
return 0;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Move above line 114, if size = 0, no need to check the others

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've updated it. Thank you


if (!len) {
return 0;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

move above line 67

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated this also. Thank you


if (!len) {
return 0;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

move above line 89

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've updated it. Thank you


#define MRAM_RENESAS_RA_INIT(index) \
static struct mram_renesas_ra_data mram_renesas_ra_data_##index = { \
.area_address = DT_REG_ADDR(index), .area_size = DT_REG_SIZE(index)}; \
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.area_address = DT_REG_ADDR(index), .area_size = DT_REG_SIZE(index)}; \
.area_address = DT_REG_ADDR(index), .area_size = DT_REG_SIZE(index),}; \

Just to make it easier to read when running clang-format

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, thank you. I've updated

@zephyrbot zephyrbot added area: Open AMP area: Samples Samples area: IPC Inter-Process Communication labels Sep 30, 2025
@@ -0,0 +1,232 @@
/*
* Copyright (c) 2024-2025 Renesas Electronics Corporation
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Copyright (c) 2024-2025 Renesas Electronics Corporation
* Copyright (c) 2025 Renesas Electronics Corporation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you, my mistake. I've updated it

return -EINVAL;
}

err = R_MRAM_Write(ctrl_data, (uint32_t)data, (uint32_t)(offset + mram_data->area_address),
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this driver uses FLASH_HAS_NO_EXPLICIT_ERASE, it doesn't require an erase operation before writing data, and data can be overwritten. Should we add mutex here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. My mistake for not considering this case. I've updated it to add a mutex lock. Thank you

@khoa-nguyen-18 khoa-nguyen-18 force-pushed the support_renesas_ra_mram branch from bffea20 to 7695d77 Compare October 3, 2025 09:29
@github-actions github-actions bot removed the DNM (manifest) This PR should not be merged (controlled by action-manifest) label Oct 3, 2025
@khoa-nguyen-18 khoa-nguyen-18 added this to the v4.3.0 milestone Oct 7, 2025
@khoa-nguyen-18
Copy link
Contributor Author

  • Rebase to solve the conflicts
  • Updated based on review feedback

@khoa-nguyen-18
Copy link
Contributor Author

Since we plan to support MCUBoot on RA8P1 and RA8T2, and it depends on this MRAM PR being merged.
I’d really appreciate it if @de-nordic, @thenguyenyf, and @quytranpzz could help push this PR forward quickly.

Comment on lines 237 to 242
.erase_value = 0xff, \
}, \
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.erase_value = 0xff, \
}, \
.erase_value = 0xff, \
.caps = {
.no_explicit_erase = true,
},
}, \

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thank you, I've updated it

@khoa-nguyen-18 khoa-nguyen-18 force-pushed the support_renesas_ra_mram branch from c6ed31b to bbfe396 Compare October 13, 2025 10:19
Add support Renesas MRAM driver for RA devices

Signed-off-by: Khoa Nguyen <[email protected]>
- Add support MRAM node on Renesas SoC dts layer for RA8P1, RA8T2
- Move the MRAM and SRAM resource defination to SoC dts layer

Signed-off-by: Khoa Nguyen <[email protected]>
Update zephyr,flash to MRAM label for ek_ra8p1 and mck_ra8t2

Signed-off-by: Khoa Nguyen <[email protected]>
Add support test app `flash/common` to test MRAM on
Renesas ek_ra8p1, mck_ra8t2

Signed-off-by: Khoa Nguyen <[email protected]>
Update sram label for Renesas devices

Signed-off-by: Khoa Nguyen <[email protected]>
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Boards/SoCs area: Devicetree Bindings area: Flash area: IPC Inter-Process Communication area: Open AMP area: Samples Samples area: Tests Issues related to a particular existing or missing test platform: Renesas RA Renesas Electronics Corporation, RA platform: Renesas Renesas

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants