Skip to content

Commit

Permalink
samples: usb: mass: add disk description to overlays
Browse files Browse the repository at this point in the history
Add flash disk description to overlays. Specify custom flashdisk
partition for fat fs api test to match the Kconfig values, because
native posix storage partition is too small for FatFS filesystem.

Co-authored-by: Johann Fischer <[email protected]>
Signed-off-by: Tomasz Moń <[email protected]>
  • Loading branch information
2 people authored and carlescufi committed Oct 28, 2022
1 parent af0837e commit 51c46e9
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@
};
};
};

/ {
msc_disk0 {
compatible = "zephyr,flash-disk";
partition = <&storage_partition>;
disk-name = "NAND";
cache-size = <4096>;
};
};
9 changes: 9 additions & 0 deletions samples/subsys/usb/mass/boards/nrf52840dk_nrf52840.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@
};
};
};

/ {
msc_disk0 {
compatible = "zephyr,flash-disk";
partition = <&storage_partition>;
disk-name = "NAND";
cache-size = <4096>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@
};
};
};

/ {
msc_disk0 {
compatible = "zephyr,flash-disk";
partition = <&storage_partition>;
disk-name = "NAND";
cache-size = <4096>;
};
};
32 changes: 32 additions & 0 deletions tests/subsys/fs/fat_fs_api/boards/native_posix.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright (c) 2022 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/

&flashcontroller0 {
reg = <0x00000000 DT_SIZE_K(2048)>;
};

&flash0 {
reg = <0x00000000 DT_SIZE_K(2048)>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

flashdisk_partition: partition@0 {
label = "flashdisk";
reg = <0x00000000 0x00200000>;
};
};
};

/ {
storage_disk {
compatible = "zephyr,flash-disk";
partition = <&flashdisk_partition>;
disk-name = "NAND";
cache-size = <4096>;
};
};

0 comments on commit 51c46e9

Please sign in to comment.