[PATCH 00/11] spi: airoha: driver improvements
Mikhail Kshevetskiy
mikhail.kshevetskiy at iopsys.eu
Fri Oct 10 21:08:30 CEST 2025
Features:
* dirty hack required to for both u-boot & linux was removed
* dma support was implemented (will speedup flash reading/writing)
* driver fixes & improvements
* en7523 specific workaround to prevent flash data damaging if UART_TXD
was short to GND
[WARNING]
This patch removes dirty hack used to:
* get flash page settings from spinand driver
* pass flash page settings to linux driver via SNFI registers
It has been proven that spinand flash page size is actually unnecessary
for driver operations. We can get all required data from dirmap requests.
NOTES:
1) Linux kernel without fixes will be unable to use spinand flash.
Corresponging fixes were sent to linux kernel
(see: https://lore.kernel.org/lkml/20251010033136.1475673-1-mikhail.kshevetskiy@iopsys.eu/)
2) OpenWRT main branch already accept corresponding linux/u-boot fixes
(see: https://github.com/openwrt/openwrt/pull/20295)
[Benchmark]
With DMA:
=> mtd read.benchmark spi-nand0 $loadaddr 0 0x8000000
Reading 134217728 byte(s) (65536 page(s)) at offset 0x00000000
Read speed: 8131kiB/s
Without DMA:
mtd read.benchmark spi-nand0 $loadaddr 0 0x8000000
Reading 134217728 byte(s) (65536 page(s)) at offset 0x00000000
Read speed: 2062kiB/s
Mikhail Kshevetskiy (11):
spi: airoha: remove unnecessary operation adjust_op_size
spi: airoha: add support of dual/quad wires spi modes to exec_op()
handler
spi: airoha: add dma support
spi: airoha: support of dualio/quadio flash reading commands
spi: airoha: avoid setting of page/oob sizes in REG_SPI_NFI_PAGEFMT
spi: airoha: reduce the number of modification of REG_SPI_NFI_CNFG and
REG_SPI_NFI_SECCUS_SIZE registers
spi: airoha: set custom sector size equal to flash page size
spi: airoha: avoid usage of flash specific parameters
spi: airoha: buffer must be 0xff-ed before writing
spi: airoha: return an error for continuous mode dirmap creation cases
spi: airoha: en7523: workaround flash damaging if UART_TXD was short
to GND
drivers/spi/airoha_snfi_spi.c | 690 +++++++++++++++++++++++++++-------
1 file changed, 548 insertions(+), 142 deletions(-)
--
2.51.0
More information about the U-Boot
mailing list