From f764763f005c20a534a7f52663c48c6b7cc5cd3c Mon Sep 17 00:00:00 2001 From: Parthiban Nallathambi Date: Mon, 12 Feb 2024 22:10:01 +0530 Subject: [PATCH] samples: littlefs: add qspi nodes for rak5010_nrf52840 add qspi nodes with size of 64MB to LFS with automount. Signed-off-by: Parthiban Nallathambi --- .../fs/littlefs/boards/rak5010_nrf52840.conf | 10 +++++ .../littlefs/boards/rak5010_nrf52840.overlay | 37 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 samples/subsys/fs/littlefs/boards/rak5010_nrf52840.conf create mode 100644 samples/subsys/fs/littlefs/boards/rak5010_nrf52840.overlay diff --git a/samples/subsys/fs/littlefs/boards/rak5010_nrf52840.conf b/samples/subsys/fs/littlefs/boards/rak5010_nrf52840.conf new file mode 100644 index 00000000000..5ad368d450d --- /dev/null +++ b/samples/subsys/fs/littlefs/boards/rak5010_nrf52840.conf @@ -0,0 +1,10 @@ +# +# Copyright (c) 2024 Linumiz +# SPDX-License-Identifier: Apache-2.0 +# + +# Need this when storage is on flash +CONFIG_MPU_ALLOW_FLASH_WRITE=y + +CONFIG_NORDIC_QSPI_NOR=y +CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 diff --git a/samples/subsys/fs/littlefs/boards/rak5010_nrf52840.overlay b/samples/subsys/fs/littlefs/boards/rak5010_nrf52840.overlay new file mode 100644 index 00000000000..c82338c518e --- /dev/null +++ b/samples/subsys/fs/littlefs/boards/rak5010_nrf52840.overlay @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2024 Linumiz + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/delete-node/ &storage_partition; + +/ { + fstab { + compatible = "zephyr,fstab"; + lfs1: lfs1 { + compatible = "zephyr,fstab,littlefs"; + mount-point = "/lfs1"; + partition = <&lfs1_part>; + automount; + read-size = <16>; + prog-size = <16>; + cache-size = <64>; + lookahead-size = <32>; + block-cycles = <512>; + }; + }; +}; + +&is25wp064a { + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + lfs1_part: partition@0 { + label = "storage"; + reg = <0x00000000 DT_SIZE_M(8)>; + }; + }; +};