Skip to content

mtd/w25: add Micron N25Q128 JEDEC manufacturer and memory type support#377

Open
mor2code wants to merge 1 commit into
PX4:px4_firmware_nuttx-10.3.0+from
nadirwave:pr/dakefpv-w25-n25q128
Open

mtd/w25: add Micron N25Q128 JEDEC manufacturer and memory type support#377
mor2code wants to merge 1 commit into
PX4:px4_firmware_nuttx-10.3.0+from
nadirwave:pr/dakefpv-w25-n25q128

Conversation

@mor2code

Copy link
Copy Markdown

The Micron/STMicro N25Q128 SPI NOR flash (JEDEC 0x20/0xBA/0x18) is used
on several STM32H7 flight controllers as onboard dataflash. The existing
driver only accepted Winbond (0xEF) and AMIC (0x37) manufacturers,
causing silent chip-not-recognised failures.

Add W25_JEDEC_MICRON (0x20) to the manufacturer check and
W25Q_JEDEC_MEMORY_TYPE_D (0xBA) to the memory type check.

Tested on DAKEFPV H743 with Micron N25Q128 (JEDEC 0x20/0xBA/0x18).

The Micron/STMicro N25Q128 SPI NOR flash (JEDEC 0x20/0xBA/0x18) is
used on several STM32H7 flight controllers as onboard dataflash.
The existing driver only accepted Winbond (0xEF) and AMIC (0x37)
manufacturers, causing silent chip-not-recognised failures.

Add W25_JEDEC_MICRON (0x20) to the manufacturer check and
W25Q_JEDEC_MEMORY_TYPE_D (0xBA) to the memory type check.
@mor2code

Copy link
Copy Markdown
Author

@engineer-dakefpv FYI — this NuttX patch is required for the DAKEFPV H743 PX4 port (PX4/PX4-Autopilot#27362).

@mor2code

Copy link
Copy Markdown
Author

Gentle nudge on this one — it's been open since May 17 with no review or CI yet, and it's currently the hard blocker for the DAKEFPV H743 board port (PX4/PX4-Autopilot#27522).

@dakejahl — given you reviewed/merged the adjacent drivers/mtd flash backports (#381, #382) recently, would you mind taking a look at this one? It's the same corner of the tree. cc @dirksavage88 (you're reviewing the board PR — this is its NuttX dependency).

Context: per @farhangnaderi's guidance on the board PR, the NuttX submodule bump has to land here as a standalone PR first, then the board PR gets rebased on top — so #27522 can't merge until this does.

The change is intentionally minimal — +9 / -5 in a single file (drivers/mtd/w25.c): it adds the Micron/STMicro manufacturer ID W25_JEDEC_MICRON (0x20) and memory type W25Q_JEDEC_MEMORY_TYPE_D (0xBA) to the existing detection checks. Without it the N25Q128 onboard dataflash is silently not recognised and all littlefs writes fail (ENOENT on file create — reproduced on hardware). Verified working on a DAKEFPV H743 (JEDEC 0x20/0xBA/0x18).

Happy to rebase or adjust as needed to get it green. 🙏

@dakejahl

Copy link
Copy Markdown
Contributor

Where is the PR to upstream nuttx? You need to get this in upstream nuttx first and then backport it here. Please include the link to the PR and update the PR description with [BACKPORT] to match the other PRs your referenced.

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.

2 participants