summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSean Anderson <seanga2@gmail.com>2020-12-22 18:57:18 -0500
committerAndes <uboot@andestech.com>2021-01-18 11:06:26 +0800
commit8f78e527942b81a4e1e0d20c2ee0a76daeb4e1e0 (patch)
treee64b96e6df21aa54dc60f35eafaf9693e6eb9dfe /include
parent24c5689447f00555d78c77a3629fbec32e513ba2 (diff)
downloadu-boot-8f78e527942b81a4e1e0d20c2ee0a76daeb4e1e0.tar.gz
u-boot-8f78e527942b81a4e1e0d20c2ee0a76daeb4e1e0.tar.xz
u-boot-8f78e527942b81a4e1e0d20c2ee0a76daeb4e1e0.zip
riscv: Add support for SPI on Kendryte K210
This enables configs necessary for using SPI. The environment is saved to the very end of SPI flash. This is unlikely to be overwritten unless the entire flash is reprogrammed. This also supplies a default bootcommand. It loads an image and device tree from the first partition of the MMC. This is a minimal/least effort bootcmd, so suggestions (especially in the form of patches) are welcome. I didn't set up distro boot because I think it is unlikely that any general-purpose linux distros will ever be ported to this board. Signed-off-by: Sean Anderson <seanga2@gmail.com> Tested-by: Chrstopher Obbard <obbardc@gmail.com> Reviewed-by: Rick Chen <rick@andestech.com>
Diffstat (limited to 'include')
-rw-r--r--include/configs/sipeed-maix.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/configs/sipeed-maix.h b/include/configs/sipeed-maix.h
index 36ff522e4b..08acb25075 100644
--- a/include/configs/sipeed-maix.h
+++ b/include/configs/sipeed-maix.h
@@ -24,10 +24,13 @@
#ifndef CONFIG_EXTRA_ENV_SETTINGS
#define CONFIG_EXTRA_ENV_SETTINGS \
"loadaddr=0x80060000\0" \
- "fdt_addr_r=0x80028000\0" \
+ "fdt_addr_r=0x80400000\0" \
"scriptaddr=0x80020000\0" \
"kernel_addr_r=0x80060000\0" \
- "fdtfile=kendryte/" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0"
+ "fdtfile=kendryte/" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
+ "k210_bootcmd=load mmc 0:1 $loadaddr /uImage && " \
+ "load mmc 0:1 $fdt_addr_r /k210.dtb && " \
+ "bootm $loadaddr - $fdt_addr_r\0"
#endif
#endif /* CONFIGS_SIPEED_MAIX_H */