Commit graph zephyr/drivers/flash
Author SHA1 Message Date
Tim Lin
0692f32d04 drivers/flash: ite: Fix upper bound calculation and simplify erase flow
Upper bound is defined as the last block within the erase region.
Subtract one block unit from the erase size when programming upper
bound to prevent the erase range from extending into the next block.

With the correct upper/lower bounds in place, erase requests can be
handled in a single operation. Remove the block-by-block erase
loop.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2026-06-22 14:27:46 +02:00
Erwan Gouriou
cb60c30213 drivers: stm32: xspi: remove local xspim setup paths
Drop duplicated HAL_XSPIM_Config fallback code from STM32 XSPI
flash, MSPI, and MEMC drivers.

With manager setup centralized in the common XSPIM driver and
explicit xspim devicetree nodes, XSPI consumer drivers no longer
need to configure XSPIM directly.

Assisted-by: GitHub Copilot:GPT-5.3-Codex west
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2026-06-22 14:25:57 +02:00
Travis Lam
bceda620fd driver: flash: tf-m mramc service in nrf_mramc and write in normal mode
Add tfm-nrf-mramc to zephyr MRAMC driver, since mramc is secure only
peripheral. Access of nrf-mramc need nrf mramc service.
Bugfix for unaligned write should be done byte by byte instead of word
by word.

Flash write in normal write mode, previously nrf_mramc driver write use
DIRECT_WRITE_MODE in mramc. It is a not reliable method of handling
flash write since the write buffer may lost content when the write is
interrupted. This change is to switch to normal write mode and the
every write should align to 16 bytes which is the write-block-size.

Signed-off-by: Travis Lam <travis.lam@nordicsemi.no>
2026-06-17 17:44:58 +02:00
Travis Lam
496e5a17e5 driver: flash: nrf_mramc: add write verification
Physical write block size of mram is 16 for nrf7120. While using
direct write mode for write. Writing 32-bits word is handled by
mramc hardware itself.

In nrf7120 is capable to disable busfault when word written is
corrupted. Data verification is added after write/erase to
ensure a write is robust.

Signed-off-by: Travis Lam <travis.lam@nordicsemi.no>
2026-06-17 17:44:58 +02:00
Anas Nashif
ea1fbf3588 driver: fix various typos
Fixed various typos under drivers/

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-06-17 10:12:27 -04:00
Lucas Zampar Bernardi
ac8d707530 drivers: flash: stm32_qspi: fix Read JEDEC ID phantom address phase
qspi_read_jedec_id() builds the JEDEC Read ID (0x9F) command with
.AddressMode set to QSPI_ADDRESS_1_LINE, while intending to send no
address phase: .AddressSize is set to QSPI_ADDRESS_NONE, which is the
AddressMode "none" constant (0x0) and, used as an address size, equals
QSPI_ADDRESS_8_BITS.

Because the STM32 HAL emits an address phase whenever
AddressMode != QSPI_ADDRESS_NONE, the controller clocks out a phantom
8-bit address after the opcode. This shifts the returned data by one
byte and drops the manufacturer ID: flash_read_jedec_id() returns e.g.
40 19 00 instead of EF 40 19 for a Winbond W25Q256JV.

Set .AddressMode to QSPI_ADDRESS_NONE so the Read ID command issues no
address phase, as the 0x9F command requires.

Signed-off-by: Lucas Zampar Bernardi <lucas.zampar@gmail.com>
2026-06-17 10:06:49 -04:00
Erdem Simsek
d40b63ae47 drivers: flash: nordic: Add mramc region size and address kconfig.
NRF_MRAMC_REGION_ADDRESS_RESOLUTION and NRF_MRAMC_REGION_SIZE_UNIT
is added.

Signed-off-by: Erdem Simsek <erdem.simsek@nordicsemi.no>
2026-06-17 10:06:21 -04:00
Michael Zimmermann
8a7ae0bed1 modules: hal_silabs: rename gecko kconfigs
- Kconfigs in modules/ should not define configs with an SOC_ prefix.
  Furthermore, these options are SDK specific, not SoC specific.
