Skip to content

Move GT25Q64EZ and 128EZ to NOR flash driver? - #11983

Open
sensei-hacker wants to merge 3 commits into
iNavFlight:maintenance-10.xfrom
somethingjustlike:add-flash-id
Open

sensei-hacker wants to merge 3 commits into
iNavFlight:maintenance-10.xfrom
somethingjustlike:add-flash-id

Conversation

@sensei-hacker

@sensei-hacker sensei-hacker commented Sep 20, 2026

Copy link
Copy Markdown
Member

@somethingjustlike stated in PR #11953:

GT25Q64EZ and 128EZ are nor flash,so I put their jedec id into the m25p16.c ,and delect the jedec id in w25n.c
[GT25Q64EZ H_DS V1.3..pdf](https://github.com/user-attachments/files/32239831/GT25Q64EZ.H_DS.V1.3.pdf)
[GT25Q128EZ H_DS V1.2..pdf](https://github.com/user-attachments/files/32239898/GT25Q128EZ.H_DS.V1.2.pdf)

Unfortunately, that PR was on a dead branch that got corrupted long ago.
Creating this new PR to maybe get the change into INAV 10, if testing proves out.

@qodo-code-review

Copy link
Copy Markdown
Contributor

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Classify Giantec GT25Q EZ Devices as NOR Flash

🐞 Bug fix ✨ Enhancement 🕐 Less than 10 minutes

Grey Divider

AI Description

• Adds GT25Q64EZ and GT25Q128EZ geometry entries to the NOR flash driver.
• Removes their incorrect JEDEC definitions from the NAND flash driver.
Diagram

graph TD
  Device["GT25Q EZ Flash"] --> Probe["Flash Driver Probe"] --> NOR["M25P16 NOR Driver"] --> Table["JEDEC Geometry Table"] --> Geometry["NOR Flash Geometry"]
  Probe --> NAND["W25N NAND Driver"]
Loading
High-Level Assessment

The explicit NOR geometry entries are the best fit for the existing driver architecture and ensure only devices with known-compatible command behavior are accepted. Deriving support generically from JEDEC capacity fields was considered but would risk treating command-incompatible devices as supported.

Files changed (2) +6 / -2

Enhancement (1) +6 / -0
flash_m25p16.cRegister GT25Q64EZ and GT25Q128EZ as NOR devices +6/-0

Register GT25Q64EZ and GT25Q128EZ as NOR devices

• Adds both Giantec JEDEC IDs to the M25P16-compatible device table. Configures 128 or 256 sectors respectively, with 256 pages per sector, enabling NOR detection and geometry initialization.

src/main/drivers/flash_m25p16.c

Bug fix (1) +0 / -2
flash_w25n.cRemove GT25Q EZ identifiers from the NAND driver +0/-2

Remove GT25Q EZ identifiers from the NAND driver

• Removes the Giantec GT25Q64EZ and GT25Q128EZ JEDEC definitions from the W25N NAND driver because these parts are NOR flash devices.

src/main/drivers/flash_w25n.c

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can turn on the rule miner and Qodo learns your standards from review history

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@github-actions

Copy link
Copy Markdown

RAM / Flash usage vs. base commit d5c29d6 — commit bc6ef42

Target Flash Δ RAM Δ
MATEKF405 ⚠️ +78312 B (+12.53%) CCM: +3204 B (+12.69%)
RAM: +1176 B (+1.09%)
MATEKF722 ⚠️ +3648 B (+0.78%) ITCM_RAM: +552 B (+4.65%)
RAM: -9720 B (-9.91%)
TCM: +68 B (+0.27%)
MATEKF765 ⚠️ +96368 B (+14.92%) DTCM_RAM: +3212 B (+12.72%)
SRAM1: +13496 B (+11.89%)
MATEKH743 ⚠️ +114224 B (+17.20%) D2_RAM: -11680 B (-79.00%)
DTCM_RAM: +28 B (+0.22%)
ITCM_RAM: +1704 B (+11.72%)
RAM: +31120 B (+27.74%)

See RAM/flash optimization guide for techniques to reduce usage.

@github-actions

Copy link
Copy Markdown

Test firmware build ready — commit bc6ef42

Download firmware for PR #11983

249 targets built. Find your board's .hex file by name on that page (e.g. MATEKF405SE.hex). Files are individually downloadable — no GitHub login required.

Development build for testing only. Use Full Chip Erase when flashing.

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