aboutsummaryrefslogtreecommitdiffstats
path: root/roms/u-boot/doc/SPI
diff options
context:
space:
mode:
Diffstat (limited to 'roms/u-boot/doc/SPI')
-rw-r--r--roms/u-boot/doc/SPI/README.altera_spi6
-rw-r--r--roms/u-boot/doc/SPI/README.ftssp010_spi_test41
-rw-r--r--roms/u-boot/doc/SPI/README.sandbox-spi42
-rw-r--r--roms/u-boot/doc/SPI/README.sh_qspi_test38
-rw-r--r--roms/u-boot/doc/SPI/README.ti_qspi_am43x_test76
-rw-r--r--roms/u-boot/doc/SPI/README.ti_qspi_dra_test47
-rw-r--r--roms/u-boot/doc/SPI/README.ti_qspi_flash47
-rw-r--r--roms/u-boot/doc/SPI/status.txt32
8 files changed, 329 insertions, 0 deletions
diff --git a/roms/u-boot/doc/SPI/README.altera_spi b/roms/u-boot/doc/SPI/README.altera_spi
new file mode 100644
index 000000000..b07449f80
--- /dev/null
+++ b/roms/u-boot/doc/SPI/README.altera_spi
@@ -0,0 +1,6 @@
+SoCFPGA EPCS/EPCQx1 mini howto:
+- Instantiate EPCS/EPCQx1 Serial flash controller in QSys and rebuild
+- The controller base address is the "Base" in QSys + 0x400
+- Set MSEL[4:0]=10010 (AS Standard)
+- Load the bitstream into FPGA, enable bridges
+- Only then will the driver work
diff --git a/roms/u-boot/doc/SPI/README.ftssp010_spi_test b/roms/u-boot/doc/SPI/README.ftssp010_spi_test
new file mode 100644
index 000000000..1d86f3623
--- /dev/null
+++ b/roms/u-boot/doc/SPI/README.ftssp010_spi_test
@@ -0,0 +1,41 @@
+SPI Flash test on Faraday A369 EVB:
+==================================
+
+U-Boot 2014.01-rc2-g3444b6f (Dec 20 2013 - 10:58:40)
+
+CPU: FA626TE 528 MHz
+AHB: 132 MHz
+APB: 66 MHz
+I2C: ready
+DRAM: 256 MiB
+MMU: on
+NAND: 512 MiB
+MMC: ftsdc010: 0
+*** Warning - bad CRC, using default environment
+
+In: serial
+Out: serial
+Err: serial
+Net: FTGMAC100#0
+Hit any key to stop autoboot: 0
+=> sf probe 0:0
+SF: Detected MX25L1605D with page size 256 Bytes, erase size 64 KiB, total 2 MiB
+=> sf read 0x10800000 0 0x400
+SF: 1024 bytes @ 0x0 Read: OK
+=> md 0x10800000
+10800000: ea000013 e59ff014 e59ff014 e59ff014 ................
+10800010: e59ff014 e59ff014 e59ff014 e59ff014 ................
+10800020: 1ff7b0c0 1ff7b120 1ff7b180 1ff7b1e0 .... ...........
+10800030: 1ff7b240 1ff7b2a0 1ff7b300 deadbeef @...............
+10800040: 10800000 0002c1f0 0007409c 00032048 .........@..H ..
+10800050: 1fd6af40 e10f0000 e3c0001f e38000d3 @...............
+10800060: e129f000 eb000001 eb000223 e12fff1e ..).....#...../.
+10800070: e3a00000 ee070f1e ee080f17 ee070f15 ................
+10800080: ee070f9a ee110f10 e3c00c03 e3c00087 ................
+10800090: e3c00a02 e3800002 e3800a01 ee010f10 ................
+108000a0: e1a0c00e eb007a68 e1a0e00c e1a0f00e ....hz..........
+108000b0: e1a00000 e1a00000 e1a00000 e1a00000 ................
+108000c0: e51fd078 e58de000 e14fe000 e58de004 x.........O.....
+108000d0: e3a0d013 e169f00d e1a0e00f e1b0f00e ......i.........
+108000e0: e24dd048 e88d1fff e51f20a0 e892000c H.M...... ......
+108000f0: e28d0048 e28d5034 e1a0100e e885000f H...4P..........
diff --git a/roms/u-boot/doc/SPI/README.sandbox-spi b/roms/u-boot/doc/SPI/README.sandbox-spi
new file mode 100644
index 000000000..f6a55fe78
--- /dev/null
+++ b/roms/u-boot/doc/SPI/README.sandbox-spi
@@ -0,0 +1,42 @@
+Sandbox SPI/SPI Flash Implementation
+====================================
+
+U-Boot supports SPI and SPI flash emulation in sandbox. This must be enabled
+via a device tree.
+
+For example:
+
+ spi@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0 1>;
+ compatible = "sandbox,spi";
+ cs-gpios = <0>, <&gpio_a 0>;
+ spi.bin@0 {
+ reg = <0>;
+ compatible = "spansion,m25p16", "jedec,spi-nor";
+ spi-max-frequency = <40000000>;
+ sandbox,filename = "spi.bin";
+ };
+ };
+
+Supported chips are W25Q16 (2MB), W25Q32 (4MB) and W25Q128 (16MB). Once
+U-Boot it started you can use 'sf' commands as normal. For example:
+
+$ dd if=/dev/zero of=spi.bin bs=1M count=2
+$ u-boot -T
+
+Since the SPI bus is fully implemented as well as the SPI flash connected to
+it, you can also use low-level SPI commands to access the flash. For example
+this reads the device ID from the emulated chip:
+
+=> sspi 0 32 9f
+SF: Detected m25p16 with page size 256 Bytes, erase size 64 KiB, total 2 MiB
+FF202015
+
+
+Simon Glass
+sjg@chromium.org
+7/11/2013
+Note that the sandbox SPI implementation was written by Mike Frysinger
+<vapier@gentoo.org>.
diff --git a/roms/u-boot/doc/SPI/README.sh_qspi_test b/roms/u-boot/doc/SPI/README.sh_qspi_test
new file mode 100644
index 000000000..8a33fec32
--- /dev/null
+++ b/roms/u-boot/doc/SPI/README.sh_qspi_test
@@ -0,0 +1,38 @@
+-------------------------------------------------
+ Simple steps used to test the SH-QSPI at U-Boot
+-------------------------------------------------
+
+#0, Currently, SH-QSPI is used by lager board (Renesas ARM SoC R8A7790)
+ and koelsch board (Renesas ARM SoC R8A7791). These boot from SPI ROM
+ basically. Thus, U-Boot start, SH-QSPI will is operating normally.
+
+#1, build U-Boot and load u-boot.bin
+
+ => tftpboot 40000000 u-boot.bin
+ sh_eth Waiting for PHY auto negotiation to complete.. done
+ sh_eth: 100Base/Half
+ Using sh_eth device
+ TFTP from server 192.168.169.1; our IP address is 192.168.169.79
+ Filename 'u-boot.bin'.
+ Load address: 0x40000000
+ Loading: ############
+ 2.5 MiB/s
+ done
+ Bytes transferred = 175364 (2ad04 hex)
+
+#2, Commands to erase/write u-boot to flash device
+
+ Note: This method is description of the lager board. If you want to use the
+ other boards, please change the value according to each environment.
+
+ => sf probe 0
+ SF: Detected S25FL512S_256K with page size 512 Bytes, erase size 64 KiB, total 64 MiB
+ => sf erase 80000 40000
+ SF: 262144 bytes @ 0x80000 Erased: OK
+ => sf write 40000000 80000 175364
+ SF: 1528676 bytes @ 0x80000 Written: OK
+ =>
+
+#3, Push reset button.
+
+ If you're written correctly and driver works properly, U-Boot starts.
diff --git a/roms/u-boot/doc/SPI/README.ti_qspi_am43x_test b/roms/u-boot/doc/SPI/README.ti_qspi_am43x_test
new file mode 100644
index 000000000..8fbf10b57
--- /dev/null
+++ b/roms/u-boot/doc/SPI/README.ti_qspi_am43x_test
@@ -0,0 +1,76 @@
+Testing details-
+----------------
+
+This doc simply illustrated the testing details of qspi flash
+driver with Macronix M25L51235 flash device.
+
+The test includes
+- probing the flash device
+- erasing the flash device
+- Writing to flash
+- Reading the contents of the flash.
+
+Test Log
+--------
+
+Hit any key to stop autoboot: 0
+U-Boot# sf probe 0
+SF: Detected MX25L51235F with page size 256 Bytes, erase size 64 KiB, total 64 MiB, mapped at 30000000
+U-Boot# sf erase 0 0x80000
+SF: 524288 bytes @ 0x0 Erased: OK
+U-Boot# mw 81000000 0xdededede 0x40000
+U-Boot# sf write 81000000 0 0x40000
+SF: 262144 bytes @ 0x0 Written: OK
+U-Boot# sf read 82000000 0 0x40000
+SF: 262144 bytes @ 0x0 Read: OK
+U-Boot# md 0x82000000
+82000000: dededede dededede dededede dededede ................
+82000010: dededede dededede dededede dededede ................
+82000020: dededede dededede dededede dededede ................
+82000030: dededede dededede dededede dededede ................
+82000040: dededede dededede dededede dededede ................
+82000050: dededede dededede dededede dededede ................
+82000060: dededede dededede dededede dededede ................
+82000070: dededede dededede dededede dededede ................
+82000080: dededede dededede dededede dededede ................
+82000090: dededede dededede dededede dededede ................
+820000a0: dededede dededede dededede dededede ................
+820000b0: dededede dededede dededede dededede ................
+820000c0: dededede dededede dededede dededede ................
+820000d0: dededede dededede dededede dededede ................
+820000e0: dededede dededede dededede dededede ................
+820000f0: dededede dededede dededede dededede ................
+U-Boot# md 0x82010000
+82010000: dededede dededede dededede dededede ................
+82010010: dededede dededede dededede dededede ................
+82010020: dededede dededede dededede dededede ................
+82010030: dededede dededede dededede dededede ................
+82010040: dededede dededede dededede dededede ................
+82010050: dededede dededede dededede dededede ................
+82010060: dededede dededede dededede dededede ................
+82010070: dededede dededede dededede dededede ................
+82010080: dededede dededede dededede dededede ................
+82010090: dededede dededede dededede dededede ................
+820100a0: dededede dededede dededede dededede ................
+820100b0: dededede dededede dededede dededede ................
+820100c0: dededede dededede dededede dededede ................
+820100d0: dededede dededede dededede dededede ................
+820100e0: dededede dededede dededede dededede ................
+820100f0: dededede dededede dededede dededede ................
+U-Boot# md 0x82030000
+82030000: dededede dededede dededede dededede ................
+82030010: dededede dededede dededede dededede ................
+82030020: dededede dededede dededede dededede ................
+82030030: dededede dededede dededede dededede ................
+82030040: dededede dededede dededede dededede ................
+82030050: dededede dededede dededede dededede ................
+82030060: dededede dededede dededede dededede ................
+82030070: dededede dededede dededede dededede ................
+82030080: dededede dededede dededede dededede ................
+82030090: dededede dededede dededede dededede ................
+820300a0: dededede dededede dededede dededede ................
+820300b0: dededede dededede dededede dededede ................
+820300c0: dededede dededede dededede dededede ................
+820300d0: dededede dededede dededede dededede ................
+820300e0: dededede dededede dededede dededede ................
+820300f0: dededede dededede dededede dededede ................
diff --git a/roms/u-boot/doc/SPI/README.ti_qspi_dra_test b/roms/u-boot/doc/SPI/README.ti_qspi_dra_test
new file mode 100644
index 000000000..e89f53587
--- /dev/null
+++ b/roms/u-boot/doc/SPI/README.ti_qspi_dra_test
@@ -0,0 +1,47 @@
+-------------------------------------------------
+ Simple steps used to test the QSPI at U-Boot
+-------------------------------------------------
+
+For #1, build the patched U-Boot and load MLO/u-boot.img
+
+----------------------------------
+Boot from another medium like MMC
+----------------------------------
+
+U-Boot# mmc dev 0
+mmc0 is current device
+U-Boot# fatload mmc 0 0x82000000 MLO
+reading MLO
+55872 bytes read in 8 ms (6.7 MiB/s)
+U-Boot# fatload mmc 0 0x83000000 u-boot.img
+reading u-boot.img
+248600 bytes read in 19 ms (12.5 MiB/s)
+
+--------------------------------------------------
+Commands to erase/write u-boot/mlo to flash device
+--------------------------------------------------
+U-Boot# sf probe 0
+SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB, mapped at 5c000000
+U-Boot# sf erase 0 0x10000
+SF: 65536 bytes @ 0x0 Erased: OK
+U-Boot# sf erase 0x20000 0x10000
+SF: 65536 bytes @ 0x20000 Erased: OK
+U-Boot# sf erase 0x30000 0x10000
+SF: 65536 bytes @ 0x30000 Erased: OK
+U-Boot# sf erase 0x40000 0x10000
+SF: 65536 bytes @ 0x40000 Erased: OK
+U-Boot# sf erase 0x50000 0x10000
+SF: 65536 bytes @ 0x50000 Erased: OK
+U-Boot# sf erase 0x60000 0x10000
+SF: 65536 bytes @ 0x60000 Erased: OK
+U-Boot# sf write 82000000 0 0x10000
+SF: 65536 bytes @ 0x0 Written: OK
+U-Boot# sf write 83000000 0x20000 0x60000
+SF: 393216 bytes @ 0x20000 Written: OK
+
+For #2, set sysboot to QSPI-1 boot mode(SYSBOOT[5:0] = 100110) and power
+on. ROM should find the GP header at offset 0 and load/execute SPL. SPL
+then detects that ROM was in QSPI-1 mode (boot code 10) and attempts to
+find a U-Boot image header at offset 0x20000 (set in the config file)
+and proceeds to load that image using the U-Boot image payload offset/size
+from the header. It will then start U-Boot.
diff --git a/roms/u-boot/doc/SPI/README.ti_qspi_flash b/roms/u-boot/doc/SPI/README.ti_qspi_flash
new file mode 100644
index 000000000..5cc1fd03b
--- /dev/null
+++ b/roms/u-boot/doc/SPI/README.ti_qspi_flash
@@ -0,0 +1,47 @@
+QSPI U-Boot support
+------------------
+
+Host processor is connected to serial flash device via qpsi
+interface. QSPI is a kind of spi module that allows single,
+dual and quad read access to external spi devices. The module
+has a memory mapped interface which provide direct interface
+for accessing data form external spi devices.
+
+The one QSPI in the device is primarily intended for fast booting
+from Quad SPI flash devices.
+
+Usecase
+-------
+
+MLO/u-boot.img will be flashed from SD/MMC to the flash device
+using serial flash erase and write commands. Then, switch settings
+will be changed to qspi boot. Then, the ROM code will read MLO
+from the predefined location in the flash, where it was flashed and
+execute it after storing it in SDRAM. Then, the MLO will read
+u-boot.img from flash and execute it from SDRAM.
+
+SPI mode
+-------
+SPI mode uses mtd spi framework for transfer and reception of data.
+Can be used in:
+1. Normal mode: use single pin for transfers
+2. Dual Mode: use two pins for transfers.
+3. Quad mode: use four pin for transfer
+
+Memory mapped read mode
+-----------------------
+In this, SPI controller is configured using configuration port and then
+controller is switched to memory mapped port for data read.
+
+Driver
+------
+drivers/qspi/ti_qspi.c
+ - Newly created file which is responsible for configuring the
+ qspi controller and also for providing the low level api which
+ is responsible for transferring the datas from host controller
+ to flash device and vice versa.
+
+Testing
+-------
+A seperated file named README.dra_qspi_test has been created which gives all the
+details about the commands required to test qspi at U-Boot level.
diff --git a/roms/u-boot/doc/SPI/status.txt b/roms/u-boot/doc/SPI/status.txt
new file mode 100644
index 000000000..13889f545
--- /dev/null
+++ b/roms/u-boot/doc/SPI/status.txt
@@ -0,0 +1,32 @@
+Status on SPI subsystem:
+=======================
+
+SPI COMMAND (common/cmd_sf, cmd_spi):
+-
+
+SPI FLASH (drivers/mtd/spi):
+- sf_probe.c: SPI flash probing code.
+- sf_ops.c: SPI flash operations code.
+- sf.c: SPI flash interface, which interacts controller driver.
+- Bank Address Register (Accessing flashes > 16Mbytes in 3-byte addressing)
+- Added memory_mapped support for read operations.
+- Common probe support for all supported flash vendors except, ramtron.
+- Extended read commands support(dual read, dual IO read)
+- Quad Page Program support.
+- Quad Read support(quad fast read, quad IO read)
+- Dual flash connection topology support(accessing two spi flash memories with single cs)
+- Banking support on dual flash connection topology.
+
+SPI DRIVERS (drivers/spi):
+-
+
+TODO:
+- Runtime detection of spi_flash params, SFDP(if possible)
+- Add support for multibus build/accessing.
+- Need proper cleanups on spi_flash and drivers.
+
+--
+Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
+18-09-2013.
+07-10-2013.
+08-01-2014.