From 7b1a50b7b660232196a5250ccaf6aa560944865d Mon Sep 17 00:00:00 2001 From: rick Date: Mon, 28 Aug 2017 15:13:09 +0800 Subject: nds32: board: Support SPI driver. Add spi dts node and enable spi dm flash config. Signed-off-by: rick --- include/configs/adp-ae3xx.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/configs/adp-ae3xx.h b/include/configs/adp-ae3xx.h index 4378df502c1..69460293330 100644 --- a/include/configs/adp-ae3xx.h +++ b/include/configs/adp-ae3xx.h @@ -220,14 +220,25 @@ /* max number of sectors on one chip */ #define CONFIG_FLASH_SECTOR_SIZE (0x10000*2) -#define CONFIG_ENV_SECT_SIZE CONFIG_FLASH_SECTOR_SIZE #define CONFIG_SYS_MAX_FLASH_SECT 512 /* environments */ -#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + 0x140000) +#define CONFIG_ENV_SPI_BUS 0 +#define CONFIG_ENV_SPI_CS 0 +#define CONFIG_ENV_SPI_MAX_HZ 50000000 +#define CONFIG_ENV_SPI_MODE 0 +#define CONFIG_ENV_SECT_SIZE 0x1000 +#define CONFIG_ENV_OFFSET 0x140000 #define CONFIG_ENV_SIZE 8192 #define CONFIG_ENV_OVERWRITE + +/* SPI FLASH */ +#define CONFIG_SF_DEFAULT_BUS 0 +#define CONFIG_SF_DEFAULT_CS 0 +#define CONFIG_SF_DEFAULT_SPEED 1000000 +#define CONFIG_SF_DEFAULT_MODE 0 + /* * For booting Linux, the board info and command line data * have to be in the first 16 MB of memory, since this is -- cgit v1.3.1