- The simplicity_sdk configs do the same.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2026-06-17 08:05:45 +02:00
Sylvio Alves
3166069477 drivers: flash: esp32: install flash funcs at driver level
Install flash functions at driver init, once the scheduler
is running, since early boot leaves the chip on the no-OS path.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-06-16 17:47:22 +02:00
Mariusz Kryński
47827195c9 drivers: flash: stm32u5/stm32l5 option bytes
expose option bytes reading / writing via flash_ex_op interface
flash_stm32_option_bytes_write fails if flash is not unlocked

Signed-off-by: Mariusz Kryński <mrk@sed.pl>
2026-06-12 21:42:40 +02:00
Tim Pambor
1777e0dfd5 drivers: flash: shell: support bad block management
Add support for checking and marking bad blocks in the shell via the
new commands:
- `flash is_bad [<device>] <address>`
- `flash mark_bad [<device>] <address>`

This allows users to identify and manage bad blocks on flash devices
that support these operations.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-06-11 15:49:31 +02:00
Mike J. Chen
97bfea46a0 drivers: flash_mspi_nor: fix io mode used by mspi_xip_config()
Switch back to target io mode after sfdp_read().
If target io mode is not single, sfdp_read() will switch to single
and leave it that way. This would cause the subsequent mspi_xip_config()
call to be issued in the wrong io mode. This change makes sure
the target io mode is switched to again after the sfdp_read().

Signed-off-by: Mike J. Chen <mjchen@google.com>
2026-06-10 14:55:53 -04:00
Flavio Ceolin
1b1ecdc438 drivers: flash: add device validation in flash_copy syscall
Add K_SYSCALL_DRIVER_FLASH checks for src_dev and dst_dev in
z_vrfy_flash_copy() to ensure both devices implement the required
flash driver API before proceeding with the copy operation.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2026-06-09 19:56:53 +02:00
minyuan xue
02e33d0328 drivers: flash: add ameba flash driver
Add realtek ameba flash driver.

Signed-off-by: minyuan xue <minyuan_xue@realsil.com.cn>
2026-06-09 19:54:32 +02:00
Jakub Zymelka
714b19a308 drivers: flash: nrf_rram: add NRF_RRAM_FILL_SKIP_IF_FILLED
Opt-in optimisation for the api->fill callback (and, transitively,
flash_fill() and flash_flatten()): scan the target region in 16-byte
write-line granularity with a fast 4x32-bit compare and skip the
physical write entirely for lines that already hold the fill value.
Consecutive dirty lines are batched into a single underlying
nrf_write().

Disabled by default because it changes the worst-case latency profile
of fill operations; enable explicitly when write endurance matters
more than absolute determinism.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2026-06-09 13:42:41 +02:00
Jakub Zymelka
f2edef49ad drivers: flash: nrf_rram: implement api->fill callback
Wire up the nRF RRAM driver to the new optional flash_api_fill
callback so flash_fill() and flash_flatten() on no-erase devices can
complete a region-fill in a single bulk operation instead of a long
write loop driven by CONFIG_FLASH_FILL_BUFFER_SIZE.

Result: a region-fill is now one rram_write() call covering the full
range, replacing thousands of write-block-sized api->write() calls
that each forced a hardware buffer commit. Flash_flatten() on RRAM
becomes effectively a single optimized memset.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2026-06-09 13:42:41 +02:00
Jakub Zymelka
9740d1b39c drivers: flash: dispatch flash_fill via api->fill when available
Prefer api->fill() when the driver provides it. Drivers that don't
implement the new callback (the vast majority today) keep using the
existing write-loop path with no behaviour change. The check is placed
after argument validation so misuse is caught the same way for both
paths, and before allocating the stack buffer so a fill-capable driver
does not pay for an unused CONFIG_FLASH_FILL_BUFFER_SIZE allocation.

This also fixes the long-standing inconsistency where flash_flatten()
on a no-erase device had to dispatch through flash_fill()'s slow loop
even when the underlying driver had a perfectly good bulk-fill path
available - flash_fill() now picks the fast path automatically.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2026-06-09 13:42:41 +02:00
Jakub Zymelka
4ffd1b8315 drivers: flash: add optional flash_api_fill driver callback
Add a new optional `flash_api_fill` callback type and matching field in
`struct flash_driver_api`. The callback lets a driver provide an
optimized implementation of fill-with-value (the operation that backs
`flash_fill()` and, transitively, `flash_flatten()` on devices without
explicit erase). When the field is left NULL behaviour is unchanged:
`flash_fill()` keeps using its generic write-loop emulation, so this is
a fully backwards compatible API extension and existing drivers compile
and run unchanged.

Explicit-erase drivers may also implement it when an internal command
is faster than a write loop.

The signature mirrors `flash_fill()` so the syscall implementation can
forward arguments verbatim. Alignment expectations match `api->write`
(write_block_size aligned offset/size); callers of `flash_fill()`
already satisfy this.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2026-06-09 13:42:41 +02:00
saeed molaie
fd7b6c2c3d drivers: flash: stm32u3: add Option Bytes read/write support
Add support for reading and writing Option Bytes (OB) on STM32U3
series devices. This enables runtime configuration of OB fields
using the STM32 flash driver.

Signed-off-by: saeed molaie <saeed.molaie@st.com>
2026-06-09 13:42:31 +02:00
Haoran Jiang
909eb56875 drivers: flash: sf32lb_mpi_qspi_nor: stage flash writes
The SF32LB MPI QSPI NOR write path uses DMA to feed the MPI data
register before issuing page program commands. If the source buffer
points into the same memory-mapped NOR window, DMA can fetch from
flash while the controller is programming it, which can hang the bus.

Add a page-sized aligned SRAM bounce buffer for such source buffers,
and use it as the DMA source for affected chunks. Also harden flash
range validation and reject partially overlapping mapped flash source
and destination ranges while treating an exact same-range write as a
no-op.

Signed-off-by: Haoran Jiang <halfsweet@halfsweet.cn>
2026-06-08 21:29:06 -04:00
Jérôme Pouiller
797b7ca255 driver: *: siwx91x: Uniformize the names
Silabs siwx91x is referenced using several names. Unify them.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-06-08 23:13:00 +02:00
hans boot
7106fd8e23 drivers: flash: fix STM32H5 error handling
The STM32H5 was using the wrong register for the error reset.

Signed-off-by: hans boot <hansboot020@yahoo.com>
2026-06-08 10:45:04 +01:00
David Jewsbury
d7d1a64e27 drivers: flash_mspi_nor: Configure IO mode when switching to XIP
Include MSPI_DEVICE_CONFIG_IO_MODE in XIP_DEV_CFG_MASK and populate
mspi_cfg.io_mode from dev_config->read_io_mode so the XIP setup call
configures the XIP io-mode which wasn't previously the case.

Signed-off-by: David Jewsbury <david.jewsbury@nordicsemi.no>
2026-06-03 08:25:32 +02:00
Dag Erik Gjørvad
d8a3bf49be drivers: flash: nrf, nrf_rram: Route reads via the TZ-secure predicate
Replace the direct memcpy() in flash_nrf_read() and nrf_rram_read()
with an inline check against soc_secure_flash_range_is_secure().
Reads that overlap a "nordic,tz-secure" partition go through
soc_secure_mem_read(); all others stay a plain memcpy() /
nrf_nvmc_buffer_read().

For secure builds and for NS builds without a tz-secure DT node the
predicate folds to a constant false and the secure branch is dropped
by the optimiser, so this is a no-op for any layout that does not
opt in.

Signed-off-by: Dag Erik Gjørvad <dag.erik.gjorvad@nordicsemi.no>
2026-06-02 13:29:37 +02:00
Laura Carlesso
4b38154187 soc: infineon: pse84: Add conditional SMIF HW init for PSE84 boards
Add support for full SMIF hardware initialization for the serial
memory flash driver when booting from internal RRAM.
On PSE84, the ROM extended boot only configures the SMIF subsystem
when the device boots from external flash. When the first application
(MCUboot or CM33 secure) runs from RRAM, the SMIF pins, clocks,
peripheral groups, and peripheral itself are left uninitialized.

Introduce CONFIG_FLASH_INFINEON_SMIF_HW_INIT to conditionally
perform these steps before mtb_serial_memory_setup() is called.

