1# Copyright 2023-2024 NXP 2# SPDX-License-Identifier: Apache-2.0 3 4config FLASH_NXP_S32_QSPI_NOR 5 bool "NXP S32 QSPI NOR driver" 6 default y 7 depends on DT_HAS_NXP_S32_QSPI_NOR_ENABLED 8 select MEMC 9 select FLASH_HAS_PAGE_LAYOUT 10 select FLASH_HAS_DRIVER_ENABLED 11 select FLASH_JESD216 12 select FLASH_HAS_EXPLICIT_ERASE 13 help 14 Enable the Flash driver for a NOR Serial Flash Memory device connected 15 to an NXP S32 QSPI bus. 16 17config FLASH_NXP_S32_QSPI_HYPERFLASH 18 bool "NXP S32 QSPI HYPERFLASH driver" 19 default y 20 depends on DT_HAS_NXP_S32_QSPI_HYPERFLASH_ENABLED 21 select MEMC 22 select FLASH_HAS_PAGE_LAYOUT 23 select FLASH_HAS_DRIVER_ENABLED 24 select FLASH_HAS_EXPLICIT_ERASE 25 help 26 Enable the Flash driver for a HyperFlash Memory device connected 27 to an NXP S32 QSPI bus. 28 29if FLASH_NXP_S32_QSPI_NOR || FLASH_NXP_S32_QSPI_HYPERFLASH 30 31config FLASH_NXP_S32_QSPI_SFDP_RUNTIME 32 bool "Read flash parameters at runtime" 33 depends on FLASH_NXP_S32_QSPI_NOR 34 help 35 Read flash device characteristics from the device at runtime. 36 This option should provide functionality for all supported 37 JESD216-compatible devices, with the following notes: 38 - Quad Enable Requirements bitfield (DW15) must be present in the SFDP 39 tables to configure Quad mode. Otherwise it defaults to Dual or 40 Single mode as supported by the device. 41 - Soft Reset bitfield (DW16) must be present in the SFDP tables to 42 automatically reset the device at initialization time. 43 - 0-X-X mode discovery not yet implemented by the HAL. 44 45 If not selected, the driver uses a fixed configuration assuming 256 By 46 page size and 4 KiBy, 32 KiBy and 64 KiBy erase instructions. The 47 device size and jedec-id properties must be set in devicetree node. 48 49config FLASH_NXP_S32_QSPI_VERIFY_ERASE 50 bool "Verify memory after erased" 51 help 52 Verify contents of memory after erased. 53 54config FLASH_NXP_S32_QSPI_VERIFY_WRITE 55 bool "Verify memory after written" 56 help 57 Verify contents of memory after written. 58 59config FLASH_NXP_S32_QSPI_LAYOUT_PAGE_SIZE 60 int "Page size to use for FLASH_LAYOUT feature" 61 default 4096 62 help 63 When CONFIG_FLASH_PAGE_LAYOUT is used this driver will support that API. 64 By default the page size corresponds to the sector size (4096) for a NOR 65 flash memory. Other options may include the 32K-byte erase size (32768), 66 the block size (65536), or any non-zero multiple of the sector size. 67 68endif # FLASH_NXP_S32_QSPI_NOR || FLASH_NXP_S32_QSPI_HYPERFLASH 69