drivers: fastboot: Add support for SPI flash memory
authorAriel D'Alessandro <ariel.dalessandro@collabora.com>
Thu, 17 Jul 2025 13:58:54 +0000 (10:58 -0300)
committerTom Rini <trini@konsulko.com>
Tue, 22 Jul 2025 17:30:14 +0000 (11:30 -0600)
commitafca60620ad7958fbee2d5518de0383483c82ced
treed850b74628c179b84c7f4b2e01aa12bd3a1f28dc
parentbabae80169dd4c9ea94f27e3c6f0f4e004f8e71a
drivers: fastboot: Add support for SPI flash memory

Fastboot currently supports MMC and NAND flash devices. Similarly,
extend the support to SPI flash memories.

Note that in this initial implementation, partitions on the device are
not supported yet, but raw partitions can be set in U-Boot environment.

To define a raw partition descriptor, add an environment variable
similar to the MMC case:

```
fastboot_raw_partition_<raw partition name>=<offset> <size>
```

for example:

```
fastboot_raw_partition_boot=0x0 0x1000000
```

Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
doc/android/fastboot.rst
drivers/fastboot/Kconfig
drivers/fastboot/Makefile
drivers/fastboot/fb_command.c
drivers/fastboot/fb_getvar.c
drivers/fastboot/fb_spi_flash.c [new file with mode: 0644]
include/fb_spi_flash.h [new file with mode: 0644]