Skip to content

Conversation

@thaoluonguw
Copy link
Contributor

Add support for ospi driver running on Renesas RA8 (RA8M1 and RA8D1)

  • boards: renesas: Add support for ospi on ek_ra8m1 and ek_ra8d1
  • drivers: flash: Add support for ospi_b driver
  • dts: arm: Add support for ospi
  • dts: bindings: Add support for ospi_b
  • tests: drivers: flash: common: Add support for ospi.
  • samples: drivers: jesd216: Add support for ospi
  • samples: drivers: spi_flash: Add support for ospi

Note: This PR requires #79766 is merged

@zephyrbot
Copy link

zephyrbot commented Nov 3, 2024

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.

@zephyrbot zephyrbot added manifest manifest-hal_renesas DNM This PR should not be merged (Do Not Merge) labels Nov 3, 2024
@quytranpzz quytranpzz force-pushed the support_renesas_ra8_ospi branch from 8f49aa6 to ae8e589 Compare November 29, 2024 03:55
@thaoluonguw thaoluonguw marked this pull request as ready for review November 30, 2024 06:13
@zephyrbot zephyrbot added area: Flash platform: Renesas RA Renesas Electronics Corporation, RA area: Samples Samples labels Nov 30, 2024
@quytranpzz quytranpzz force-pushed the support_renesas_ra8_ospi branch from ae8e589 to a585f29 Compare December 6, 2024 09:26
@zephyrbot zephyrbot removed manifest manifest-hal_renesas DNM This PR should not be merged (Do Not Merge) labels Dec 6, 2024
@thaoluonguw thaoluonguw force-pushed the support_renesas_ra8_ospi branch from a585f29 to 7d172b6 Compare January 6, 2025 13:50
@thaoluonguw
Copy link
Contributor Author

Rebase with main to solve conflicts.

@thaoluonguw
Copy link
Contributor Author

Hello @GeorgeCGV : Could you please help us review again? Thank you so much.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for the Renesas RA8 OSPI driver across several areas including test configurations, device tree bindings, driver implementation, board support files, and Kconfig updates. Key changes include:

  • Adding and updating overlay and configuration files for ek_ra8m1 and ek_ra8d1 boards to support the new OSPI driver.
  • Introducing driver and binding files (including new opcodes and transfer structures) for the Renesas RA OSPI NOR flash.
  • Updating Kconfig and CMakeLists.txt to integrate the new driver into the build system.

Reviewed Changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/drivers/flash/common/boards/ek_ra8[d1/m1]ospi_b* Added configuration files and overlays for OSPI NOR flash testing on RA8 boards
samples/drivers/spi_flash/src/main.c & samples/drivers/jesd216/src/main.c Updated samples to recognize the new Renesas RA OSPI NOR flash driver
modules/Kconfig.renesas & drivers/flash/Kconfig.renesas_ra_ospi Added Kconfig entries for the new OSPI driver integration
dts/bindings/* Added new bindings files for OSPI and Flash Controller specific to Renesas RA devices
drivers/flash/spi_nor.h & drivers/flash/flash_renesas_ra_ospi_b.h Introduced opcodes and transfer definitions for the S28Hx512T flash and OSPI transactions
boards/renesas/ek_ra8[m1/d1]/*.dts and pinctrl files Updated board files to enable and configure the new OSPI NOR flash device

@KhiemNguyenT KhiemNguyenT self-requested a review May 13, 2025 01:33
KhiemNguyenT
KhiemNguyenT previously approved these changes May 13, 2025
Copy link

@KhiemNguyenT KhiemNguyenT left a comment

Choose a reason for hiding this comment

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

LGTM

@KhiemNguyenT KhiemNguyenT added this to the v4.2.0 milestone May 13, 2025
@khoa-nguyen-18
Copy link
Contributor

hi @de-nordic, could you please revisit this PR?

Comment on lines 64 to 69
#define SPI_NOR_CMD_WR_WRARG 0x71 /* Write Any Register for S28Hx512T */
#define SPI_NOR_CMD_RSFDPID 0x5A /* Read SFDP ID for S28Hx512T */
#define SPI_NOR_CMD_RREG 0x65 /* Read Any Register for S28Hx512T */
#define SPI_NOR_CMD_SE_256KB 0xDC /* Sector Erase 256KB for S28Hx512T */
#define SPI_NOR_CMD_ERCHP 0x60 /* Erase Chip for S28Hx512T */

Copy link
Contributor

Choose a reason for hiding this comment

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

No. it fit his is S28Hx512T specific, it does not land here. Get your own header for that. Specifically that nothing of this is used in spi_nor.c

Copy link
Contributor

Choose a reason for hiding this comment

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

