Skip to content

Commit 3ebf6ef

Browse files
committed
Merge branch 'feat-w25q16fw-flash-driver-support' into 'dev'
W25Q16FW Flash driver support Closes zephyrproject-rtos#6 See merge request blik/embedded/zephyr!11
2 parents bbb4d03 + d6010d6 commit 3ebf6ef

File tree

7 files changed

+230
-208
lines changed

7 files changed

+230
-208
lines changed

drivers/flash/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
zephyr_sources_ifdef(CONFIG_SPI_FLASH_W25QXXDV spi_flash_w25qxxdv.c)
1+
zephyr_sources_ifdef(CONFIG_SPI_FLASH_W25QXXXX spi_flash_w25qxxxx.c)
22
zephyr_sources_ifdef(CONFIG_SOC_FLASH_QMSI soc_flash_qmsi.c)
33
zephyr_sources_ifdef(CONFIG_SOC_FLASH_NRF5 soc_flash_nrf5.c)
44
zephyr_sources_ifdef(CONFIG_SOC_FLASH_MCUX soc_flash_mcux.c)

drivers/flash/Kconfig

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,60 +36,78 @@ config FLASH_PAGE_LAYOUT
3636
help
3737
Enables API for retrieving the layout of flash memory pages.
3838

39-
config SPI_FLASH_W25QXXDV
39+
config SPI_FLASH_W25QXXXX
4040
bool
41-
prompt "SPI NOR Flash Winbond W25QXXDV"
41+
prompt "SPI NOR Flash Winbond W25QXXXX"
4242
select FLASH_HAS_DRIVER_ENABLED
4343
depends on SPI && FLASH
4444

45-
config SPI_FLASH_W25QXXDV_SPI_NAME
45+
config SPI_FLASH_W25QXXXX_SPI_NAME
4646
string
4747
prompt "SPI controller device name"
48-
depends on SPI_FLASH_W25QXXDV
48+
depends on SPI_FLASH_W25QXXXX
4949
default ""
5050

51-
config SPI_FLASH_W25QXXDV_DRV_NAME
51+
choice SPI_FLASH_W25QXXXX_DEVICE
52+
bool
53+
depends on SPI_FLASH_W25QXXXX
54+
prompt "W25QXXXX SPI Flash Device"
55+
config SPI_FLASH_W25QXXXX_DEVICE_W25QXXDV
56+
bool "W25QXXDV"
57+
config SPI_FLASH_W25QXXXX_DEVICE_W25QXXFW
58+
bool "W25QXXFW"
59+
help
60+
The particular Flash device defined by the two-letter suffix in the
61+
device name, e.g. W25Q16DV or W25Q16FW.
62+
endchoice
63+
64+
config SPI_FLASH_W25QXXXX_DRV_NAME
5265
string
53-
prompt "SPI flash device name"
54-
depends on SPI_FLASH_W25QXXDV
55-
default "W25QXXDV"
66+
prompt "W25QXXXX SPI flash driver name"
67+
depends on SPI_FLASH_W25QXXXX
68+
default "W25QXXXX"
69+
help
70+
This the name with that the driver is registered in
71+
the kernel.
72+
The name can be other modules and user software to
73+
get the device binding to the Flash device.
5674

57-
config SPI_FLASH_W25QXXDV_INIT_PRIORITY
75+
config SPI_FLASH_W25QXXXX_INIT_PRIORITY
5876
int
59-
depends on SPI_FLASH_W25QXXDV
77+
depends on SPI_FLASH_W25QXXXX
6078
default 80
6179
help
6280
Device driver initialization priority.
6381
Device is connected to SPI bus, it has to
6482
be initialized after SPI driver.
6583

66-
config SPI_FLASH_W25QXXDV_SPI_FREQ_0
84+
config SPI_FLASH_W25QXXXX_SPI_FREQ_0
6785
int "SPI system frequency"
68-
depends on SPI_FLASH_W25QXXDV
86+
depends on SPI_FLASH_W25QXXXX
6987
default 4
7088
help
7189
This option sets the SPI controller's frequency. Beware this value
7290
depends on the SPI controller being used and also on the system
7391
clock.
7492

75-
config SPI_FLASH_W25QXXDV_SPI_SLAVE
93+
config SPI_FLASH_W25QXXXX_SPI_SLAVE
7694
int "SPI slave linked to SPI flash"
77-
depends on SPI_FLASH_W25QXXDV
95+
depends on SPI_FLASH_W25QXXXX
7896
help
7997
This option sets the SPI slave number the SPI controller has to switch
8098
to when dealing with WinBond SPI flash chip.
8199

82-
config SPI_FLASH_W25QXXDV_FLASH_SIZE
100+
config SPI_FLASH_W25QXXXX_FLASH_SIZE
83101
int "Flash size in bytes"
84-
depends on SPI_FLASH_W25QXXDV
102+
depends on SPI_FLASH_W25QXXXX
85103
default 2097152
86104
help
87105
This is the flash capacity in bytes.
88106

89-
config SPI_FLASH_W25QXXDV_MAX_DATA_LEN
107+
config SPI_FLASH_W25QXXXX_MAX_DATA_LEN
90108
int
91109
range 1 256
92-
depends on SPI_FLASH_W25QXXDV
110+
depends on SPI_FLASH_W25QXXXX
93111
default 256
94112
help
95113
Maximum transmit or receive data length in one user data frame.

drivers/flash/spi_flash_w25qxxdv_defs.h

Lines changed: 0 additions & 118 deletions
This file was deleted.

0 commit comments

Comments
 (0)