Extract the info as much as possible from DT. Some are still hardcoded
in the driver and will require additional polishing in a follow-up PR.

Assisted-by: Claude:claude-opus-4.7

Signed-off-by: Laura Carlesso <laura.carlesso@infineon.com>
2026-06-02 13:29:20 +02:00
Ruijia Wang
6ef377f634 drivers: flash: xspi: add write RAM buffer for XIP and alignment
- Read write_block_size from devicetree (default 4 in binding) to
  allow board-level override for finer write granularity.
- Add CONFIG_FLASH_MCUX_XSPI_WRITE_BUFFER (default n) to copy
  write data to a RAM buffer before transfer, preventing faults
  when source data resides in flash and padding transfer size to
  4-byte boundary for the XSPI IP Tx limitation.
- When write buffer is disabled, reject non-4-byte-aligned offset
  or length with -EINVAL.

Signed-off-by: Ruijia Wang <ruijia.wang@nxp.com>
2026-06-02 11:49:12 +02:00
Ruijia Wang
ed39d026aa drivers: flash: xspi: fix write across page boundary and alignment
- Clamp write_size to remaining bytes in the current 256-byte page
  to prevent page program address wrap, consistent with the FlexSPI
  NOR drivers.
- Set write_block_size to 2 because OPI DTR mode requires all writes
  to be 2-byte aligned and multiples of 2 bytes.

Signed-off-by: Ruijia Wang <ruijia.wang@nxp.com>
2026-06-02 11:49:12 +02:00
Deepika R
3c181cd88d drivers: flash: fix hard fault for MX25U6432F
- Add JEDEC case for Macronix MX25U6432F to skip SFDP auto-parsing.
- Forces 24-bit addressing to prevent breaking active XIP loops.

