Author: Gregory Nutt <gnutt@nuttx.org>

Misc changes made following recommendatinos of tools/nxstyle.

Author: kyChu <hello.kychu@gmail.com>

    drivers/mtd/w25qxxxjv.c:  Add QSPI-based Winbond NOR FLASH driver
    drivers/mtd/Kconfig:  include w25qxxxjv mtd driver to menuconfig
    mtd/mtd.h:  add function prototype of w25qxxxjv_initialize
This commit is contained in:
kyChu 2019-11-20 17:25:40 -06:00 committed by Gregory Nutt
parent bc8d964cb9
commit 261a6ff758
3 changed files with 1525 additions and 1 deletions

View File

@ -612,6 +612,35 @@ config N25QXXX_SECTOR512
endif # MTD_N25QXXX
config MTD_W25QXXXJV
bool "QuadSPI-based Winbond W25QXXXJV family FLASH"
default n
---help---
Support the W25Q016JV, W25Q032JV, W25Q064JV, W25Q128JV, W25Q256JV, W25Q512JV, W25Q01JV
if MTD_W25QXXXJV
config W25QXXXJV_QSPIMODE
int "W25QXXXJV QuadSPI Mode"
default 0
---help---
This device can operate in SPI mode 0 or 3.
config W25QXXXJV_QSPI_FREQUENCY
int "W25QXXXJV QuadSPI Frequency"
default 133000000
---help---
Per data sheet:
133MHz Single, Dual/Quad SPI clocks
266/532MHz equivalent Dual/Quad SPI
66MB/S continuous data transfer rate
config W25QXXXJV_SECTOR512
bool "Simulate 512 byte Erase Blocks"
default n
endif # MTD_W25QXXXJV
config MTD_MX25RXX
bool "QuadSPI-based Macronix MX25RXX family FLASH"
default n

1483
drivers/mtd/w25qxxxjv.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -63,7 +63,7 @@
#define MTDIOC_XIPBASE _MTDIOC(0x0002) /* IN: Pointer to pointer to void in
* which to received the XIP base.
* OUT: If media is directly accessible,
* return (void*) base address
* return (void *) base address
* of device memory */
#define MTDIOC_BULKERASE _MTDIOC(0x0003) /* IN: None
* OUT: None */
@ -595,6 +595,18 @@ FAR struct mtd_dev_s *mx25rxx_initialize(FAR struct qspi_dev_s *qspi,
FAR struct mtd_dev_s *n25qxxx_initialize(FAR struct qspi_dev_s *qspi,
bool unprotect);
/****************************************************************************
* Name: w25qxxxjv_initialize
*
* Description:
* Create an initialized MTD device instance for the QuadSPI-based W25QxxxJV
* FLASH part from Winbond.
*
****************************************************************************/
FAR struct mtd_dev_s *w25qxxxjv_initialize(FAR struct qspi_dev_s *qspi,
bool unprotect);
/****************************************************************************
* Name: blockmtd_initialize
*