1# Copyright (c) 2018 Savoir-Faire Linux. 2# SPDX-License-Identifier: Apache-2.0 3 4menuconfig SPI_NOR 5 bool "SPI NOR Flash" 6 default y 7 depends on DT_HAS_JEDEC_SPI_NOR_ENABLED 8 select FLASH_HAS_DRIVER_ENABLED 9 select FLASH_HAS_PAGE_LAYOUT 10 select FLASH_JESD216 11 select SPI 12 13if SPI_NOR 14 15choice SPI_NOR_SFDP 16 prompt "Source for Serial Flash Discoverable Parameters" 17 default SPI_NOR_SFDP_MINIMAL 18 19config SPI_NOR_SFDP_MINIMAL 20 bool "Fixed flash configuration" 21 help 22 Synthesize a minimal configuration assuming 256 By page size and 23 standard 4 KiBy and 64 KiBy erase instructions. Requires the size and 24 jedec-id properties in the devicetree jedec,spi-nor node. 25 26config SPI_NOR_SFDP_DEVICETREE 27 bool "Basic Flash Parameters from devicetree node" 28 help 29 The JESD216 Basic Flash Parameters table must be provided in the 30 sfdp-bfp property in devicetree. The size and jedec-id properties are 31 also required. 32 33config SPI_NOR_SFDP_RUNTIME 34 bool "Read flash parameters at runtime" 35 help 36 Read all flash device characteristics from the device at runtime. 37 This option is the most flexible as it should provide functionality 38 for all supported JESD216-compatible devices. 39 40endchoice 41 42config SPI_NOR_INIT_PRIORITY 43 int 44 default 80 45 help 46 Device driver initialization priority. 47 Device is connected to SPI bus, it has to 48 be initialized after SPI driver. 49 50config SPI_NOR_CS_WAIT_DELAY 51 int "Delay time in us" 52 default 0 53 help 54 This is the wait delay (in us) to allow for CS switching to take effect 55 56config SPI_NOR_FLASH_LAYOUT_PAGE_SIZE 57 int "Page size to use for FLASH_LAYOUT feature" 58 default 65536 59 help 60 When CONFIG_FLASH_PAGE_LAYOUT is used this driver will support 61 that API. By default the page size corresponds to the block 62 size (65536). Other options include the 32K-byte erase size 63 (32768), the sector size (4096), or any non-zero multiple of the 64 sector size. 65 66config SPI_NOR_IDLE_IN_DPD 67 bool "Use Deep Power-Down mode when flash is not being accessed." 68 help 69 Where supported deep power-down mode can reduce current draw 70 to as little as 0.1% of standby current. However it takes 71 some milliseconds to enter and exit from this mode. 72 73 Select this option for applications where device power 74 management is not enabled, the flash remains inactive for 75 long periods, and when used the impact of waiting for mode 76 enter and exit delays is acceptable. 77 78endif # SPI_NOR 79