Skip to content

Add support for Winbond W25N NAND flash#26232

Merged
julianoes merged 5 commits intomainfrom
pr-nand-flash
Feb 10, 2026
Merged

Add support for Winbond W25N NAND flash#26232
julianoes merged 5 commits intomainfrom
pr-nand-flash

Conversation

@julianoes
Copy link
Copy Markdown
Contributor

@julianoes julianoes commented Jan 8, 2026

Solved Problem and solution

This brings support for the Winbond W25N NAND flash chip specifically W25N01GV chip with 128 MB.

NAND flash is used together with littlefs, updated to v2.5.1.

This driver is bench tested using the KakuteH7v2 and will be used for the Gear Up AirbrainH743 as well.

Changelog Entry

For release notes:

Feature
Documentation: Support for the Winbond W25N NAND flash chip specifically W25N01GV.

Alternatives

No support for NAND flash.

Test coverage

Bench tested, manually and using logger.

nsh> sd_bench -b 2048 -r 5
INFO  [sd_bench] Using block size = 2048 bytes, sync=0
INFO  [sd_bench] 
INFO  [sd_bench] Testing Sequential Write Speed...
INFO  [sd_bench]   Run  0:  1229.48 KB/s, max write time: 6 ms (= 333.33 KB/s), fsync: 5 ms
INFO  [sd_bench]   Run  1:  1226.24 KB/s, max write time: 21 ms (=  95.24 KB/s), fsync: 3 ms
INFO  [sd_bench]   Run  2:  1228.06 KB/s, max write time: 8 ms (= 250.00 KB/s), fsync: 4 ms
INFO  [sd_bench]   Run  3:  1228.49 KB/s, max write time: 12 ms (= 166.67 KB/s), fsync: 3 ms
INFO  [sd_bench]   Run  4:  1230.06 KB/s, max write time: 22 ms (=  90.91 KB/s), fsync: 4 ms
INFO  [sd_bench]   Avg   :  1228.46 KB/s
INFO  [sd_bench]   Overall max write time: 22 ms

Context

Also see: apache/nuttx#17552 and apache/nuttx#17706

Igor-Misic
Igor-Misic previously approved these changes Jan 9, 2026
Copy link
Copy Markdown
Member

@Igor-Misic Igor-Misic left a comment

Choose a reason for hiding this comment

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

Looks good to me. We should aim to rename /fs/microsd to something more generic, or storage related in the future.

@PetervdPerk-NXP
Copy link
Copy Markdown
Member

Looks good to me. We should aim to rename /fs/microsd to something more generic, or storage related in the future.

Actually you can do that easily
See

PX4-Autopilot/Kconfig

Lines 188 to 190 in ec8f343

config BOARD_ROOT_PATH
string "PX4 Root file path"
default "/fs/microsd"

Default is /fs/microsd but you can also set CONFIG_BOARD_ROOT_PATH to /fs/nand

@julianoes julianoes force-pushed the pr-nand-flash branch 3 times, most recently from b4deb7c to 5704cb9 Compare February 3, 2026 21:32
This cherry-picks upstream commits adding NAND flash support for the
Winbond W25N specifically W25N01GV chip.

NAND flash is used together with littlefs, hence I updated that to 2.5.1
to match upstream NuttX.
Increase stack size when using littlefs filesystem, which requires
more stack space than traditional filesystems.
- Initialize W25N01GV NAND flash on SPI1 with littlefs.
- Enable BOARD_SMALL_FLASH_LOGGING for small flash handling.
- Increase logger buffer size for flash write performance.
@julianoes
Copy link
Copy Markdown
Contributor Author

Fixed what came up during review, merging.

@julianoes julianoes merged commit 3a6a57b into main Feb 10, 2026
73 of 74 checks passed
@julianoes julianoes deleted the pr-nand-flash branch February 10, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants