-
Notifications
You must be signed in to change notification settings - Fork 7.2k
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
Add support ospi driver for Renesas RA8 devices #80799
base: main
Are you sure you want to change the base?
Add support ospi driver for Renesas RA8 devices #80799
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. |
8f49aa6
to
ae8e589
Compare
ae8e589
to
a585f29
Compare
a585f29
to
7d172b6
Compare
Rebase with main to solve conflicts. |
Hello @GeorgeCGV : Could you please help us review again? Thank you so much. |
@khoa-nguyen-18 please avoid extensive reformatting of |
Support OSPI flash driver on EK-RA8M1 and EK-RA8D1 with ospi_b and S28HL512T flash. Signed-off-by: Tri Nguyen <tri.nguyen.wj@bp.renesas.com> Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
5d1aa9e
to
a4db958
Compare
rebase main to solve conflicts |
I understand. I will remove the formatting for the entire file and only format our additions |
Add additional define macro and reformat spi_nor.h Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
Add ospi node on Renesas RA8 devicetree to support QSPI flash driver Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
a4db958
to
b3ba2a9
Compare
Add support for OSPI flash driver on EK-RA8D1 and EK-RA8M1 Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
Remove conf file to not test get_size case for flash and qspi on test app flash/common for all Renesas boards. Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
Add test for ospi driver in RA8 boards Signed-off-by: Tri Nguyen <tri.nguyen.wj@bp.renesas.com> Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
Add support OSPI for Renesas ek_ra8m1, ek_ra8d1 to run sample jesd216 Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com> Signed-off-by: Tri Nguyen <tri.nguyen.wj@bp.renesas.com> Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
Add support OSPI for Renesas ek_ra8m1, ek_ra8d1 to run sample spi_flash Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com> Signed-off-by: Tri Nguyen <tri.nguyen.wj@bp.renesas.com> Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
4b87e5c
to
896904e
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.
Copilot reviewed 23 out of 37 changed files in this pull request and generated no comments.
Files not reviewed (14)
- boards/renesas/ek_ra8d1/ek_ra8d1-pinctrl.dtsi: Language not supported
- boards/renesas/ek_ra8d1/ek_ra8d1.dts: Language not supported
- boards/renesas/ek_ra8m1/ek_ra8m1-pinctrl.dtsi: Language not supported
- boards/renesas/ek_ra8m1/ek_ra8m1.dts: Language not supported
- drivers/flash/CMakeLists.txt: Language not supported
- drivers/flash/Kconfig: Language not supported
- drivers/flash/Kconfig.renesas_ra_ospi: Language not supported
- dts/arm/renesas/ra/ra8/ra8x1.dtsi: Language not supported
- modules/Kconfig.renesas_fsp: Language not supported
- tests/drivers/flash/common/boards/ek_ra4e2.conf: Language not supported
- tests/drivers/flash/common/boards/ek_ra4m2.conf: Language not supported
- tests/drivers/flash/common/boards/ek_ra4m3.conf: Language not supported
- tests/drivers/flash/common/boards/ek_ra6e2.conf: Language not supported
- tests/drivers/flash/common/boards/ek_ra6m1.conf: Language not supported
Comments suppressed due to low confidence (2)
samples/drivers/spi_flash/src/main.c:68
- Please verify that the test’s expected data for CONFIG_FLASH_RENESAS_RA_OSPI_B accurately reflects the device’s actual flash memory behavior to avoid false negatives during testing.
const uint8_t expected[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07};
drivers/flash/flash_renesas_ra_ospi_b.h:72
- [nitpick] Consider declaring erase_command_list as a const array if these command definitions are not expected to change at runtime, to enforce immutability.
static spi_flash_erase_command_t erase_command_list[] = {
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.
LGTM!
if (data != NULL) { | ||
p_src = data; | ||
} else { | ||
return -EINVAL; | ||
} |
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.
Why not directly use data
and get rid of the p_src
?
LOG_ERR("address or size exceeds expected values: " | ||
"addr 0x%lx, size %zu", | ||
(long)offset, len); |
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.
That is probably for vendor to decided, but I would put here LOG_DBG. Reason is that the message takes space, and chances that this will be logged, on well tested platform, is really low, which means that the log is only important for debugging the issue and it does not actually log any fault, from the perspective of hardware, that has randomly occurred during run-time, rather problem with software that used the device.
&ospi_b_data->ospi_b_ctrl, p_src, | ||
(uint8_t *)(BSP_FEATURE_OSPI_B_DEVICE_1_START_ADDRESS + offset), size); | ||
if (err != FSP_SUCCESS) { | ||
err = -EIO; |
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.
Here you may consider LOG_DBG, again decision on vendor, but in here you have two places that return -EIO
from different calls, so after user gets -EIO
, it is not known which operation failed.
if (err != FSP_SUCCESS) { | ||
return err; | ||
} |
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.
Don't you want to do LOG_DBG
on each of these returns?
Add support for ospi driver running on Renesas RA8 (RA8M1 and RA8D1)
Note: This PR requires #79766 is merged