Commit fd9752b0 authored by Yuri Tikhonov's avatar Yuri Tikhonov
Browse files

RT72064. stm3220g-eval: configuration for 16MB STM-MEM ext RAM


Signed-off-by: default avatarYuri Tikhonov <yur@emcraft.com>
parent 06fedc2a
......@@ -130,7 +130,8 @@ int dram_init(void)
int rv = 0;
#if (CONFIG_NR_DRAM_BANKS > 0)
int i;
static struct stm32f2_gpio_dsc ctrl_gpio = {8, 8};
int i;
/*
* Connect GPIOs to FSMC controller
......@@ -164,6 +165,20 @@ int dram_init(void)
STM32_FSMC->wt[i].wtr = CONFIG_SYS_FSMC_BWR;
#endif
#if defined(CONFIG_SYS_RAM_BURST)
/*
* TBD
*/
#else
/*
* Switch PSRAM in the Asyncronous Read/Write Mode
*/
rv = stm32f2_gpio_config(&ctrl_gpio, STM32F2_GPIO_ROLE_GPOUT);
if (rv != 0)
goto out;
stm32f2_gpout_set(&ctrl_gpio, 0);
#endif /* CONFIG_SYS_RAM_BURST */
/*
* Fill in global info with description of SRAM configuration
*/
......
......@@ -111,15 +111,16 @@
#define CONFIG_SYS_MALLOC_LEN CONFIG_MEM_MALLOC_LEN
/*
* Configuration of the external memory:
* 2MB SRAM connected to CS2 of Bank1 (NOR/PSRAM)
* Configuration of the external memory
*/
#define CONFIG_NR_DRAM_BANKS 1
#define CONFIG_SYS_RAM_SIZE (2 * 1024 * 1024)
#define CONFIG_SYS_RAM_SIZE (16 * 1024 * 1024)
#define CONFIG_SYS_RAM_CS 2
#define CONFIG_SYS_FSMC_BCR 0x00001011
#define CONFIG_SYS_FSMC_BTR 0x00010200
#undef CONFIG_SYS_FSMC_BWR
#undef CONFIG_SYS_RAM_BURST
#define CONFIG_SYS_FSMC_BCR 0x00005059
#define CONFIG_SYS_FSMC_BTR 0x100106F2
#define CONFIG_SYS_FSMC_BWR 0x100107F2
#define CONFIG_SYS_RAM_BASE (0x60000000 + \
((CONFIG_SYS_RAM_CS - 1) * 0x4000000))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment