Skip to content

Commit

Permalink
Merge branch 'feat-w25q16fw-flash-driver-support' into 'dev'
Browse files Browse the repository at this point in the history
W25Q16FW Flash driver support

Closes zephyrproject-rtos#6

See merge request blik/embedded/zephyr!11
  • Loading branch information
frasa committed May 9, 2018
2 parents bbb4d03 + d6010d6 commit 3ebf6ef
Show file tree
Hide file tree
Showing 7 changed files with 230 additions and 208 deletions.
2 changes: 1 addition & 1 deletion drivers/flash/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
zephyr_sources_ifdef(CONFIG_SPI_FLASH_W25QXXDV spi_flash_w25qxxdv.c)
zephyr_sources_ifdef(CONFIG_SPI_FLASH_W25QXXXX spi_flash_w25qxxxx.c)
zephyr_sources_ifdef(CONFIG_SOC_FLASH_QMSI soc_flash_qmsi.c)
zephyr_sources_ifdef(CONFIG_SOC_FLASH_NRF5 soc_flash_nrf5.c)
zephyr_sources_ifdef(CONFIG_SOC_FLASH_MCUX soc_flash_mcux.c)
Expand Down
54 changes: 36 additions & 18 deletions drivers/flash/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,60 +36,78 @@ config FLASH_PAGE_LAYOUT
help
Enables API for retrieving the layout of flash memory pages.

config SPI_FLASH_W25QXXDV
config SPI_FLASH_W25QXXXX
bool
prompt "SPI NOR Flash Winbond W25QXXDV"
prompt "SPI NOR Flash Winbond W25QXXXX"
select FLASH_HAS_DRIVER_ENABLED
depends on SPI && FLASH

config SPI_FLASH_W25QXXDV_SPI_NAME
config SPI_FLASH_W25QXXXX_SPI_NAME
string
prompt "SPI controller device name"
depends on SPI_FLASH_W25QXXDV
depends on SPI_FLASH_W25QXXXX
default ""

config SPI_FLASH_W25QXXDV_DRV_NAME
choice SPI_FLASH_W25QXXXX_DEVICE
bool
depends on SPI_FLASH_W25QXXXX
prompt "W25QXXXX SPI Flash Device"
config SPI_FLASH_W25QXXXX_DEVICE_W25QXXDV
bool "W25QXXDV"
config SPI_FLASH_W25QXXXX_DEVICE_W25QXXFW
bool "W25QXXFW"
help
The particular Flash device defined by the two-letter suffix in the
device name, e.g. W25Q16DV or W25Q16FW.
endchoice

config SPI_FLASH_W25QXXXX_DRV_NAME
string
prompt "SPI flash device name"
depends on SPI_FLASH_W25QXXDV
default "W25QXXDV"
prompt "W25QXXXX SPI flash driver name"
depends on SPI_FLASH_W25QXXXX
default "W25QXXXX"
help
This the name with that the driver is registered in
the kernel.
The name can be other modules and user software to
get the device binding to the Flash device.

config SPI_FLASH_W25QXXDV_INIT_PRIORITY
config SPI_FLASH_W25QXXXX_INIT_PRIORITY
int
depends on SPI_FLASH_W25QXXDV
depends on SPI_FLASH_W25QXXXX
default 80
help
Device driver initialization priority.
Device is connected to SPI bus, it has to
be initialized after SPI driver.

config SPI_FLASH_W25QXXDV_SPI_FREQ_0
config SPI_FLASH_W25QXXXX_SPI_FREQ_0
int "SPI system frequency"
depends on SPI_FLASH_W25QXXDV
depends on SPI_FLASH_W25QXXXX
default 4
help
This option sets the SPI controller's frequency. Beware this value
depends on the SPI controller being used and also on the system
clock.

config SPI_FLASH_W25QXXDV_SPI_SLAVE
config SPI_FLASH_W25QXXXX_SPI_SLAVE
int "SPI slave linked to SPI flash"
depends on SPI_FLASH_W25QXXDV
depends on SPI_FLASH_W25QXXXX
help
This option sets the SPI slave number the SPI controller has to switch
to when dealing with WinBond SPI flash chip.

config SPI_FLASH_W25QXXDV_FLASH_SIZE
config SPI_FLASH_W25QXXXX_FLASH_SIZE
int "Flash size in bytes"
depends on SPI_FLASH_W25QXXDV
depends on SPI_FLASH_W25QXXXX
default 2097152
help
This is the flash capacity in bytes.

config SPI_FLASH_W25QXXDV_MAX_DATA_LEN
config SPI_FLASH_W25QXXXX_MAX_DATA_LEN
int
range 1 256
depends on SPI_FLASH_W25QXXDV
depends on SPI_FLASH_W25QXXXX
default 256
help
Maximum transmit or receive data length in one user data frame.
Expand Down
118 changes: 0 additions & 118 deletions drivers/flash/spi_flash_w25qxxdv_defs.h

This file was deleted.

Loading

0 comments on commit 3ebf6ef

Please sign in to comment.