coreboot-kgpe-d16/src/drivers/spi
Julius Werner 99e45ceb35 spi_flash: Add Dual SPI support
This patch adds support to read SPI flash in Dual SPI mode, where both
MISO and MOSI lines are used for output mode (specifically Fast Read
Dual Output (0x3b) where the command is still sent normally, not Fast
Read Dual I/O (0xbb) whose additional benefit should be extremely
marginal for our use cases but which would be more complicated to
implement). This feature needs to be supported by both the flash chip
and the controller, so we add a new dual_spi flag (and a new flags field
to hold it) to the spi_flash structure and a new optional xfer_dual()
function pointer to the spi_ctrlr structure. When both are provided,
Dual SPI mode is used automatically, otherwise things work as before.

This patch only adds the dual_spi flag exemplary to all Winbond and
Gigadevice chips, other vendors need to be added as needed.

Change-Id: Ic6808224c99af32b6c5c43054135c8f4c03c1feb
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33283
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-06-10 18:02:33 +00:00
..
acpi src/drivers: Remove needless '&' on function pointers 2019-01-23 14:43:49 +00:00
tpm src: Use 'include <string.h>' when appropriate 2019-03-20 20:27:51 +00:00
Kconfig drivers/spi: Remove Kconfig prompt from SPI_FLASH_SMM 2018-06-11 08:43:30 +00:00
Makefile.inc drivers/spi: Treat all stages commonly when adding drivers 2018-06-11 08:43:09 +00:00
adesto.c spi_flash: Make .read() callback optional 2019-06-10 18:02:00 +00:00
amic.c spi_flash: Make .read() callback optional 2019-06-10 18:02:00 +00:00
atmel.c spi_flash: Make .read() callback optional 2019-06-10 18:02:00 +00:00
bitbang.c spi: Add helper functions for bit-banging 2018-04-03 00:34:52 +00:00
boot_device_rw_nommap.c boot_device: Constify argument 2019-05-12 07:47:45 +00:00
cbfs_spi.c cbfs_spi: Enable speed logging by default for BIOS_DEBUG 2019-06-10 18:01:03 +00:00
eon.c spi_flash: Make .read() callback optional 2019-06-10 18:02:00 +00:00
flashconsole.c src: Use 'include <string.h>' when appropriate 2019-03-20 20:27:51 +00:00
gigadevice.c spi_flash: Add Dual SPI support 2019-06-10 18:02:33 +00:00
macronix.c spi_flash: Make .read() callback optional 2019-06-10 18:02:00 +00:00
spansion.c spi_flash: Make .read() callback optional 2019-06-10 18:02:00 +00:00
spi-generic.c Move compiler.h to commonlib 2018-10-08 16:57:27 +00:00
spi_flash.c spi_flash: Add Dual SPI support 2019-06-10 18:02:33 +00:00
spi_flash_internal.h spi_flash: Add Dual SPI support 2019-06-10 18:02:33 +00:00
spi_winbond.h drivers/spi: Move M25Pxx commands to spi_winbond.h 2019-04-11 12:00:56 +00:00
spiconsole.c drivers/spi: Re-factor spi_crop_chunk 2017-05-05 23:42:19 +02:00
sst.c spi_flash: Make .read() callback optional 2019-06-10 18:02:00 +00:00
stmicro.c spi_flash: Make .read() callback optional 2019-06-10 18:02:00 +00:00
winbond.c spi_flash: Add Dual SPI support 2019-06-10 18:02:33 +00:00