Skip to content

Commit a8d4976

Browse files
Tri Nguyenkhoa-nguyen-18
Tri Nguyen
authored andcommitted
tests: drivers: flash: add ospi driver for RA8
Add test for ospi driver in RA8 boards Signed-off-by: Tri Nguyen <[email protected]> Signed-off-by: Thao Luong <[email protected]>
1 parent b2fdfd3 commit a8d4976

File tree

5 files changed

+37
-1
lines changed

5 files changed

+37
-1
lines changed

tests/drivers/flash/common/boards/ek_ra8d1.overlay

+6
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@
1818
};
1919
};
2020
};
21+
22+
&ospi0 {
23+
ospi-nor-flash@90000000 {
24+
status = "disabled";
25+
};
26+
};

tests/drivers/flash/common/boards/ek_ra8m1.overlay

+6
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@
1818
};
1919
};
2020
};
21+
22+
&ospi0 {
23+
ospi-nor-flash@90000000 {
24+
status = "disabled";
25+
};
26+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
* Copyright (c) 2025 Renesas Electronics Corporation
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
&ospi0 {
7+
ospi-nor-flash@90000000 {
8+
status = "okay";
9+
};
10+
};

tests/drivers/flash/common/src/main.c

+9-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
#if defined(CONFIG_NORDIC_QSPI_NOR)
1414
#define TEST_AREA_DEV_NODE DT_INST(0, nordic_qspi_nor)
15+
#elif defined(CONFIG_FLASH_RENESAS_RA_OSPI_B)
16+
#define TEST_AREA_DEV_NODE DT_INST(0, renesas_ra_ospi_b_nor)
1517
#elif defined(CONFIG_SPI_NOR)
1618
#define TEST_AREA_DEV_NODE DT_INST(0, jedec_spi_nor)
1719
#elif defined(CONFIG_FLASH_MSPI_NOR)
@@ -32,12 +34,18 @@
3234
#elif defined(TEST_AREA_DEV_NODE)
3335

3436
#define TEST_AREA_DEVICE DEVICE_DT_GET(TEST_AREA_DEV_NODE)
37+
#if defined CONFIG_FLASH_RENESAS_RA_OSPI_B
38+
#define TEST_AREA_OFFSET 0x40000
39+
#else
3540
#define TEST_AREA_OFFSET 0xff000
41+
#endif
3642

3743
#if DT_NODE_HAS_PROP(TEST_AREA_DEV_NODE, size_in_bytes)
3844
#define TEST_AREA_MAX DT_PROP(TEST_AREA_DEV_NODE, size_in_bytes)
39-
#else
45+
#elif DT_NODE_HAS_PROP(TEST_AREA_DEV_NODE, size)
4046
#define TEST_AREA_MAX (DT_PROP(TEST_AREA_DEV_NODE, size) / 8)
47+
#else
48+
#define TEST_AREA_MAX DT_REG_SIZE(TEST_AREA_DEV_NODE)
4149
#endif
4250

4351
#else

tests/drivers/flash/common/testcase.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,9 @@ tests:
116116
extra_configs:
117117
- CONFIG_DMA=y
118118
- CONFIG_SOC_FLASH_SILABS_S2_DMA_READ=y
119+
drivers.flash.common.ra8_ospi_nor:
120+
platform_allow:
121+
- ek_ra8m1
122+
- ek_ra8d1
123+
extra_args:
124+
- DTC_OVERLAY_FILE=socs/ra8_ospi_nor.overlay

0 commit comments

Comments
 (0)