summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorThomas Skibo <thomas-git@skibo.net>2021-11-25 01:32:09 +0300
committerLeo Yu-Chi Liang <ycliang@andestech.com>2021-12-02 11:43:56 +0300
commit6a863894ad53b2d0e6c6d47ad105850053757fec (patch)
tree6b3c388872fce40712b633a34f8beab04e3d76e1 /doc
parentffb78a7c71d555be31c8f8f2bb0fcc2fcfe3892e (diff)
downloadu-boot-6a863894ad53b2d0e6c6d47ad105850053757fec.tar.xz
riscv: Support booting SiFive Unmatched from SPI.
Configure SPI flash devices into SPL. Add SPI boot option to spl.c. Document how to format flash for booting. Signed-off-by: Thomas Skibo <thomas-git@skibo.net> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/board/sifive/unmatched.rst31
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/board/sifive/unmatched.rst b/doc/board/sifive/unmatched.rst
index 6b024f07f6..b52a1f690c 100644
--- a/doc/board/sifive/unmatched.rst
+++ b/doc/board/sifive/unmatched.rst
@@ -534,3 +534,34 @@ Sample boot log from HiFive Unmatched board
OpenEmbedded nodistro.0 unmatched ttySIF0
unmatched login:
+
+
+Booting from SPI
+----------------
+
+Use Building steps from "Booting from uSD using U-Boot SPL" section.
+
+Partition the SPI in Linux via mtdblock. The partition types here are
+"HiFive Unleashed FSBL", "HiFive Unleashed BBL", and "U-Boot environment"
+for partitions one through three respectively.
+
+.. code-block:: none
+
+ sgdisk --clear -a 1 \
+ --new=1:40:2087 --change-name=1:spl --typecode=1:5B193300-FC78-40CD-8002-E86C45580B47 \
+ --new=2:2088:10279 --change-name=2:uboot --typecode=2:2E54B353-1271-4842-806F-E436D6AF6985 \
+ --new=3:10280:10535 --change-name=3:env --typecode=3:3DE21764-95BD-54BD-A5C3-4ABE786F38A8 \
+ /dev/mtdblock0
+
+Write U-boot SPL and U-boot to their partitions.
+
+.. code-block:: none
+
+ dd if=u-boot-spl.bin of=/dev/mtdblock0 bs=4096 seek=5 conv=sync
+ dd if=u-boot.itb of=/dev/mtdblock0 bs=4096 seek=261 conv=sync
+
+Power off the board.
+
+Change DIP switches MSEL[3:0] to 0110.
+
+Power up the board.