Commit Graph

28 Commits

Author SHA1 Message Date
Andrzej Głąbek
65976137dc boards: nrf: Activate pull-up on QSPI CSN line in "sleep" state
When there is no external pull-up on the CSN line and the line
is put into the low-power mode (input direction and disconnected
buffer), after some time its level falls to low and some flash
chips, like for example MX25R64, exit the Deep Power-down mode
when that happens. To prevent this, activate the GPIO internal
pull-up for this line in boards that do not have the external
pull-up on it.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-08-10 16:08:23 +02:00
Fabio Baltieri
def230187b test: fix more legacy #include paths
Add a bunch of missing "zephyr/" prefixes to #include statements in
various test and test framework files.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-08-02 16:41:41 +01:00
Fabio Baltieri
969a361366 test: flash: fix nrf52840dk_mx25l51245g test variant
The SPI flash were recently changed to use an alias to identify the
flash chip in:

64fbbd9a44 boards: Add alias to boards with spi-flash node

This caused some CI test failure for the nrf52840dk test with the
nrf52840dk_mx25l51245g overlay, as it changes the flash nodelabel of the
board dts file. Adding the correct alias to the overlay file to point to
the correct one.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-07-23 12:50:30 +09:00
Kumar Gala
b97a9ee21c tests: drivers: Remove label property from devicetree overlays
"label" properties are not required.  Remove them from tests.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-22 16:44:08 +00:00
Chay Guo
a4c9e13ea8 boards: arm: Enable flash for storage on mimxrt595_evk
- The MX25UM51345G flash is connected to FLEXSPI PortA for
  mimxrt595_evk.
- Updated flexspi_mx25um51345g driver to support DTR OPI mode.
- Tested with tests/drivers/flash.

Signed-off-by: Chay Guo <changyi.guo@nxp.com>
2022-06-13 12:10:57 +02:00
Gerard Marull-Paretas
ade7ccb918 tests: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all tests to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 20:02:14 +02:00
Gerard Marull-Paretas
a5a768ec0f tests: drivers: flash: use DEVICE_DT_GET
Obtain the flash device at compile time using DEVICE_DT_GET.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-31 13:55:10 +02:00
Andrzej Puzdrowski
37644f83e3 tests/drivers/flash: fix TEST_AREA_MAX
There was mistake in parentheses application in
the expression which calculates the value.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-03-24 10:14:26 +01:00
Andrzej Puzdrowski
6d57cbaef1 tests/drivers/flash: fix TEST_AREA_MAX calculation
The `size` property is expressed in `bits` unit.
The value should be calculated as bits to bytes conversion.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-03-23 15:05:24 -04:00
Andrzej Puzdrowski
be3186d39c tests/drivers/flash: fix testcase.yaml
Fixed indentation which cause the testcase.yaml
parsing failure.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-03-23 12:19:52 -04:00
Andrzej Puzdrowski
b5b05bc9b1 tests/driver/flash: overlay for MX25L51245G
Added overlay with DTS of MX25L51245G qspi flash
memory. DTS configures qspi clock to 2 MHz which is supported
by nRF52840.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-03-23 16:02:49 +01:00
Håkon Øye Amundsen
7aeef175e8 dts: nrf_qspi_nor: add option for specifying size in bytes
If a user has a 1GB external flash it is currently not possible
to configure this through DTS. To allow for such a configuration
we add an option which specifies the size in bytes not bits.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2022-03-23 12:48:08 +01:00
Nazar Kazakov
f483b1bc4c everywhere: fix typos
Fix a lot of typos

Signed-off-by: Nazar Kazakov <nazar.kazakov.work@gmail.com>
2022-03-18 13:24:08 -04:00
Hake Huang
f5864b50ff test: flash: add rt685 support for flash driver test
enable flash test for rt685

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2022-03-07 09:46:26 -06:00
Fu Haolei
7c690b943f twister: yaml: run flash test on it8xxx2_evb board
Add it8xxx2_evb board to flash test platform_allow, so twister
won't skip it.

Signed-off-by: Fu Haolei <haolei.fu@intel.com>
2022-03-02 08:53:30 -05:00
Francois Ramu
2b8df6b160 tests: drivers: flash running on disco stm32 board with qspi
Restore the testcase to run on the qspi nor-flash controller
of the disco_l475_iot1 board
of the disco stm32f746 board

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-02-08 07:03:12 -05:00
Anas Nashif
05ecd46a84 tests: fix typos and misnamed platforms
Various obsolote and misnamed platfomrs in test filters theat went
undetected for a while.

Fixes #41222

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-12-17 12:24:37 -05:00
Thomas Stranger
9e852644a8 tests: drivers: flash: change integration_platforms
drivers.flash.nrf_qspi_nor and drivers.flash.soc_flash_nrf:
keep nrf52840dk_nrf52840 as integration_platform

