1# Copyright (C) 2020 Nordic Semiconductor ASA
2# SPDX-License-Identifier: Apache-2.0
3
4description: |
5    Description of pre-defined file systems.
6
7compatible: "zephyr,fstab,littlefs"
8
9include: "zephyr,fstab-common.yaml"
10
11properties:
12  # num-files and num-dirs are not filesystem-specific.
13
14  read-size:
15    type: int
16    required: true
17    description: |
18      The size of file system read operations, in bytes.
19
20      All read operations will be a multiple of this value.  A
21      reasonable default is 16.
22
23      This corresponds to CONFIG_FS_LITTLEFS_READ_SIZE.
24
25  prog-size:
26    type: int
27    required: true
28    description: |
29      The size of file system program (write) operations, in bytes.
30
31      All program operations will be a multiple of this value.  A
32      reasonable default is 16.
33
34      This corresponds to CONFIG_FS_LITTLEFS_PROG_SIZE.
35
36  cache-size:
37    type: int
38    required: true
39    description: |
40      The size of block caches, in bytes.
41
42      Each cache buffers a portion of a block in RAM.  The littlefs
43      needs a read cache, a program cache, and one additional cache per
44      file. Larger caches can improve performance by storing more data
45      and reducing the number of disk accesses. Must be a multiple of
46      the read and program sizes of the underlying flash device, and a
47      factor of the block size.
48
49      A reasonable default is 64.
50
51      This corresponds to CONFIG_FS_LITTLEFS_CACHE_SIZE.
52
53  lookahead-size:
54    type: int
55    required: true
56    description: |
57      The size of the lookahead buffer, in bytes.
58
59      A larger lookahead buffer increases the number of blocks found
60      during an allocation pass. The lookahead buffer is stored as a
61      compact bitmap, so each byte of RAM can track 8 blocks. Must be a
62      multiple of 8.
63
64      A reasonable default is 32.
65
66      This corresponds to CONFIG_FS_LITTLEFS_LOOKAHEAD_SIZE.
67
68  block-cycles:
69    type: int
70    required: true
71    description: |
72      The number of erase cycles before moving data to another block.
73
74      For dynamic wear leveling, the number of erase cycles before data
75      is moved to another block.  Set to a non-positive value to disable
76      leveling.
77
78      This corresponds to CONFIG_FS_LITTLEFS_BLOCK_CYCLES.
79
80  disk-version:
81    type: int
82    description: |
83      The littlefs disk version.
84
85      To maintain backward compatibility with existing littlefs
86      with the same major disk version.
87
88      The default version is LFS_DISK_VERSION.
89