thank you, I have separated it to another header

Comment on lines 85 to 97
#define SPI_NOR_OCMD_WEN 0x0606 /* Octal Write enable for S28Hx512T */
#define SPI_NOR_OCMD_RSR 0x0505 /* Octal Read status register for S28Hx512T */
#define SPI_NOR_OCMD_WR_REG2 0x7171 /* Octal Write config register 2 for S28Hx512T */
#define SPI_NOR_OCMD_RDID 0x9F9F /* Octal Read JEDEC ID for S28Hx512T */
#define SPI_NOR_OCMD_RSFDPID 0x5A5A /* Octal Read SFDP ID for S28Hx512T */
#define SPI_NOR_OCMD_RREG 0x6565 /* Octal Read Any Register for S28Hx512T */
#define SPI_NOR_OCMD_PP_4B 0x1212 /* Octal Page Program 4 Byte Address for S28Hx512T */
#define SPI_NOR_OCMD_READ 0xEEEE /* Octal Read data for S28Hx512T */
#define SPI_NOR_OCMD_RST_EN 0x6666 /* Octal Reset Enable for S28Hx512T */
#define SPI_NOR_OCMD_RST_MEM 0x9999 /* Reset Memory for S28Hx512T */
#define SPI_NOR_OCMD_SE_4KB 0x2121 /* Octal Sector Erase 4Kb address for S28Hx512T */
#define SPI_NOR_OCMD_SE_256KB 0xDCDC /* Octal Sector Erase 256Kb address for S28Hx512T */
#define SPI_NOR_OCMD_ERCHP 0x6060 /* Octal Erase Chip for S28Hx512T */
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here.

Copy link
Contributor

Choose a reason for hiding this comment

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

fixed, thank you

@khoa-nguyen-18 khoa-nguyen-18 dismissed stale reviews from KhiemNguyenT and thenguyenyf via 5ea0da0 May 21, 2025 04:38
@khoa-nguyen-18 khoa-nguyen-18 force-pushed the support_renesas_ra8_ospi branch 2 times, most recently from 5ea0da0 to bbc2dd5 Compare May 21, 2025 09:31
Tri Nguyen and others added 6 commits May 21, 2025 16:39
Support OSPI flash driver on EK-RA8M1 and EK-RA8D1 with ospi_b
and S28HL512T flash.

Signed-off-by: Tri Nguyen <[email protected]>
Signed-off-by: Thao Luong <[email protected]>
Add ospi node on Renesas RA8 devicetree to support QSPI flash driver

Signed-off-by: Quy Tran <[email protected]>
Add support for OSPI flash driver on EK-RA8D1 and EK-RA8M1

Signed-off-by: Quy Tran <[email protected]>
Add support test app "flash/common" for testing Renesas RA
OSPI_B on ek_ra8m1, ek_ra8d1

Signed-off-by: Khoa Nguyen <[email protected]>
Add support OSPI for Renesas ek_ra8m1, ek_ra8d1 to run
sample jesd216

Signed-off-by: Khoa Nguyen <[email protected]>
Signed-off-by: Tri Nguyen <[email protected]>
Signed-off-by: Thao Luong <[email protected]>
Add support OSPI for Renesas ek_ra8m1, ek_ra8d1 to run sample
spi_flash

Signed-off-by: Khoa Nguyen <[email protected]>
Signed-off-by: Tri Nguyen <[email protected]>
Signed-off-by: Thao Luong <[email protected]>
@khoa-nguyen-18 khoa-nguyen-18 force-pushed the support_renesas_ra8_ospi branch from bbc2dd5 to 8fdb94d Compare May 21, 2025 09:39
@sonarqubecloud
Copy link

@khoa-nguyen-18
Copy link
Contributor

hi @de-nordic, could you please confirm your requested change?

@de-nordic de-nordic assigned KhiemNguyenT and unassigned de-nordic Jun 5, 2025
@de-nordic
Copy link
Contributor

hi @de-nordic, could you please confirm your requested change?

I re-assigning the PR to @KhiemNguyenT as Renesas representative.

@KhiemNguyenT KhiemNguyenT self-requested a review June 5, 2025 10:37
Copy link

@KhiemNguyenT KhiemNguyenT left a comment

Choose a reason for hiding this comment

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

Thank you. LGTM.

@kartben kartben merged commit a3868c9 into zephyrproject-rtos:main Jun 6, 2025
28 checks passed
@khoa-nguyen-18 khoa-nguyen-18 deleted the support_renesas_ra8_ospi branch July 7, 2025 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Flash area: Samples Samples platform: Renesas RA Renesas Electronics Corporation, RA

Projects

None yet

Development

Successfully merging this pull request may close these issues.