drivers.flash.default:
Use mimxrt1060_evk instead as integration_platform,
this is the only platform allowed.

drivers.flash.stm32:
Add a bunch of boards as integration_platforms for
this test configuration.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2021-11-17 11:06:59 -05:00
Torsten Rasmussen
1cccc8a8fe cmake: increase minimal required version to 3.20.0
Move to CMake 3.20.0.

At the Toolchain WG it was decided to move to CMake 3.20.0.

The main reason for increasing CMake version is better toolchain
support.

Better toolchain support is added in the following CMake versions:
- armclang, CMake 3.15
- Intel oneAPI, CMake 3.20
- IAR, CMake 3.15 and 3.20

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-08-20 09:47:34 +02:00
Krishna Mohan Dani
f4310dd22c tests/drivers: disco_l475_iot1: Enabling soc-flash support in overlays.
This commit enables soc-flash support in disco_l475_iot1
only for flash test. Using overlays, it adds soc-flash storage
partition and deletes qspi-flash storage parition for
flash test. Both flash test and spi_flash application
has been tested on disco_l475_iot1 platform.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-06-22 08:21:21 -04:00
Krishna Mohan Dani
cca1f3a45b tests/drivers: stm32f746g_disco: Enabling soc-flash support in overlays
This commit enables soc-flash support in stm32f746g_disco only for
flash test. Using overlays, it adds soc-flash storage partition and
deletes qspi-flash storage partition for flash test. Both flash test and
spi_flash application has been tested on stm32f746g_disco platform.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-06-22 08:20:32 -04:00
Erwan Gouriou
3e1443ccf9 scripts/pylib: expr_parser.py: Review dt_compat_enabled_with_label
Function used for filtering "dt_compat_enabled_with_label" was not
working as expected as it was not taking into account that we're
looking for a children/parent combination:
Provided "compat" with enabled status should be the one of the parent
of the node matching given label.

Function is then reworked to take this into account.
And to make it's usage clear:
- function name is changed to be clearer on the intention
- args order is reversed to be more logical wrt the intention

Users of the function are also updated to take the change into
account.

Fixes #36093

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-06-21 20:31:49 -04:00
Krishna Mohan Dani
eb20304c5c drivers/flash: STM32: A generic change and enabling flash support.
This commit makes the flash test generic. The flast test will
look for storage partition in the soc-flash for testing.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-06-07 12:03:43 +02:00
Hake Huang
437a5b6028 tests: flash: Enable flash driver and file system tests on mimxrt1060_evk
now the XIP feature can work in NXP RT series boards
so enable below cases on mimxrt1060_evk with XIP
tests/kernel/xip
tests/drivers/flash
tests/subsys/fs/littlefs
samples/shell/fs
samples/subsys/fs/littlefs

for tests/subsys/fs/littlefs:
need add --erase to erase the nor flash if you are using below partition
e.g. west flash --runner=pyocd --erase
&is25wp064 {
        partitions {
                compatible = "fixed-partitions";
                #address-cells = <1>;
                #size-cells = <1>;

                partition@310000 {
                        label = "large";
                        reg = <0x00310000 DT_SIZE_M(3)>;
                };
                partition@610000 {
                        label = "image-scratch";
                        reg = <0x00610000 DT_SIZE_K(128)>;
                };
                partition@630000 {
                        label = "small";
                        reg = <0x00630000 DT_SIZE_K(64)>;
                };
                partition@640000 {
                        label = "medium";
                        reg = <0x00640000 DT_SIZE_K(960)>;
                };
        };
};

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-05-18 11:19:15 -05:00
Andrzej Puzdrowski
0fae54df5f tests/drivers/flash: allow CI using nrf52840dk_nrf52840
Added integration_platforms with nrf52840dk_nrf52840.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-03-29 13:43:55 -04:00
Tomasz Bursztyka
e18fcbba5a device: Const-ify all device driver instance pointers
Now that device_api attribute is unmodified at runtime, as well as all
the other attributes, it is possible to switch all device driver
instance to be constant.

A coccinelle rule is used for this:

@r_const_dev_1
  disable optional_qualifier
@
@@
-struct device *
+const struct device *

@r_const_dev_2
 disable optional_qualifier
@
@@
-struct device * const
+const struct device *

Fixes #27399

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-09-02 13:48:13 +02:00
Anas Nashif
dca317c730 sanitycheck: inclusive language
change whitelist -> allow.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-08-27 07:04:07 -04:00
Mateusz Syc
47bb6a3fdf tests: drivers: flash: added flash tests
Test include non-aligned read in nrf_qspi_nor flash and
SoC flash memory to buffer with variable size.
It checks all possible variants of alignment and size.

Signed-off-by: Mateusz Syc <Mateusz.Syc@nordicsemi.no>
2020-07-20 12:46:38 +02:00