工具/软件:Linux
您好!
我正在使用4GB DDR、每个 EMIF 接口2GB 进行定制设计。 但在 uboot 和内核中仅显示2GB。
SDK - AM57x PSDK 3.01.00.06:
我正在参考一些 e2e 线程:
https://e2e.ti.com/support/embedded/linux/f/354/p/561709/2060012#2060012
https://e2e.ti.com/support/arm/sitara_arm/f/791/t/464238
https://e2e.ti.com/support/arm/automotive_processors/f/1020/t/552861
根据我使用 Excel 计算的 DDR 表、我在 u-boot 中对 Lisa 和时序进行了更改。 并更新"board/ti/am57xx/board.c"
有人提到、我需要执行以下步骤:
- 在内核中启用 ARM LPAE 支持
- 配置 MPU 存储器适配器以启用高内存交错
- 配置 MPU 存储器适配器/DMM LISA 映射部分
我已更新 Lisa 并在内核中启用 LPAE 支持、但我将如何启用"MPU 内存适配器以启用高内存交错"
我还缺少什么? 我是否需要更改基址并参考 "board/ti/dra7xx/evm.c"
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
索引7165ef8..484da100644
-- a/board/ti/am57xx/board.c
++ b/board/ti/am57xx/board.c
@@@@
/common/board_detect.h
@@@@-34,6a ("+ ti_review_en_board")+#b576_define_b (#xti_review_review_br/br/br576_en_en_board.x (#xt_review_br_en_br_en_br_br/en_board.x)+#xtex_br/en_en_en_en_br_br/br/en_board.x (#xt_br_br_br/en_en_en_en_board.x (#xt_br/board.x)+#x15)+#xtex_br_br/en_review_en_en_en_br_br/board.x (#xt_br_br/#/#/
Board_ti_get_emif1_size ()+ \
+ Board_ti_get_emif2_size ()
+
#ifdef CONFIG_DRIVER_TI_CPSW
#include
#endif
@@-74、17 + 78、24 @@ const struct omap_sysinfo sysinfo ={
};
静态 const struct DMM_LISA 映射_regs beagle_x15_LISA regs ={
-.DMM_LISA 映射_3 = 0x80740300、
-.is_ma_present = 0x1
+ DMM_0XISA + DM0_map =
0x000_LISA + DM0XISA + DM0_MA_TO_0XO
= 0x80740300 = 0x80740M + DM0_MA_TO_TO_0_0_0_0_0_0XMA = 0x1 + DM0_LISA + DM0_MA_MA_MAP = 0xM_LISA
静态副本
(struct dm_lisa_map_regs am571x_idk_lisa_regs ={-.dm_lisa_map_3 = 0x80640100、-.is_ma_present = 0x1 +.dm_lis_map_0 = 0x0、+.dm_zi_ram_1 = 0x806_m_g++ 0x000_gun_gi_m_es+ 0x000_gi_und_m_es+ 0x000_g_gi_gi_es+ 0x000+ 0x000_gm_gi_es++ 0x000+ 0x000_und_m_gam_gi_gi_gi_m_es+ 0x000+ 0x000+ 0x000+ 0x000+ 0x000_gi_z_gi_gi_gi_gi_0_m_m_m_gi_m_z_gi_0+= 0x000+ 0x000+ 0x000+ 0x000+ 0x000+ 0x000+ 0x000+ 0x000+ 0x000+ 0x000+ 0x000+
else
@@-92,28 +103,50 @@ void EMIF_GET_DMM_regs (const struct DMM_LISA map_regs ** DMM_LISA regs)
}
static const struct EMIF_regs beagle_x15_emif1_DDR3_532mhz_EMIF_regs ={
- 0x00002_SDRAM =0x0001_1.0x0002_SDRAM
= 0x0002_1.0002_1.0x0002_SDRAM
= 0x0002_1.0002_1.0001.0002_1.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.0001.00
-.sdRAM_tim1= 0xcccf36ab、
-.sdRAM_tim2= 0x308f7fda、
-.SDRAM_tim3= 0x409f88a8、
+.SDRAM_tim1= 0xCEEF266B、
+.SDRAM_tim2= 0x30BF7FDA、
+.SDRAM_tim3= 0x407F8BA_000b
、0x0000_1000 = 0x0000_mif_cr
= 0x400b_emb_ex_b_1000
、0x400b_emb_ex_emb_1000 = 0x400b_emb_1000 = 0x400b_emb_1000 mif_1000 = 0x000b_1000 mif_1000、0x000b_1000 mif_1000 mif_1000 mif_1000 = 0x000b_1000 mif_1000 mif_1000
= 0x000b_1000 mif_1000 mif_1000
-.EMIF_DDR_ext_phy_Ctrl_2= 0x00910091、
-.EMIF_DDR_ext_phy_Ctrl_3 = 0x00950095、
-.EMIF_DDR_ext_phy_CTRL_4 = 0x009b009b、
-.EMIF_DDR_ext_CTRL_5= 0x006nif_mIF_mIF_0_mIF_bx0_mif_mif_mif_mif_0_mif_r_0_mif_mif_r_mif_0_mif_mif_r_mif_r_00x00_mif_mif_0_mif_mif_mif_0_mif_r_r_mif_r_mif_mif_r_0_mif_mif_r_mif_mif_r_00x0017_mif_mif_mif_0_mif_mif_0_mif_mif_0_mif_mif_mif_mif_r_0_0_
.EMIF_rd_wr_lvl_ctl= 0x00000000、
-.EMIF_rd_wr_exec_thresh= 0x00000305
+.EMIF_rd_wr_exec_thresh= 0x00000305*/
+ SDRAM_CONFIG_INIT = 0x61851ab2、
+ SDRAM_CONFIG = 0x61851ab2、
+ SDRAM_CONFIG2 = 0x080000
、+ .ref_ctrl = 0x000040F1、
+ .ref_ctrl_final = 0x00001035、
+ SDRAM_TIM1. = 0xCCCF36B3、
+ SDRAM_TIT2 = 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 = 0x8000000
、+ .EMIF_rd_wr_lvl_ctl = 0x00000000
、+ .EMIF_rd_wr_exec_thresh = 0x00000305
};
/*外部 phy ctrl regs 1-35 */
@@-156、7 + 189、30 @@静态 const u32 beagle_x15_emif1_DDR3_ext_phy_ctrl_const_regs[]={
};
静态 const struct EMIF_regs beagle_x15_emif2_sdRAM_e32_bx32_bs_drgm_b32_bx32_bs_drgm_gm_gm_gr_bx32_gm_gm_gm_bx32_gm_gr
SDRAM_CONFIG_INIT = 0x61873BB2
、+ SDRAM_CONFIG = 0x61873BB2
、+ SDRAM_CONFIG2 = 0x00000000
、+ .ref_ctrl = 0x000040F1、
+ .ref_ctrl_final = 0x00001035、
+ SDRAM_TIM1. = 0xCEEF266B、
+ SDRAM_TIT2 = 0x30BF7FDA、
+ SDRAM_TIM3. = 0x407F8BA8、
+ read_idle_ctrl = 0x00050000
、+ zq_config = 0x5007190B
、+ temp_alert_config = 0x00000000
、+ .EMIF_DDR_phy_ctlr_1_init = 0x0024400F
、+ .EMIF_DDR_phy_ctlr_1 = 0x0E24400F
、+ .EMIF_DDR_ext_phy_Ctrl_1 = 0x04040100
、+ .EMIF_DDR_ext_phy_Ctrl_2 = 0x006B009B
、+ .EMIF_DDR_ext_phy_Ctrl_3 = 0x006B009A
、+ .EMIF_DDR_ext_phy_Ctrl_4 = 0x006B0091
、+ .EMIF_DDR_ext_phy_Ctrl_5 = 0x006B0090
、+ .EMIF_RD_EV_LVL_RMP_WIN = 0x00000000
、+ .EMIF_rd_wr_lvl_RMP_ctl = 0x8000000
、+ .EMIF_rd_wr_lvl_ctl = 0x00000000
、+ .EMIF_rd_wr_exec_THRESH = 0x00000305
+*/
+/*.SDRAM_CONFIG_INIT= 0x61851b32、
.SDRAM_CONFIG= 0x61851b32、
.SDRAM_CONFIG2= 0x08000000、
.ref_trl_emif_rmif_rmif_r_rmif_r_rmif_r_r_mif_r_mif_mif_r_mif_r_r_mif_r_mif_r_r_mif_r_mif_r_r_mif_r_mif_r_r_mif_r_r_mif_r_r_mif_r_mif_r_r_mif_r_r_mif_r_mif_r_r_mif_r_mif_r_mif_r_r_mif_r_r_mif_r_r_mif_r_r_mif_r_r
@@@@
SDRAM_CONFIG_INIT = 0x61851B32
、+ SDRAM_CONFIG = 0x61851B32
、+ SDRAM_CONFIG2 = 0x080000
、+ .ref_ctrl = 0x000040F1、
+ .ref_ctrl_final = 0x00001035、
+ SDRAM_TIM1. = 0xCCCF36B3、
+ SDRAM_TIT2 = 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 = 0x8000000
、+ .EMIF_rd_wr_lvl_ctl = 0x00000000
、+ .EMIF_rd_wr_exec_thresh = 0x00000305
+
};
静态 const u32 beagle_x15_emif2_ddr3_ext_phy_ctrl_const_regs[]={
@@-218、8 +297、26 @@静态 const u32 beagle_x15_emif2_ddr3_ext_ctrl_const_regs[]={+
}+ void
++++++ degbund_++++++++ dunbanks+(%banks++++++++++) void ++++ degbanksbanks+
u64 ram_size;
+
+ RAM_SIZE = board_ti_get_EMIF_size ();
+
gD->bD->bi_dram[0].start = CONFIG_SYS_SDRAM_base;
+ gD->bD->bi_dram[0].size = get_effective memsize();
+ if (ram_size > CONFIG_MAX_MEM_MAPPED){
+printf ("+++Zeiss debug %s Line %d "、__func__、__line__);*/
+/* gD->bD->bi_dram[1].start = 0x200000000;
+ gd->bd->bi_dram[1].size = ram_size - CONFIG_MAX_MEM_MAPPED;
+}
+}*/
+
void EMIF_get_reg_dump (u32 EMIF_nr、const struct EMIF_regs ** regs)
{
+printf ("++++Zeiss debug %s Line %d \n"、__func__、__line__);
switch (EMIF_nr){
case 1:
*eMIF_reg32s_eifs_magle_magle_gr;
@@-232,6+329,7 @@ void EMIF_get_reg_dump (u32 EMIF_nr、const 结构 EMIF_regs ** regs)
void EMIF_get_ext_phy_ctrl_const_regs (u32 EMIF_nr、const u32 ** regs、u32 *大小)
{
++++++ translation_rebe_ctrl_nr、conxnr、connr、conxnr、conxnr、conxn_en_en_enu_ce_cr、connr、connr、connr、connr、conv_enu_enu_enu_conv_enu_tru_enu_enu_cr
@@-360,6 +458,7 @@
@@@@静态内联 void setup_board_EEPROM_env (void){void do_board_detect (void){int RC;+ printf ("+++++++++Zeiss debug %s Line %d\n"、__func__、__line__);RC = ti_i_fibe_board_ene+%6+ void;_eneEEPROM_+%7_eneprom
=%_en_en_en_en_en_ene+ void;_ene+%4+ void + b (_ene+ b)_enePROM_b =_b = 4、+ b + b + b + b + b + b + b + b + b + b + b + b + b + b + b + b + b + b + void +
rc = ti_i2c_EEPROM_AM_get (CONFIG_EEPROM_BUS_ADDRESS、
CONFIG_EEPROM_CHIP_ADDRESS);
@@-390、8 + 490、11 @@
@@@@ void DO_BOARD_DETECT (void) bname ="AM571x IDK";if (bname)+{snprintf (sysinfo board_string、inv + env_env_env_env_env_board_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env_enboard
-mac_lo= readl ((* ctrl)->control_core_mac_id_1_lo);
+/-*mac_lo = readl ((* ctrl)->control_core_mac_id_1_lo);
mac_hi = readl (((r ctrl_core_addr)-> env_trl (* ctrl_env_ctrl
@@)+ ctrl_env1、ctrl @@(* ctrl_env_env_env1、ctrl (* ctrl_env_env_env_env_env_env1)
~
+ trl (* ctrl_env_env_env_env_env_env_env_env_env_1)+ trl (* ctrl + ctrl_env_env_env_control_env_env_env_env_env_env_env_env_env_env_env_env_env_env_env
请告诉我所需的更改。
谢谢、此致、
Shweta。