-
Notifications
You must be signed in to change notification settings - Fork 8k
drivers: flash: Add support Renesas MRAM driver #96715
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: flash: Add support Renesas MRAM driver #96715
Conversation
The following west manifest projects have changed revision in this Pull Request:
✅ All manifest checks OK Note: This message is automatically posted and updated by the Manifest GitHub Action. |
01fc044
to
d7590f5
Compare
drivers/flash/Kconfig.renesas_ra
Outdated
select FLASH_HAS_NO_EXPLICIT_ERASE | ||
select USE_RA_FSP_MRAM | ||
help | ||
Enable Flash HP driver for RA series |
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.
It should be mram?
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.
My mistake, thank you for pointing this out. I've updated it
|
||
if (!size) { | ||
return 0; | ||
} |
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.
Move above line 114, if size = 0, no need to check the others
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.
I've updated it. Thank you
|
||
if (!len) { | ||
return 0; | ||
} |
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.
move above line 67
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.
Updated this also. Thank you
|
||
if (!len) { | ||
return 0; | ||
} |
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.
move above line 89
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.
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)}; \ |
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.
.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
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.
Sure, thank you. I've updated
d7590f5
to
bffea20
Compare
@@ -0,0 +1,232 @@ | |||
/* | |||
* Copyright (c) 2024-2025 Renesas Electronics Corporation |
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.
* Copyright (c) 2024-2025 Renesas Electronics Corporation | |
* Copyright (c) 2025 Renesas Electronics Corporation |
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.
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), |
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.
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?
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.
Good point. My mistake for not considering this case. I've updated it to add a mutex lock. Thank you
bffea20
to
7695d77
Compare
7695d77
to
74badae
Compare
|
74badae
to
c6ed31b
Compare
Since we plan to support MCUBoot on RA8P1 and RA8T2, and it depends on this MRAM PR being merged. |
.erase_value = 0xff, \ | ||
}, \ |
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.
.erase_value = 0xff, \ | |
}, \ | |
.erase_value = 0xff, \ | |
.caps = { | |
.no_explicit_erase = true, | |
}, | |
}, \ |
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.
thank you, I've updated it
c6ed31b
to
bbfe396
Compare
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]>
bbfe396
to
8df36ad
Compare
|
ek_ra8p1
andmck_ra8t2
flash/common
to test MRAM onek_ra8p1
andmck_ra8t2
ek_ra8p1
andmck_ra8t2
insamples/subsys/ipc