From 32be3da9f96601b602fb971c8431684a44c03c8c Mon Sep 17 00:00:00 2001 From: deadprogram Date: Sun, 4 Jun 2023 16:10:56 +0200 Subject: [PATCH] flash: WIP on support for P25Q16H Signed-off-by: deadprogram --- flash/devices.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/flash/devices.go b/flash/devices.go index 69239a6..0d0c1d8 100644 --- a/flash/devices.go +++ b/flash/devices.go @@ -36,6 +36,8 @@ var DefaultDeviceIdentifier = DeviceIdentifierFunc(func(id JedecID) Attrs { return S25FL216K() case 0x1F4501: return AT25DF081A() + case 0x856015: + return P25Q16H() case 0xC22015: return MX25L1606() case 0xC22016: @@ -73,6 +75,24 @@ var DefaultDeviceIdentifier = DeviceIdentifierFunc(func(id JedecID) Attrs { } }) +// Settings for Puya Semi P25Q16H 16MiB QSPI flash. +// Datasheet: https://www.puyasemi.com/uploadfiles/2018/08/20180807152503253.pdf +func P25Q16H() Attrs { + return Attrs{ + TotalSize: 1 << 24, // 16 MiB + StartUp: 12 * time.Microsecond, + JedecID: JedecID{0x85, 0x60, 0x15}, + MaxClockSpeedMHz: 104, + QuadEnableBitMask: 0x02, + HasSectorProtection: false, + SupportsFastRead: true, + SupportsQSPI: true, + SupportsQSPIWrites: true, + WriteStatusSplit: false, + SingleStatusByte: true, + } +} + // Settings for the Cypress (was Spansion) S25FL064L 8MiB SPI flash. // Datasheet: http://www.cypress.com/file/316661/download func S25FL064L() Attrs {