Skip to content

Commit a545e19

Browse files
khoa-nguyen-18kartben
authored andcommitted
tests: drivers: flash: Add support "common" for Renesas OSPI_B
Add support test app "flash/common" for testing Renesas RA OSPI_B on ek_ra8m1, ek_ra8d1 Signed-off-by: Khoa Nguyen <[email protected]>
1 parent c442fa1 commit a545e19

File tree

8 files changed

+52
-1
lines changed

8 files changed

+52
-1
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@
1818
};
1919
};
2020
};
21+
22+
&s28hl512t {
23+
status = "disabled";
24+
};
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright (c) 2025 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_TEST_DRIVER_FLASH_SIZE=67108864
Lines changed: 10 additions & 0 deletions
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+
/delete-node/ &storage_partition;
7+
8+
&s28hl512t {
9+
status = "okay";
10+
};

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@
1818
};
1919
};
2020
};
21+
22+
&s28hl512t {
23+
status = "disabled";
24+
};
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright (c) 2025 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_TEST_DRIVER_FLASH_SIZE=67108864
Lines changed: 10 additions & 0 deletions
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+
/delete-node/ &storage_partition;
7+
8+
&s28hl512t {
9+
status = "okay";
10+
};

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

Lines changed: 9 additions & 1 deletion
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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,10 @@ tests:
138138
filter: dt_compat_enabled("soc-nv-flash") and dt_compat_enabled("jedec,spi-nor")
139139
extra_args:
140140
- CONFIG_SPI_NOR=n
141+
drivers.flash.common.ra_ospi_b_nor:
142+
platform_allow:
143+
- ek_ra8m1
144+
- ek_ra8d1
145+
extra_args:
146+
- DTC_OVERLAY_FILE="./boards/${BOARD}_ospi_b_nor.overlay"
147+
- CONF_FILE="./prj.conf ./boards/${BOARD}_ospi_b_nor.conf"

0 commit comments

Comments
 (0)