u-boot-brain/drivers
Siarhei Siamashka 19e99fb4ff sunxi: Support booting from SPI flash
Allwinner devices support SPI flash as one of the possible
bootable media type. The SPI flash chip needs to be connected
to SPI0 pins (port C) to make this work. More information is
available at:

    https://linux-sunxi.org/Bootable_SPI_flash

This patch adds the initial support for booting from SPI flash.
The existing SPI frameworks are not used in order to reduce the
SPL code size. Right now the SPL size grows by ~370 bytes when
CONFIG_SPL_SPI_SUNXI option is enabled.

While there are no popular Allwinner devices with SPI flash at
the moment, testing can be done using a SPI flash module (it
can be bought for ~2$ on ebay) and jumper wires with the boards,
which expose relevant pins on the expansion header. The SPI flash
chips themselves are very cheap (some prices are even listed as
low as 4 cents) and should not cost much if somebody decides to
design a development board with an SPI flash chip soldered on
the PCB.

Another nice feature of the SPI flash is that it can be safely
accessed in a device-independent way (since we know that the
boot ROM is already probing these pins during the boot time).
And if, for example, Olimex boards opted to use SPI flash instead
of EEPROM, then they would have been able to have U-Boot installed
in the SPI flash now and boot the rest of the system from the SATA
hard drive. Hopefully we may see new interesting Allwinner based
development boards in the future, now that the software support
for the SPI flash is in a better shape :-)

Testing can be done by enabling the CONFIG_SPL_SPI_SUNXI option
in a board defconfig, then building U-Boot and finally flashing
the resulting u-boot-sunxi-with-spl.bin binary over USB OTG with
a help of the sunxi-fel tool:

   sunxi-fel spiflash-write 0 u-boot-sunxi-with-spl.bin

The device needs to be switched into FEL (USB recovery) mode first.
The most suitable boards for testing are Orange Pi PC and Pine64.
Because these boards are cheap, have no built-in NAND/eMMC and
expose SPI0 pins on the Raspberry Pi compatible expansion header.
The A13-OLinuXino-Micro board also can be used.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2016-07-15 08:34:34 +02:00
..
adc sandbox: add ADC driver 2015-11-02 10:38:00 +09:00
bios_emulator Fix various typos, scattered over the code. 2016-05-05 21:39:26 -04:00
block block: dwc_ahsata: support i.MX6DQPlus 2016-05-24 14:59:57 +02:00
bootcount bootcounter_ram: Flush dcache after data is written into SDRAM 2016-04-11 20:48:25 -04:00
clk clk: sandbox: don't check clk ID against 0 2016-06-24 17:24:35 -04:00
core dm: core: implement dev_map_physmem() 2016-07-09 20:16:08 +05:30
cpu x86: Move MP initialization codes into a common place 2015-07-14 18:03:16 -06:00
crypto verified-boot: Minimal support for booting U-Boot proper from SPL 2016-06-12 13:14:58 -04:00
ddr driver/ddr/fsl: Check condition for erratum A-009803 2016-06-03 14:12:49 -07:00
demo drivers: hierarchize drivers Kconfig menu 2015-08-12 20:47:44 -04:00
dfu dm: dfu: mmc: Support CONFIG_BLK in DFU for MMC 2016-07-11 14:06:44 -06:00
dma drivers: dma: ti-edma3: convert driver to adopt driver model 2016-02-23 16:14:46 +05:30
fpga fpga: Fix typo in function comment 2016-05-24 11:15:02 +02:00
gpio dm: gpio: MPC85XX GPIO platform data support 2016-07-11 14:06:44 -06:00
hwmon mailaddr: Update mail address 2016-01-27 15:32:05 +01:00
i2c clk: convert API to match reset/mailbox style 2016-06-19 17:05:55 -06:00
input input: i8042: Make sure the keyboard is enabled 2016-03-17 10:27:24 +08:00
led dm: led: Tidy up SPL options for the led and led-gpio 2015-09-02 21:28:22 -06:00
mailbox mailbox: add Tegra186 HSP driver 2016-06-19 17:05:55 -06:00
memory memory: Move TI_AEMIF config to KCONFIG 2016-04-18 17:11:43 -04:00
misc sandbox: Find keyboard driver using driver model 2016-07-11 14:06:44 -06:00
mmc dm: mmc: msmsdhic: Drop old MMC code 2016-07-11 14:06:44 -06:00
mtd sunxi: Support booting from SPI flash 2016-07-15 08:34:34 +02:00
net net: rtl8169: Fix return value for rtl_send_common 2016-07-06 10:45:11 -05:00
pch x86: pch9: Implement get_io_base op 2016-02-05 12:47:21 +08:00
pci pci: Add board_ prefix to should_load_oprom() and make it weak 2016-07-12 13:46:01 +08:00
pcmcia powerpc: mpc824x: remove MPC824X cpu support 2015-01-05 12:08:55 -05:00
pinctrl pinctrl: uniphier: add Ethernet pin-mux settings 2016-07-02 05:44:30 +09:00
power sunxi: power: add AXP809 support 2016-05-25 17:52:39 +02:00
pwm exynos: pwm: Add a driver for the exynos5 PWM 2016-05-25 13:25:18 +09:00
qe board: ls1043ardb: Add micro QE support for ls1043ardb 2016-02-24 08:51:14 -08:00
ram ram: rename CONFIG_SPL_RAM_SUPPORT to CONFIG_SPL_RAM 2015-08-18 13:46:02 -04:00
remoteproc remoteproc: Add support for TI power processor 2016-03-14 19:18:37 -04:00
reset reset: implement a reset test 2016-06-19 17:05:55 -06:00
rtc rtc: Add MCP79411 support to DS1307 rtc driver 2015-11-04 15:19:12 -08:00
serial clk: convert API to match reset/mailbox style 2016-06-19 17:05:55 -06:00
soc Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
sound of: clean up OF_CONTROL ifdef conditionals 2015-08-18 13:46:05 -04:00
spi dm: spi: Read default speed and mode values from DT 2016-07-09 20:16:34 +05:30
spmi spmi: Fix sandbox spmi driver memory corruption 2016-04-11 20:48:22 -04:00
thermal Fix various typos, scattered over the code. 2016-05-05 21:39:26 -04:00
timer Merge git://git.denx.de/u-boot-dm 2016-03-14 19:21:44 -04:00
tpm drivers/tpm/tpm_tis_sandbox.c: Fix uninitialized variable use 2016-04-15 08:14:37 -06:00
twserial drivers: convert makefiles to Kbuild style 2013-10-31 13:26:01 -04:00
usb Merge branch 'master' of git://git.denx.de/u-boot-usb 2016-07-01 22:35:20 -04:00
video Merge branch 'master' of git://git.denx.de/u-boot-tegra 2016-07-06 15:55:36 -04:00
watchdog imx_watchdog: always set minimal timeout in reset_cpu 2016-01-07 17:54:53 +01:00
Kconfig Add a reset driver framework/uclass 2016-06-19 17:05:55 -06:00
Makefile Add a reset driver framework/uclass 2016-06-19 17:05:55 -06:00