Signed-off-by: Deepika R <deepika@aerlync.com>
2026-06-01 12:04:41 +02:00
Fin Maaß
5f454ed70d flash: esp32: remove MPU_ALLOW_FLASH_WRITE
the option MPU_ALLOW_FLASH_WRITE is only needed
when ARM_MPU. Only files in include/zephyr/arch/arm/mpu/
and include/zephyr/arch/arm64/cortex_r use it. it is not used in
xtensa or riscv.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-05-29 22:09:37 +02:00
Andrzej Głąbek
6e89c21a4e drivers: flash_mspi_nor: Add self runtime device PM handling
as in the spi_nor driver, so that the DPD mode can be used even if
the flash API caller does not perform the runtime device PM calls.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2026-05-29 10:46:31 +02:00
Andrzej Głąbek
d3b85a157b drivers: flash_mspi_nor: Add support for DPD mode
Add proper handling of the `has-dpd`, `t-enter-dpd`, and `t-exit-dpd`
devicetree properties that could be applied to "jedec,mspi-nor" nodes,
but caused no effect so far.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2026-05-29 10:46:31 +02:00
Andrzej Głąbek
b7cfe0ca6d drivers: flash_mspi_nor: Apply a few editorial corrections
Correct alignment of `\` characters in the `FLASH_MSPI_NOR_INST(inst)`
macro definition.
Use `NSEC_PER_USEC` symbols instead of 1000 when doing conversion from
nanoseconds to microseconds.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2026-05-29 10:46:31 +02:00
Vincent Tardy
30d123cc90 drivers: flash : stm32wbax : Add flash manager thread
A flash manager thread is created and allocated to
process Flash Manager Process.
Definition of KConfigs STM32WBA_FLASH_MNGR_THREAD_STACK_SIZE,
and STM32WBA_FLASH_MNGR_THREAD_PRIO to configure the
flash manager thread.
STM32WBA_FLASH_MNGR_THREAD_STACK_SIZE is setting by default
to 768 bytes. This value was chosen empirically since reasonable
to cover generic cases.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
2026-05-28 11:06:47 +01:00
Riadh Ghaddab
8736e2121a flash: nrf_mram: limit Ready register check only to nrf54h series
Ready registers are defined for the nrf54h series but not necesssary for
other soc families.
Limit the Ready register check only to this family of socs.

Signed-off-by: Riadh Ghaddab <riadh.ghaddab@nordicsemi.no>
2026-05-22 21:57:04 +02:00
Jimmy Zheng
612ac730c0 drivers: flash: unify andestech,qspi-nor compatible string
Remove the 'andestech,qspi-nor-xip' compatible string and unify both
flash_andes_qspi.c and flash_andes_qspi_xip.c flash drivers use
'andestech,qspi-nor' compatible string.

The driver selection is now handled via Kconfig logic.
CONFIG_FLASH_ANDES_QSPI_XIP is strickly depends on XIP is enabled and
the 'zephyr,flash' chosen node is compatible with 'andestech,qspi-nor'.

Since these two driver variants cannot coexist, the application is
responsible for enabling the appropriate driver Kconfig.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2026-05-22 18:27:15 +02:00
Francois Ramu
91bce9f8e2 drivers: flash: stm32 ospi driver with TimeOut in MemoryMapped mode
When the TimeOut is enabled in MemoryMapped mode, the TO irq callback
has not to give any sem, because the read operation is done with
memcopy(). No sem was taken, nothing to release.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2026-05-21 17:03:40 -04:00
Thomas Fischer
554d07b01f drivers: flash driver: added support for W25Q128JV-IQ/IN flash
Added support for W25Q128JV-IQ/IN flash by adding vendor id specific LUT.
Fixes #107306

Signed-off-by: Thomas Fischer <thomas.fischer@jumo.net>
2026-05-21 15:11:19 +02:00
T Madhusudhan Rao
a870db2aa9 drivers: flash: nrf_qspi_nor: fix unaligned prefix and suffix reads
This commit fixes two boundary calculation bugs within read_non_aligned()
in the nrf_qspi_nor driver:

1. Prefix Alignment: Removed the `if (flash_prefix > size)` check. This
   check artificially capped the prefix, resulting in unaligned addresses
   being passed to the nrfx HAL.
2. Suffix Out-of-Bounds: Replaced the hardcoded WORD_SIZE * 2 suffix
   read with a dynamic size check. Previously, if a read ended near the
   physical boundary of the flash chip, the hardcoded 8-byte read would
   request memory outside the chip's physical address space.

Fixes #109139
Fixes #109140

Signed-off-by: T Madhusudhan Rao <tetakalam@aerlync.com>
2026-05-18 18:40:29 +02:00
Riadh Ghaddab
a859a06e53 drivers: nrf_mram: optimize memcpy when writing an MRAM_WORD
memcpy is not optimized for the Cortex-M core due to this :
https://github.com/zephyrproject-rtos/zephyr/issues/95154
Modify this by writing each word individually only when source address
is aligned to 4 bytes boundary.

Signed-off-by: Riadh Ghaddab <riadh.ghaddab@nordicsemi.no>
2026-05-18 15:15:30 +01:00
Riadh Ghaddab
3b7129f575 drivers: nrf_mram: check for mram_latency service returns
When requesting/releasing the no_latency mode for the mram, verify that
the request/release is successful to avoid running into infinite loop if
the mram controller is in autopowerdown mode.

Signed-off-by: Riadh Ghaddab <riadh.ghaddab@nordicsemi.no>
2026-05-18 15:15:30 +01:00
Riadh Ghaddab
f2df5fe20d drivers: nrf_mram: verify writes by detecting Bus faults
Fix the case where the MRAM writes get corrupted in some conditions.
After each "MRAM_WORD_SIZE write", a read of the written/erased MRAM word
is performed while masking the bus faults to avoid halting the system.
If an error is detected in the BFSR status bits, retry the write for a
maximum of CONFIG_NRF_MRAM_MAX_RETRIES (default 20) times.

Signed-off-by: Riadh Ghaddab <riadh.ghaddab@nordicsemi.no>
2026-05-18 15:15:30 +01:00
Riadh Ghaddab
de9f49ab6e drivers: nrf_mram: wait until mramc is ready before write
When writes are issued to the mram controller without verifying that it
is ready, it can cause the reads to be stalled until all writes finish.
Fix this by adding a wait busy loop before each MRAM_WORD aligned write
and disable autopowerdown before starting the write.

Signed-off-by: Riadh Ghaddab <riadh.ghaddab@nordicsemi.no>
2026-05-18 15:15:30 +01:00
Riadh Ghaddab
4608300978 drivers: nrf_mram: support only aligned writes to MRAM_WORD_SIZE
Add a BULID_ASSERT to make sure that the write_block_size defined in the
device tree is a multiple of the MRAM_WORD_SIZE which is 16B (128 bits)

Signed-off-by: Riadh Ghaddab <riadh.ghaddab@nordicsemi.no>
2026-05-18 15:15:30 +01:00
Jordan Yates
7f95f5eb7f flash: spi_nand: fix premature timeout expiry
Determine the expiry status before the read to ensure that this function
only returns `-ETIMEDOUT`` if the flash still isn't ready *after* the
provided `timeout_us`. Checking after the read (in the while condition)
can result in the status being read once on function entry, then the
thread not resuming from the `k_sleep` until after the timeout expires.

