Skip to content

feat(spi_nand_flash): Add block device support#606

Draft
RathiSonika wants to merge 8 commits intoespressif:masterfrom
RathiSonika:feat/nand_flash_bdl_support
Draft

feat(spi_nand_flash): Add block device support#606
RathiSonika wants to merge 8 commits intoespressif:masterfrom
RathiSonika:feat/nand_flash_bdl_support

Conversation

@RathiSonika
Copy link
Collaborator

@RathiSonika RathiSonika commented Nov 10, 2025

Change description

  • Add block device support (nand_flash_bdl and nand_wl_bdl)

  • Please refer spi_nand_flash/layered_architecture.md for the details

  • Refactor the component for improved structure, maintainability and readability

  • Removed the fatfs/vfs component dependency; it will be relocated (along with examples) to another component in a different PR.

  • Add Kconfig option NAND_FLASH_ENABLE_BDL to enable/disable BDL support

  • Updated test_apps and host_tests to verify the same

  • OTP and OOB area handling are still missing. I’ll address them in a separate PR, as the scope of this one is already growing.

@RathiSonika RathiSonika force-pushed the feat/nand_flash_bdl_support branch 2 times, most recently from 5e70c2f to afd1301 Compare November 11, 2025 08:38
@RathiSonika RathiSonika force-pushed the feat/nand_flash_bdl_support branch 2 times, most recently from 69e8bbd to 422413c Compare November 12, 2025 09:38
@RathiSonika RathiSonika self-assigned this Nov 13, 2025
@RathiSonika RathiSonika force-pushed the feat/nand_flash_bdl_support branch 3 times, most recently from b05a6d5 to 2d1b2a3 Compare November 13, 2025 19:11
@RathiSonika RathiSonika force-pushed the feat/nand_flash_bdl_support branch from 2d1b2a3 to 19bd12c Compare November 14, 2025 07:45
@RathiSonika RathiSonika force-pushed the feat/nand_flash_bdl_support branch 15 times, most recently from c335750 to cc21a22 Compare November 19, 2025 12:31
@RathiSonika RathiSonika force-pushed the feat/nand_flash_bdl_support branch from 1ee1cbb to ab79e06 Compare January 30, 2026 12:04
@RathiSonika RathiSonika force-pushed the feat/nand_flash_bdl_support branch 9 times, most recently from 98ae07c to abc1a07 Compare February 17, 2026 10:04
@RathiSonika RathiSonika force-pushed the feat/nand_flash_bdl_support branch from b8c5e19 to c38ec01 Compare February 23, 2026 10:37
* the WEAR-LEVELING layer instead (see spi_nand_flash_wl_get_blockdev).
*
*/
esp_err_t nand_flash_get_blockdev(spi_nand_flash_config_t *config,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we create new BDL instance for existing NAND flash device driver?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed offline, we have a single BDL flash instance mapped to the WL layer. A single WL instance manages the entire flash.

Therefore, there is no need to create multiple BDL instances for the NAND flash driver. The flash BDL and WL BDL will be created once during flash initialization.

@RathiSonika RathiSonika force-pushed the feat/nand_flash_bdl_support branch 3 times, most recently from 6cd97df to 2005e10 Compare February 27, 2026 12:07
@RathiSonika RathiSonika force-pushed the feat/nand_flash_bdl_support branch 2 times, most recently from c8116cf to d46bf54 Compare March 5, 2026 10:36
@RathiSonika RathiSonika force-pushed the feat/nand_flash_bdl_support branch from d6c2cb1 to be8255b Compare March 5, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants