zephyr/drivers/flash
Rodrigo Brochado 037f994ed2 drivers: flash: Add workaround for anomaly 122 on nrf52840
The energy consumption on nrf52840 is unnecessarily high when
CONFIG_NORDIC_QSPI_NOR is used due to Anomaly 122. The nrf_qspi_nor
driver is unitialize after QSPI usage and initialize before using
it again.

Semaphore objects are used to allow multiple threads exclusive access
and efficient usage.

The main assumption made was that all QSPI API is stateless, in the
sense that it is not required to store any peripheral state before
uninit. Also, the QSPI driver was supposed to be synchronous, except
for the erase operation, in which the nrf signals its start, instead of
its end. While the flash is performing the erase, an uninit followed
by an init doesn't work. For that reason, polling is done before
every uninit.

Tests were made with a simple LittleFS application in a custom board
using flash MX25R3235F and another with the LittleFS flash sample
using nrf52840 DK that has a MX25R6435F. Current consumption dropped
from 630 uA to ~10uA in both cases.

Signed-off-by: Rodrigo Brochado <git.rodrigobrochado@gmail.com>
2021-05-07 10:26:21 -05:00
..
CMakeLists.txt drivers: flash: Support i.MX FlexSPI NOR driver with XIP 2021-04-15 16:26:39 -05:00
flash_esp32.c drivers: flash: remove usage of device_pm_control_nop 2021-04-28 10:55:35 -04:00
flash_gecko.c drivers: flash: remove usage of device_pm_control_nop 2021-04-28 10:55:35 -04:00
flash_handlers.c
flash_mcux_flexspi_nor.c drivers: flash: remove usage of device_pm_control_nop 2021-04-28 10:55:35 -04:00
flash_page_layout.c
flash_priv.h
flash_sam0.c drivers: flash: remove usage of device_pm_control_nop 2021-04-28 10:55:35 -04:00
flash_sam.c drivers: flash: remove usage of device_pm_control_nop 2021-04-28 10:55:35 -04:00
flash_shell.c drivers/flash/flash_shell: remove flash_write_protection_set() usage 2021-03-29 13:43:55 -04:00
flash_simulator.c drivers: flash: remove usage of device_pm_control_nop 2021-04-28 10:55:35 -04:00
flash_stm32_qspi.c drivers: flash: remove usage of device_pm_control_nop 2021-04-28 10:55:35 -04:00
flash_stm32_v1.c
flash_stm32.c drivers: flash: remove usage of device_pm_control_nop 2021-04-28 10:55:35 -04:00
flash_stm32.h drivers/flash: STM32: Fix flash_stm32_priv definition for h7 series 2021-04-28 09:06:42 -05:00
flash_stm32f4x.c
flash_stm32f7x.c
flash_stm32g0x.c drivers: flash: stm32g0: Flush caches after erase 2021-04-20 12:44:14 +02:00
flash_stm32g4x.c drivers/flash/flash_stm32g4x: fixed build issue 2021-03-29 13:43:55 -04:00
flash_stm32h7x.c drivers/flash: stm32h7: Fixed range validation 2021-05-05 11:00:20 +02:00
flash_stm32l4x.c
flash_stm32wbx.c drivers: flash: stm32wb: Flush caches after erase 2021-04-20 12:44:14 +02:00
jesd216.c drivers: flash: jesd216: add support for DW16 decoding 2021-01-18 16:58:09 -05:00
jesd216.h drivers: flash: jesd216: improve support for address size selection 2021-04-27 14:21:15 +02:00
Kconfig esp32: drivers: spi_flash: add host flash support 2021-03-06 09:34:35 -05:00
Kconfig.at45
Kconfig.esp32 esp32: drivers: spi_flash: add host flash support 2021-03-06 09:34:35 -05:00
Kconfig.gecko drivers/flash: select to allow flash write by MPU on ARM SoCs 2021-01-25 08:59:01 -05:00
Kconfig.lpc drivers: soc_flash_lpc: LPC legacy flash driver 2021-01-23 08:01:00 -05:00
Kconfig.mcux drivers: flash: MCUX: Split the relocate define based on target memory 2021-05-04 15:46:52 +02:00
Kconfig.nios2_qspi
Kconfig.nor
Kconfig.nordic_qspi_nor drivers: flash: nrf_qspi: support JESD216 API 2021-01-18 16:58:09 -05:00
Kconfig.nrf drivers/flash: select to allow flash write by MPU on ARM SoCs 2021-01-25 08:59:01 -05:00
Kconfig.rv32m1
Kconfig.sam drivers/flash: select to allow flash write by MPU on ARM SoCs 2021-01-25 08:59:01 -05:00
Kconfig.sam0 drivers/flash: select to allow flash write by MPU on ARM SoCs 2021-01-25 08:59:01 -05:00
Kconfig.simulator drivers/flash/flash_simulator: integrate WP service into write/erase 2021-03-29 13:43:55 -04:00
Kconfig.stm32 drivers/flash: select to allow flash write by MPU on ARM SoCs 2021-01-25 08:59:01 -05:00
Kconfig.stm32_qspi drivers/flash: flash_stm32_qspi: Set DMA as optional 2021-01-15 10:29:30 -05:00
nrf_qspi_nor.c drivers: flash: Add workaround for anomaly 122 on nrf52840 2021-05-07 10:26:21 -05:00
soc_flash_lpc.c drivers: flash: remove usage of device_pm_control_nop 2021-04-28 10:55:35 -04:00
soc_flash_mcux.c drivers: flash: remove usage of device_pm_control_nop 2021-04-28 10:55:35 -04:00
soc_flash_nios2_qspi.c drivers: flash: remove usage of device_pm_control_nop 2021-04-28 10:55:35 -04:00
soc_flash_nrf_ticker.c Bluetooth: controller: Propagate ticker force to ULL 2021-04-13 12:15:12 +02:00
soc_flash_nrf.c drivers: flash: remove usage of device_pm_control_nop 2021-04-28 10:55:35 -04:00
soc_flash_nrf.h drivers/flash/soc_flash_nrf: Include additional headers 2021-03-04 13:55:56 +01:00
soc_flash_rv32m1.c drivers: flash: remove usage of device_pm_control_nop 2021-04-28 10:55:35 -04:00
spi_flash_at45.c pm: rename PM_DEVICE_GET/SET_POWER_STATE to PM_DEVICE_STATE_GET/SET 2021-05-05 18:35:49 -04:00
spi_nor.c pm: replace DEVICE_PM_* states with PM_DEVICE_* 2021-05-05 18:35:49 -04:00
spi_nor.h drivers: flash: spi-nor: add support for 4-byte addressing 2021-04-27 14:21:15 +02:00