Skip to content

Conversation

@sensei-hacker
Copy link
Member

@sensei-hacker sensei-hacker commented Dec 6, 2025

User description

Summary

Adds detection and support for the Puya PY25Q128HA flash chip, a W25Q128-compatible 128Mbit (16MB) SPI NOR flash commonly found on flight controllers.

Changes

Driver Support (flash_m25p16.c:102-104)

  • Added JEDEC ID entry (0x856018) to m25p16FlashConfig[] array for automatic chip detection

Documentation (Blackbox.md:123)

  • Added PY25Q128HA to the list of supported flash chips

Technical Details

  • JEDEC ID: 0x856018
    • Manufacturer: 0x85 (Puya Semiconductor)
    • Memory Type: 0x60
    • Capacity: 0x18 (128Mbit)
  • Geometry: 256 sectors × 256 pages × 256 bytes = 16 MByte
  • Command Set: Standard W25Q128-compatible (no driver changes needed)

Testing

The PY25Q128HA uses an identical command set to the W25Q128 and other supported flash chips. The existing M25P16-compatible driver already supports all necessary operations:

  • JEDEC ID detection (0x9F)
  • Read/write/erase operations
  • Standard timing parameters

Compatibility

This is a backwards-compatible change:

  • Adds new chip detection only
  • No changes to existing driver logic
  • No impact on boards without this chip
  • Boards with PY25Q128HA will now auto-detect the chip at boot

Files Changed

  • src/main/drivers/flash_m25p16.c - Added JEDEC ID entry
  • docs/Blackbox.md - Updated documentation

PR Type

Enhancement


Description

  • Adds JEDEC ID detection for Puya PY25Q128HA flash chip

  • Enables automatic chip recognition during initialization

  • Updates documentation with new supported flash chip


Diagram Walkthrough

flowchart LR
  A["Puya PY25Q128HA<br/>JEDEC ID: 0x856018"] -- "Added to detection table" --> B["flash_m25p16FlashConfig[]"]
  B -- "Auto-detection at boot" --> C["Chip Support Enabled"]
  D["Documentation Updated"] -- "Lists supported chips" --> E["Blackbox.md"]
Loading

File Walkthrough

Relevant files
Enhancement
flash_m25p16.c
Add Puya PY25Q128HA JEDEC ID to flash config                         

src/main/drivers/flash_m25p16.c

  • Added Puya PY25Q128HA JEDEC ID entry (0x856018) to m25p16FlashConfig[]
    array
  • Included datasheet reference link for the chip
  • Configured with 256 sectors and 256 pages matching W25Q128 geometry
+3/-0     
Documentation
Blackbox.md
Document Puya PY25Q128HA support                                                 

docs/Blackbox.md

  • Added Puya PY25Q128HA to the list of supported flash chips
  • Documented chip capacity as 128 Mbit / 16 MByte
  • Maintains consistent formatting with existing chip entries
+1/-0     

The Puya PY25Q128HA is a W25Q128-compatible 128Mbit (16MB) SPI NOR flash
chip. This PR adds detection support by including its JEDEC ID in the flash
configuration table.

Changes:
- Added PY25Q128HA JEDEC ID (0x856018) to m25p16FlashConfig[] array
- Updated Blackbox documentation with PY25Q128HA in supported chips list

The chip uses the same SPI command set as other supported flash chips,
so no driver modifications are required beyond adding the JEDEC ID for
auto-detection during initialization.
@qodo-code-review
Copy link
Contributor

PR Compliance Guide 🔍

All compliance sections have been disabled in the configurations.

@sensei-hacker sensei-hacker added this to the 9.0 milestone Dec 6, 2025
@sensei-hacker sensei-hacker merged commit 2c9854d into iNavFlight:maintenance-9.x Dec 24, 2025
22 checks passed
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.

1 participant