The changes the timeout behaviour of `spi_nand_wait_until_ready` from
"Flash not ready at some point before expiry" to "Flash still not ready
after at least `timeout_us`".

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-05-18 10:21:09 +01:00
Dawid Niedzwiecki
c0e95a6602 flash: andes_qspi_nor_xip: support setting SPI frequency
Support setting desiered SPI communication frequency via configuring
the SCLK_DIV divisior in IFTIM register.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2026-05-15 10:45:50 +02:00
Artur Hadasz
318948bf4c drivers: nrf_qspi_nor: Fix EXTXIP + Flash write race condition
When parts of code are running from EXTXIP and at the same
time QSPI external flash writes/erases are happenning there
is a high risk of a race condition where a thread running
EXTXIP code starts executing while an external flash operation
is in progress; This can lead to execution stalling or
bus faults/usage faults.

The issue was observed when parts of MCUMGR were relocated to
EXTXIP and DFU was performed.

To fix the issue added the CONFIG_NORDIC_QSPI_NOR_XIP_FLASH_SCHED_LOCK
option which should be used when executing parts of code from EXTXIP.
It ensures the blocking variant of nrfx_qspi_ is used and that
no preemption happens while an external flash write is in progress
(by making qspi_wait_while_writing blocking)

Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2026-05-14 21:55:05 +02:00
Albort Xue
5aed116601 drivers: flash: mcux_flexspi_nor: add optional initial software reset
Add support for issuing a software reset sequence (RSTEN 0x66 followed
by RST 0x99) to the flash device during initialization, before reading
SFDP parameters.
The feature is controlled by a new devicetree property
'initial-soft-reset'. When enabled, the driver sends the reset
sequence using temporary LUT entries to avoid flash data
access during XIP critical sections.

An optional 't-reset-recovery' property specifies the minimum time in
nanoseconds the flash needs after reset before accepting new commands.
If provided, the driver will busy-wait(self defined) for the
specified duration.

Suggested-by: Sanjay Varghese <Varghesemela@gmail.com>
Link: https://github.com/zephyrproject-rtos/zephyr/pull/105891
Signed-off-by: Albort Xue <yao.xue@nxp.com>
2026-05-14 07:32:27 +02:00
Albort Xue
81a78e8733 drivers: flash: mcux_flexspi_nor: fix 4-byte mode entry check order
Fix by demoting BIT(6) to a fallback, checked only when no active
entry method bit (BIT(0), BIT(1), BIT(4)) is also set. This aligns
with the approach in Zephyr's generic spi_nor driver and the Linux
kernel spi-nor subsystem, both of which prefer active entry commands
when available and treat the "always 4-byte" indication as a last
resort. Sending 0xB7 to a device that is already in 4-byte mode is
idempotent and harmless.

Signed-off-by: Albort Xue <yao.xue@nxp.com>
2026-05-14 07:32:27 +02:00
Jamie McCrae
12e5c3939b drivers: flash: nrf: Fix bleeding Kconfig
Fixes a Kconfig being at the wrong level

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-05-13 13:38:08 +01:00
Jamie McCrae
a94530711c drivers: flash: esp32: Fix bleeding Kconfig
Fixes a bleeding Kconfig

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-05-13 13:38:08 +01:00