feat(spi_nand_flash): Add block device support#606
Draft
RathiSonika wants to merge 8 commits intoespressif:masterfrom
Draft
feat(spi_nand_flash): Add block device support#606RathiSonika wants to merge 8 commits intoespressif:masterfrom
RathiSonika wants to merge 8 commits intoespressif:masterfrom
Conversation
5e70c2f to
afd1301
Compare
omnitex
reviewed
Nov 11, 2025
69e8bbd to
422413c
Compare
omnitex
reviewed
Nov 12, 2025
omnitex
reviewed
Nov 12, 2025
b05a6d5 to
2d1b2a3
Compare
2d1b2a3 to
19bd12c
Compare
c335750 to
cc21a22
Compare
1ee1cbb to
ab79e06
Compare
98ae07c to
abc1a07
Compare
b8c5e19 to
c38ec01
Compare
pacucha42
reviewed
Feb 24, 2026
pacucha42
reviewed
Feb 24, 2026
pacucha42
reviewed
Feb 24, 2026
pacucha42
reviewed
Feb 24, 2026
| * 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, |
Collaborator
There was a problem hiding this comment.
Can we create new BDL instance for existing NAND flash device driver?
Collaborator
Author
There was a problem hiding this comment.
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.
pacucha42
reviewed
Feb 24, 2026
6cd97df to
2005e10
Compare
c8116cf to
d46bf54
Compare
- add block device support - refactor the component for improved structure and maintainability - remove the fatfs/vfs component dependency from the driver
…d_flash into new component
… esp_vfs_fat_register
…_DELETED for TRIM operation
d6c2cb1 to
be8255b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.