主题中讨论的其他器件: AM5716
工具与软件:
我们在边界中使用 EMIF1和 EMIF2、每个 EMIF 连接到2GB DDR。 其总容量为4GB DDR。
在5726 TRM 中、我找到了以下描述:
两个32位 DDR 控制器(EMIF1和 EMIF2)、每个控制器支持以下特性:
–通过一个芯片选择支持高达2 GiB 的存储器密度、从而提供4的总 SDRAM 空间
GIB 可通过进行寻址 MPU 扩展地址范围 .
我在 E2E 论坛中读了一些关于4GB DDR 的主题、、并在本文档中按照3.3.4.3配置了我的代码:
、我的配置为:
在 MLO&u-boot-2019中:
1. u-boot-2019.01/configs/am57xx_evm_defconfig:
CONFIG_ARMV7_LPAE=y
CONFIG_PHYS_64bit=y
2. u-boot-2019.01/include/configs/am57xx_evm.h
静态常量结构 dmm_lisa_map_REGS beagle_x15_lisa_regs ={
.dmm_las_map_0 = 0x00000000、
.dmm_las_map_1 = 0x00000000、
.dmm_las_map_2 = 0x80740300、
.dmm_las_map_3 = 0xFF020100、
.is_ma_present = 0x1
};
int dram_init_banksize (void)
{
u64 ram_size;
RAM_SIZE = 0x100000000;//board_ti_get_emif_size ();
gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
gd->bd->bi_dram[0].size = get_effect_memsize();
如果(RAM_SIZE > CONFIG_MAX_MEM_MAPPED){
gd->bd->bi_dram[1].start = 0x200000000;
gd->bd->bi_dram[1].size = ram_size - CONFIG_MAX_MEM_MAPPED;
}
返回0;
}
我从 SDK:ti-processor-sdk-linux-automotive-dra7xx-evm-6.00.00.03-installer.bin 复制以下设置
www.ti.com/.../PROCESSOR-SDK-DRA7X
const 结构 eMIF_REGS emif1_ddr3_532_MHz_1CS_2G ={
SDRAM_CONFIG_INIT = 0x61851ab2、
SDRAM_CONFIG = 0x61851ab2、
.SDRAM_CONFIG2 = 0x08000000、
.ref_ctrl = 0x000040F1、
.ref_ctrl_final = 0x00001035、
.SDRAM_tim1 = 0xCCCF36B3、
.SDRAM_tim2 = 0x30BF7FDA、
SDRAM_tim3 = 0x427F8BA8、
.read_idle_ctrl = 0x00050000、
.zq_config = 0x0007190B、
.temp_alert_config = 0x00000000、
.emif_DDR_phy_ctlr_1_init = 0x0024400B、
.emif_DDR_phy_ctlr_1 = 0x0E24400B、
.emif_DDR_ext_phy_ctrl_1 = 0x10040100、
.emif_DDR_ext_phy_ctrl_2 = 0x00910091、
.emif_DDR_ext_phy_ctrl_3 = 0x00950095、
.emif_DDR_ext_phy_ctrl_4 = 0x009B009B、
.emif_DDR_ext_phy_ctrl_5 = 0x009E009E、
.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 = 0x00000305
};
const 结构 eMIF_REGS emif2_ddr3_532_MHz_1CS_2G ={
SDRAM_CONFIG_INIT = 0x61851B32、
SDRAM_CONFIG = 0x61851B32、
.SDRAM_CONFIG2 = 0x08000000、
.ref_ctrl = 0x000040F1、
.ref_ctrl_final = 0x00001035、
.SDRAM_tim1 = 0xCCCF36B3、
SDRAM_tim2 = 0x308F7FDA、
SDRAM_tim3 = 0x427F88A8、
.read_idle_ctrl = 0x00050000、
.zq_config = 0x0007190B、
.temp_alert_config = 0x00000000、
.emif_DDR_phy_ctlr_1_init = 0x0024400B、
.emif_DDR_phy_ctlr_1 = 0x0E24400B、
.emif_DDR_ext_phy_ctrl_1 = 0x10040100、
.emif_DDR_ext_phy_ctrl_2 = 0x00910091、
.emif_DDR_ext_phy_ctrl_3 = 0x00950095、
.emif_DDR_ext_phy_ctrl_4 = 0x009B009B、
.emif_DDR_ext_phy_ctrl_5 = 0x009E009E、
.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 = 0x00000305
};
我在 emif_get_reg_dump()中使用了这些设置。
uboot 可以打印4GB 日志。
Cat /proc/meminfo 显示8GB 左右。
但是、我使用 memtester、它崩溃。 如何使4GB DDR 正常运行?