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>
This commit is contained in:
Sean Anderson
2020-12-22 18:57:18 -05:00
committed by Andes
parent 24c5689447
commit 8f78e52794
4 changed files with 301 additions and 52 deletions

View File

@@ -53,4 +53,20 @@ config BOARD_SPECIFIC_OPTIONS
imply CMD_GPIO
imply LED
imply LED_GPIO
imply SPI
imply DESIGNWARE_SPI
imply SPI_FLASH_GIGADEVICE
imply SPI_FLASH_WINBOND
imply DM_MTD
imply SPI_FLASH_MTD
imply CMD_MTD
imply ENV_IS_IN_SPI_FLASH
imply MMC
imply MMC_BROKEN_CD
imply MMC_SPI
imply CMD_MMC
imply DOS_PARTITION
imply EFI_PARTITION
imply CMD_PART
imply CMD_FS_GENERIC
endif