IMX8MP Inline ECC

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX8MP Inline ECC

337 Views
James33
Contributor II

Dear NXP Technical Support Team,

I am currently attempting to utilize the Inline ECC feature on the IMX8MP(Follow the steps in AN13566.pdf and https://community.nxp.com/t5/NXP-Tech-Blog/xxx ).  According to section 9.2.5.1.20.3 of IMX8MPRM.pdf, I attempted to set ecc_region_parity_lock to Unlocked. 

 I modified the content of lpddr4_timing.c and set the value of the 0x3d400074 register to 0x780.

struct dram_cfg_param ddr_ddrc_cfg[] = {
{0x3d400304, 0x1},
{0x3d400030, 0x1},
{0x3d400000, 0xa3080020},
{0x3d400020, 0x1323},
{0x3d400024, 0x1e84800},
{0x3d400064, 0x7a0118},
{0x3d400070, 0x070277D4},
{0x3d400074, 0x780},
......

However, the register value read via the memtool tool is 0x790.

 

root@imx8mp-lpddr4-evk:~# /unit_tests/memtool 0x3d400074 1
E
Reading 0x1 count starting at address 0x3D400074

0x3D400074: 00000790

I would like to know how to properly configure this register.

Thank you in advance for your support.

 

0 Kudos
Reply
5 Replies

60 Views
pengyong_zhang
NXP Employee
NXP Employee

Hi @James33 

你是自己手动修改的寄存器的值吗?

B.R

0 Kudos
Reply

53 Views
James33
Contributor II

The lpddr4_timing.c file was generated by a DDR tool( * Code generated with DDR Tool v4.0.0_10-1eade933a.). The default value of this register is 0x790. According to the description in AN13566, section 3.2.3, I wanted to access the ECC parity region, so I manually changed it to 0x780, but it didn't work.

/*
 * Copyright 2026 NXP
 *
 * SPDX-License-Identifier: BSD-3-Clause
 *
 * Code generated with DDR Tool v4.0.0_10-1eade933a.
 * DDR PHY FW2020.06 
 * Part number: NXP LPDDR4 EVK board's default DDR part
 */

#include <linux/kernel.h>
#include <asm/arch/ddr.h>

/* Initialize DDRC registers */
struct dram_cfg_param ddr_ddrc_cfg[] = {
    {0x3d400304, 0x1},
    {0x3d400030, 0x1},
    {0x3d400000, 0xa3080020},
    {0x3d400020, 0x1323},
    {0x3d400024, 0x1e84800},
    {0x3d400064, 0x7a0118},
    {0x3d400070, 0x7027fd4},
    {0x3d400074, 0x790},
    {0x3d4000d0, 0xc00307a3},
    {0x3d4000d4, 0xc50000},
    {0x3d4000dc, 0xf4003f},
    {0x3d4000e0, 0x330000},
    {0x3d4000e8, 0x660048},
    {0x3d4000ec, 0x160048},
    {0x3d400100, 0x2028222a},
    {0x3d400104, 0x8083f},
    {0x3d40010c, 0xe0e000},
    {0x3d400110, 0x12040a12},
    {0x3d400114, 0x2050f0f},
    {0x3d400118, 0x1010009},
    {0x3d40011c, 0x502},
    {0x3d400130, 0x20800},
    {0x3d400134, 0xe100002},
    {0x3d400138, 0x120},
    {0x3d400144, 0xc80064},
    {0x3d400180, 0x3e8001e},
    {0x3d400184, 0x3207a12},
    {0x3d400188, 0x0},
    {0x3d400190, 0x49f820e},
    {0x3d400194, 0x80303},
    {0x3d4001b4, 0x1f0e},
    {0x3d4001a0, 0xe0400018},
    {0x3d4001a4, 0xdf00e4},
    {0x3d4001a8, 0x80000000},
    {0x3d4001b0, 0x11},
    {0x3d4001c0, 0x1},
    {0x3d4001c4, 0x1},
    {0x3d4000f4, 0x799},
    {0x3d400108, 0x9121b1c},
    {0x3d400200, 0x14},
    {0x3d400208, 0x0},
    {0x3d40020c, 0x14141400},
    {0x3d400210, 0x1f1f},
    {0x3d400204, 0x50505},
    {0x3d400214, 0x4040404},
    {0x3d400218, 0x4040404},
    {0x3d40021c, 0xf0f},
    {0x3d400250, 0x1705},
    {0x3d400254, 0x2c},
    {0x3d40025c, 0x4000030},
    {0x3d400264, 0x900093e7},
    {0x3d40026c, 0x2005574},
    {0x3d400400, 0x111},
    {0x3d400404, 0x72ff},
    {0x3d400408, 0x72ff},
    {0x3d400494, 0x2100e07},
    {0x3d400498, 0x620096},
    {0x3d40049c, 0x1100e07},
    {0x3d4004a0, 0xc8012c},
    {0x3d402020, 0x1021},
    {0x3d402024, 0x30d400},
    {0x3d402050, 0x20d000},
    {0x3d402064, 0xc001c},
    {0x3d4020dc, 0x840000},
    {0x3d4020e0, 0x330000},
    {0x3d4020e8, 0x660048},
    {0x3d4020ec, 0x160048},
    {0x3d402100, 0xa040305},
    {0x3d402104, 0x30407},
    {0x3d402108, 0x203060b},
    {0x3d40210c, 0x505000},
    {0x3d402110, 0x2040202},
    {0x3d402114, 0x2030202},
    {0x3d402118, 0x1010004},
    {0x3d40211c, 0x302},
    {0x3d402130, 0x20300},
    {0x3d402134, 0xa100002},
    {0x3d402138, 0x1d},
    {0x3d402144, 0x14000a},
    {0x3d402180, 0x640004},
    {0x3d402190, 0x3818200},
    {0x3d402194, 0x80303},
    {0x3d4021b4, 0x100},
    {0x3d4020f4, 0x599},
    {0x3d403020, 0x1021},
    {0x3d403024, 0xc3500},
    {0x3d403050, 0x20d000},
    {0x3d403064, 0x30007},
    {0x3d4030dc, 0x840000},
    {0x3d4030e0, 0x330000},
    {0x3d4030e8, 0x660048},
    {0x3d4030ec, 0x160048},
    {0x3d403100, 0xa010102},
    {0x3d403104, 0x30404},
    {0x3d403108, 0x203060b},
    {0x3d40310c, 0x505000},
    {0x3d403110, 0x2040202},
    {0x3d403114, 0x2030202},
    {0x3d403118, 0x1010004},
    {0x3d40311c, 0x302},
    {0x3d403130, 0x20300},
    {0x3d403134, 0xa100002},
    {0x3d403138, 0x8},
    {0x3d403144, 0x50003},
    {0x3d403180, 0x190004},
    {0x3d403190, 0x3818200},
    {0x3d403194, 0x80303},
    {0x3d4031b4, 0x100},
    {0x3d4030f4, 0x599},
    {0x3d400028, 0x0},
};

 Thank you for your reply.

0 Kudos
Reply

243 Views
pengyong_zhang
NXP Employee
NXP Employee

Hi @James33 

Please share your modified RPA file.

B.R

0 Kudos
Reply

64 Views
James33
Contributor II
Hello!!!
0 Kudos
Reply

223 Views
James33
Contributor II

Thank you for your support!

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2369962%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EIMX8MP%20Inline%20ECC%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2369962%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EDear%20NXP%20Technical%20Support%20Team%2C%3C%2FP%3E%3CP%3EI%20am%20currently%20attempting%20to%20utilize%20the%20Inline%20ECC%20feature%20on%20the%20IMX8MP(Follow%20the%20steps%20in%20AN13566.pdf%20and%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FNXP-Tech-Blog%2F%25E3%2582%25A4%25E3%2583%25B3%25E3%2583%25A9%25E3%2582%25A4%25E3%2583%25B3ECC-%25E6%25A9%259F%25E8%2583%25BD%25E3%2581%25A8%25E5%25AE%259F%25E8%25A3%2585%25E6%2596%25B9%25E6%25B3%2595%25E3%2581%25AB%25E3%2581%25A4%25E3%2581%2584%25E3%2581%25A6-%25E6%2597%25A5%25E6%259C%25AC%25E8%25AA%259E%25E3%2583%2596%25E3%2583%25AD%25E3%2582%25B0%2Fba-p%2F2259699%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FNXP-Tech-Blog%2Fxxx%3C%2FA%3E%26nbsp%3B).%26nbsp%3B%26nbsp%3BAccording%20to%20section%209.2.5.1.20.3%20of%20IMX8MPRM.pdf%2C%20I%20attempted%20to%20set%20ecc_region_parity_lock%20to%20Unlocked.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3BI%20modified%20the%20content%20of%20lpddr4_timing.c%20and%20set%20the%20value%20of%20the%200x3d400074%20register%20to%200x780.%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Estruct%20dram_cfg_param%20ddr_ddrc_cfg%5B%5D%20%3D%20%7B%0A%7B0x3d400304%2C%200x1%7D%2C%0A%7B0x3d400030%2C%200x1%7D%2C%0A%7B0x3d400000%2C%200xa3080020%7D%2C%0A%7B0x3d400020%2C%200x1323%7D%2C%0A%7B0x3d400024%2C%200x1e84800%7D%2C%0A%7B0x3d400064%2C%200x7a0118%7D%2C%0A%7B0x3d400070%2C%200x070277D4%7D%2C%0A%7B0x3d400074%2C%200x780%7D%2C%0A......%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EHowever%2C%20the%20register%20value%20read%20via%20the%20memtool%20tool%20is%200x790.%3C%2FP%3E%3CBR%20%2F%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Eroot%40imx8mp-lpddr4-evk%3A~%23%20%2Funit_tests%2Fmemtool%200x3d400074%201%0AE%0AReading%200x1%20count%20starting%20at%20address%200x3D400074%0A%0A0x3D400074%3A%2000000790%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EI%20would%20like%20to%20know%20how%20to%20properly%20configure%20this%20register.%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you%20in%20advance%20for%20your%20support.%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2370944%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20IMX8MP%20Inline%20ECC%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2370944%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThank%20you%20for%20your%20support%EF%BC%81%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2370483%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20IMX8MP%20Inline%20ECC%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2370483%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F255264%22%20target%3D%22_blank%22%3E%40James33%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20share%20your%20modified%20RPA%20file.%3C%2FP%3E%0A%3CP%3EB.R%3C%2FP%3E%3C%2FLINGO-BODY%3E