Tool/software:
Hi,
we have a custom board based on AM5749 SoC and custom U-Boot based on AM57XX-EVM board.
When using SDK 6.x and U-Boot v2019, memory ECC works without any problems.
Recently, we migrated to SDK 8.X and ported all the U-Boot changes to v2021.
Our board is stuck in dra7_enable_ecc() function in arch/arm/mach-omap2/emif-common.c.
If we disable ECC in EMIF config, board boots again but ECC is obviously not working.
Here is our EMIF config:
/* * MT41K512M16VRN-107 (with ECC enabled) memory timings * This is a twin die of MT41K512M8 (also used for the ECC), so see that * datasheet for most timings. */ const struct emif_regs am57xx_emif_532mhz_512m16_ecc_regs = { .sdram_config_init = 0x61851bb2, .sdram_config = 0x61851bb2, .sdram_config2 = 0x08000000, .ref_ctrl = 0x000040f1, .ref_ctrl_final = 0x00001035, .sdram_tim1 = 0xeeef265b, .sdram_tim2 = 0x308f7fda, .sdram_tim3 = 0x409f88a8, .read_idle_ctrl = 0x00090000, .zq_config = 0x5007190b, .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_ecc_ctrl_reg = 0xD0000001, // This needs to be not quite 2G due to LISA3 carve out .emif_ecc_address_range_1 = 0x7EFF0000, .emif_ecc_address_range_2 = 0x00000000, };
And DMM config:
const struct dmm_lisa_map_regs am574x_2gx1_ecc_lisa_regs = { .dmm_lisa_map_3 = 0xFF020100, .dmm_lisa_map_2 = 0x80700100, .is_ma_present = 0x1 };
We are disabling ECC with:
- .emif_rd_wr_exec_thresh = 0x00000305, - .emif_ecc_ctrl_reg = 0xd0000001, - // This needs to be not quite 2G due to LISA3 carve out - .emif_ecc_address_range_1 = 0x7EFF0000, - .emif_ecc_address_range_2 = 0x00000000, + .emif_rd_wr_exec_thresh = 0x00000305 };
Any idea what might be wrong in SDK 8.x regarding ECC?
We didn't change DRAM configuration at all.