Commit 0c5e26e7 authored by H. Nikolaus Schaller's avatar H. Nikolaus Schaller

Pyra/LC15: add 4GB DRAM config option

DRAM timings provided by Matthijs van Duin <matthijsvanduin@gmail.com>
Signed-off-by: default avatarH. Nikolaus Schaller <hns@goldelico.com>
parent be096ca0
......@@ -9,4 +9,7 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "letux_cortex15"
config DUAL_RANK_DDR3
bool "Dual-rank memory (4GB)"
endif
......@@ -24,6 +24,62 @@ const struct omap_sysinfo sysinfo = {
#undef board_mmc_init
#undef misc_init_r
#include <asm/emif.h>
#ifdef CONFIG_DUAL_RANK_DDR3
/* also known as "4GB RAM CPU board"
*
* If somehow possible, we should try to auto-detect the RAM size and
* choose 2GB or 4GB automatically.
*
* NOTE: please run a kernel with LPAE enabled to make use of the 4GB RAM!
*/
const struct emif_regs emif_regs_ddr3_532_mhz_2cs_es2 = {
.sdram_config_init = 0x61851B3A,
.sdram_config = 0x61851B3A,
.sdram_config2 = 0x0,
.ref_ctrl = 0x00001035,
.sdram_tim1 = 0xCCCF36B3,
.sdram_tim2 = 0x308F7FDA,
.sdram_tim3 = 0x027F88A8,
.read_idle_ctrl = 0x00050000,
.zq_config = 0xD007190B,
.temp_alert_config = 0x00000000,
.emif_ddr_phy_ctlr_1_init = 0x0030400A,
.emif_ddr_phy_ctlr_1 = 0x0034400A,
.emif_ddr_ext_phy_ctrl_1 = 0x04040100,
.emif_ddr_ext_phy_ctrl_2 = 0x00000000,
.emif_ddr_ext_phy_ctrl_3 = 0x00000000,
.emif_ddr_ext_phy_ctrl_4 = 0x00000000,
.emif_ddr_ext_phy_ctrl_5 = 0x4350D435,
.emif_rd_wr_lvl_rmp_win = 0x00000000,
.emif_rd_wr_lvl_rmp_ctl = 0x80000000,
.emif_rd_wr_lvl_ctl = 0x00000000,
.emif_rd_wr_exec_thresh = 0x40000305
};
void emif_get_reg_dump(u32 emif_nr, const struct emif_regs **regs)
{
*regs = &emif_regs_ddr3_532_mhz_2cs_es2;
}
void dram_init_banksize(void)
{ /* make U-Boot pass the same as bootarg "mem=2032M@0x80000000 mem=2048M@0x200000000" would do */
gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; // == 0x80000000
gd->bd->bi_dram[0].size = 2032*(1024UL*1024); // first 2GB
gd->bd->bi_dram[1].start = 0x200000000UL;
gd->bd->bi_dram[1].size = 2048*(1024UL*1024); // second 2GB
#if 0 // get back "stolen" memory
gd->bd->bi_dram[1].start = 0x2FF000000UL;
gd->bd->bi_dram[1].size = 2064*(1024UL*1024);
#endif
/* report 4 GB during boot */
gd->ram_size = gd->bd->bi_dram[0].size + gd->bd->bi_dram[1].size;
}
#endif
/*
* Board Revision Detection
*
......
......@@ -9,4 +9,7 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "pandora_pyra_lc15"
config DUAL_RANK_DDR3
bool "Dual-rank memory (4GB)"
endif
CONFIG_ARM=y
CONFIG_ARMV7_LPAE=y
CONFIG_OMAP54XX=y
# CONFIG_SPL_NAND_SUPPORT is not set
CONFIG_TARGET_LETUX_CORTEX15=y
CONFIG_SYS_CONSOLE_INFO_QUIET=y
CONFIG_VERSION_VARIABLE=y
CONFIG_SPL=y
CONFIG_SPL_OS_BOOT=y
CONFIG_HUSH_PARSER=y
CONFIG_CMD_BOOTZ=y
# CONFIG_CMD_IMLS is not set
CONFIG_CMD_ASKENV=y
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_MMC=y
CONFIG_CMD_SPI=y
CONFIG_CMD_I2C=y
CONFIG_CMD_USB=y
CONFIG_CMD_DFU=y
CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
CONFIG_DFU_MMC=y
CONFIG_DFU_RAM=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_DWC3=y
CONFIG_USB_DWC3_GADGET=y
CONFIG_USB_DWC3_OMAP=y
CONFIG_USB_DWC3_PHY_OMAP=y
CONFIG_USB_STORAGE=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_G_DNL_MANUFACTURER="Goldelico"
CONFIG_G_DNL_PRODUCT="Letux Cortex 15"
CONFIG_G_DNL_VENDOR_NUM=0x0403
CONFIG_G_DNL_PRODUCT_NUM=0xbd00
CONFIG_OF_LIBFDT=y
CONFIG_CMD_MEMTEST=y
CONFIG_SATA_BOOT=y
CONFIG_CMD_MEMINFO=y
CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_CMD_CACHE=y
CONFIG_DUAL_RANK_DDR3=y
CONFIG_PHYS_64BIT=y
\ No newline at end of file
CONFIG_ARM=y
CONFIG_OMAP54XX=y
CONFIG_ARMV7_LPAE=y
# CONFIG_SPL_NAND_SUPPORT is not set
CONFIG_TARGET_PYRA_LC15=y
CONFIG_SYS_CONSOLE_INFO_QUIET=y
CONFIG_VERSION_VARIABLE=y
CONFIG_SPL=y
CONFIG_SPL_OS_BOOT=y
CONFIG_HUSH_PARSER=y
CONFIG_CMD_BOOTZ=y
# CONFIG_CMD_IMLS is not set
CONFIG_CMD_ASKENV=y
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_MMC=y
CONFIG_CMD_SPI=y
CONFIG_CMD_I2C=y
CONFIG_CMD_USB=y
CONFIG_CMD_DFU=y
CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
CONFIG_DFU_MMC=y
CONFIG_DFU_RAM=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_DWC3=y
CONFIG_USB_DWC3_GADGET=y
CONFIG_USB_DWC3_OMAP=y
CONFIG_USB_DWC3_PHY_OMAP=y
CONFIG_USB_STORAGE=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_G_DNL_MANUFACTURER="OpenPandora"
CONFIG_G_DNL_PRODUCT="Dragonbox Pyra"
CONFIG_G_DNL_VENDOR_NUM=0x0403
CONFIG_G_DNL_PRODUCT_NUM=0xbd00
CONFIG_OF_LIBFDT=y
CONFIG_CMD_MEMTEST=y
CONFIG_CMD_TCA642X=y
CONFIG_SATA_BOOT=y
CONFIG_CMD_MEMINFO=y
CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_CMD_CACHE=y
CONFIG_DUAL_RANK_DDR3=y
CONFIG_PHYS_64BIT=y
\ No newline at end of file
......@@ -30,6 +30,11 @@
#undef CONFIG_ENV_OFFSET
#endif
#ifdef CONFIG_DUAL_RANK_DDR3
#undef CONFIG_NR_DRAM_BANKS
#define CONFIG_NR_DRAM_BANKS 2
#endif
/* should this better go to omap5_uevm? */
#ifdef CONFIG_USB_GADGET
......
Markdown is supported
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