This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: [TDA4VM]How to config MT53E768M32D4DT 3GB DDR on TDA4VM

Part Number: TDA4VM

Hi Expert,

-1-

Customer is using MT53E768M32D4DT 3GB DDR on their TDA4 board, software is SDK7.0.

it is dual channel dual rank. each die is 768MB (density is 6Gb). Due to "ddrss_reg_control_tool" cannot support 6Gb density. so we have to select 4Gb density

and config DDR size to 2GB. with new ddr parameters, board can boot into SPL. but it will stuck in u-boot.

The question is how to change memory map for 2GB?

-2-

I am using TDA4VM EVM to simulate this case 4x512MB DDR. it will hang in u-boot "enable_caches()"

please help to check the below modification and boot log on TDA4EVM.

diff --git a/arch/arm/dts/k3-j721e-som-p0.dtsi b/arch/arm/dts/k3-j721e-som-p0.dtsi
index 5d18642fe6..4e89df70db 100644
--- a/arch/arm/dts/k3-j721e-som-p0.dtsi
+++ b/arch/arm/dts/k3-j721e-som-p0.dtsi
@@ -10,9 +10,9 @@
/ {
memory@80000000 {
device_type = "memory";
- /* 4G RAM */
- reg = <0x00000000 0x80000000 0x00000000 0x80000000>,
- <0x00000008 0x80000000 0x00000000 0x80000000>;
+ /* 2G RAM 2 Rank 4x512MB */
+ reg = <0x00000000 0x80000000 0x00000000 0x40000000>,
+ <0x00000008 0x80000000 0x00000000 0x40000000>;
};
diff --git a/arch/arm/mach-k3/arm64-mmu.c b/arch/arm/mach-k3/arm64-mmu.c
index 95f830b7ff..809982abb6 100644
--- a/arch/arm/mach-k3/arm64-mmu.c
+++ b/arch/arm/mach-k3/arm64-mmu.c
@@ -93,13 +93,13 @@ struct mm_region j721e_mem_map[NR_MMU_REGIONS] = {
}, {
.virt = 0xbbc00000UL,
.phys = 0xbbc00000UL,
- .size = 0x44400000UL,
+ .size = 0x04400000UL,
.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
PTE_BLOCK_INNER_SHARE
}, {
- .virt = 0x880000000UL,
+ .virt = 0xc0000000UL,
.phys = 0x880000000UL,
- .size = 0x80000000UL,
+ .size = 0x40000000UL,
.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
PTE_BLOCK_INNER_SHARE
diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index d9846f3c46..2d1407336a 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -42,7 +42,7 @@ int board_init(void)
int dram_init(void)
{
#ifdef CONFIG_PHYS_64BIT
- gd->ram_size = 0x100000000;
+ gd->ram_size = 0x80000000;
#else
gd->ram_size = 0x80000000;
#endif
@@ -65,14 +65,14 @@ int dram_init_banksize(void)
{
/* Bank 0 declares the memory available in the DDR low region */
gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_dram[0].size = 0x80000000;
+ gd->bd->bi_dram[0].size = 0x40000000;
gd->ram_size = 0x80000000;

#ifdef CONFIG_PHYS_64BIT
/* Bank 1 declares the memory available in the DDR high region */
gd->bd->bi_dram[1].start = CONFIG_SYS_SDRAM_BASE1;
- gd->bd->bi_dram[1].size = 0x80000000;
- gd->ram_size = 0x100000000;
+ gd->bd->bi_dram[1].size = 0x40000000;
+ gd->ram_size = 0x80000000;
#endif

------------------------------------------------------------------------------------------------------------------------

U-Boot SPL 2020.01-dirty (Oct 23 2020 - 11:40:11 +0800)
SYSFW ABI: 3.0 (firmware rev 0x0014 '20.04.1-v2020.04a (Terrific Lla')
j721e_ddrss_probe(dev=41c87cec)
j721e_ddrss_ofdata_to_priv(dev=41c87cec)
j721e_ddrss_power_on(ddrss=41cd7244)
LPDDR4_Probe: PASS
LPDDR4_Init: PASS
--->>> LPDDR4 Initialization is in progress ... <<<---
j721e_lpddr4_ack_freq_upd_req: received freq change req: req type = 1, req no. = 0
j721e_lpddr4_ack_freq_upd_req: received freq change req: req type = 0, req no. = 1
j721e_lpddr4_ack_freq_upd_req: received freq change req: req type = 1, req no. = 2
j721e_lpddr4_ack_freq_upd_req: received freq change req: req type = 0, req no. = 3
j721e_lpddr4_ack_freq_upd_req: received freq change req: req type = 1, req no. = 4
j721e_lpddr4_ack_freq_upd_req: received freq change req: req type = 2, req no. = 5
j721e_lpddr4_ack_freq_upd_req: received freq change req: req type = 1, req no. = 6
j721e_lpddr4_ack_freq_upd_req: received freq change req: req type = 2, req no. = 7
j721e_lpddr4_ack_freq_upd_req: received freq change req: req type = 1, req no. = 8
j721e_lpddr4_ack_freq_upd_req: received freq change req: req type = 2, req no. = 9
LPDDR4_Start: PASS
>>SPL: board_init_r()
TLB table from ffffc000 to 00000000
spl_init
Trying to boot from MMC2
Unsupported OS image.. Jumping nevertheless..
loaded - jumping to U-Boot...
rproc_pre_probe: 'r5f@5c00000': using fdt
k3_r5f_core_of_get_memories
memory atcm: bus addr 0x840029dc, mem size 0x8000, cpu_addr 0x5c00000, dev_addr 0x0
memory btcm: bus addr 0x840029ec, mem size 0x8000, cpu_addr 0x5c10000, dev_addr 0x41010000
ti_sci_proc_request: proc_id = 6
ti_sci_proc_get_status: proc_id = 6, boot_vector = 0xx, cfg_flags = 0x0, ctrl_flags = 0x200, sts = 0x0
ti_sci_proc_set_control: proc_id = 6, ctrl_set = 0x1, ctrl_clr = 0x0
ti_sci_proc_set_config: proc_id = 6, boot_vector = 0xx, cfg_set = 0x0, cfg_clr = 0x200
ti_sci_proc_release: proc_id = 6
rproc_pre_probe: 'r5f@5d00000': using fdt
k3_r5f_core_of_get_memories
memory atcm: bus addr 0x84000ccc, mem size 0x8000, cpu_addr 0x5d00000, dev_addr 0x0
memory btcm: bus addr 0x84000cdc, mem size 0x8000, cpu_addr 0x5d10000, dev_addr 0x41010000
ti_sci_proc_request: proc_id = 7
ti_sci_proc_get_status: proc_id = 7, boot_vector = 0xx, cfg_flags = 0x0, ctrl_flags = 0x200, sts = 0x0
ti_sci_proc_set_control: proc_id = 7, ctrl_set = 0x1, ctrl_clr = 0x0
ti_sci_proc_set_config: proc_id = 7, boot_vector = 0xx, cfg_set = 0x0, cfg_clr = 0x200
ti_sci_proc_release: proc_id = 7
rproc_pre_probe: 'a72@0': using fdt
Loading Environment from MMC... *** Warning - No MMC card found, using default environment

rproc_load: Loading to 'r5f@5c00000' from address 0x88000000 size of 4254052 bytes
ti_sci_proc_request: proc_id = 6
ti_sci_proc_power_domain_on: dev_id = 245
k3_r5f_da_to_va, num_mems = 2
===2 va = 0x5c00000, da = 0x0, dev_addr = 0x0, size = 0x6d8, mem_size = 0x8000
Loading phdr 0 to 0x5c00000 (1752 bytes) from src 0x88000040
k3_r5f_da_to_va, num_mems = 2
===3 da = 0xa1100000
Loading phdr 1 to 0xa1100000 (140 bytes) from src 0x88001000
k3_r5f_da_to_va, num_mems = 2
===3 da = 0xa1102000
Loading phdr 2 to 0xa1102000 (0 bytes) from src 0x88002000
k3_r5f_da_to_va, num_mems = 2
===3 da = 0xa205e680
Loading phdr 3 to 0xa205e680 (2032784 bytes) from src 0x88002000
k3_r5f_da_to_va, num_mems = 2
===3 da = 0xa2250000
Loading phdr 4 to 0xa2250000 (0 bytes) from src 0x881f4000
k3_r5f_da_to_va, num_mems = 2
===3 da = 0xa23a0000
Loading phdr 5 to 0xa23a0000 (1361264 bytes) from src 0x881f4000
k3_r5f_da_to_va, num_mems = 2
===3 da = 0xa24ec580
Loading phdr 6 to 0xa24ec580 (839936 bytes) from src 0x88340580
k3_r5f_da_to_va, num_mems = 2
===3 da = 0xa267b280
Loading phdr 7 to 0xa267b280 (0 bytes) from src 0x8840d680
ti_sci_proc_set_config: proc_id = 6, boot_vector = 0xx, cfg_set = 0x0, cfg_clr = 0x0
ti_sci_proc_release: proc_id = 6
_rproc_ops_wrapper: Starting r5f@5c00000...
ti_sci_proc_request: proc_id = 6
ti_sci_proc_set_control: proc_id = 6, ctrl_set = 0x0, ctrl_clr = 0x1
ti_sci_proc_release: proc_id = 6
Remoteproc 2 started successfully
** File not found /lib/firmware/j7-main-r5f0_1-fw **
_rproc_ops_wrapper: Resetting r5f@5c00000...
** File not found /lib/firmware/j7-mcu-r5f0_0-fw **
rproc_load: Loading to 'a72@0' from address 0x70000000 size of 512 bytes
Starting ATF on ARM64 core...

_rproc_ops_wrapper: Starting a72@0...
Shutting down...
NOTICE: BL31: v2.3():07.00.00.005-dirty
NOTICE: BL31: Built : 14:33:55, Jun 17 2020

U-Boot SPL 2020.01-dirty (Oct 23 2020 - 12:11:11 +0800)
SYSFW ABI: 3.0 (firmware rev 0x0014 '20.04.1-v2020.04a (Terrific Lla')
SPL malloc() before relocation used 0x3468 bytes (13 KB)
>>SPL: board_init_r()
TLB table from ffff4000 to 100000000
spl_init
Detected: J7X-BASE-CPB rev E2
Detected: J7X-VSC8514-ETH rev E2
Trying to boot from MMC2
Jumping to U-Boot
loaded - jumping to U-Boot...
image entry point: 0x80800000
initcall: 00000000808a4b78


U-Boot 2020.01-dirty (Oct 23 2020 - 12:11:11 +0800)

initcall: 0000000080817344
U-Boot code: 80800000 -> 808ED570 BSS: -> 8090B250
initcall: 00000000808174b0
initcall: 00000000808029e0
SoC: J721E SR1.0
initcall: 0000000080817b90
Model: Texas Instruments K3 J721E SoC
Board: J721EX-PM1-SOM rev E2
initcall: 0000000080817490
DRAM: initcall: 000000008080319c
initcall: 0000000080817694
Monitor len: 0010B250
Ram size: 80000000
Ram top: 100000000
initcall: 000000008081713c
initcall: 0000000080817150
TLB table from ffff0000 to ffffc000
initcall: 0000000080817578
initcall: 0000000080817580
initcall: 00000000808172dc
Reserving 1068k for U-Boot at: ffee4000
initcall: 00000000808172a0
Reserving 32896k for malloc() at: fdec4000
initcall: 0000000080817434
Reserving 168 Bytes for Board Info at: fdec3f58
initcall: 0000000080817588
initcall: 0000000080817264
Reserving 368 Bytes for Global Data at: fdec3de8
initcall: 00000000808171dc
Reserving 47776 Bytes for FDT at: fdeb8348
initcall: 0000000080817590
initcall: 0000000080817598
initcall: 00000000808175b8
initcall: 0000000080817710
initcall: 00000000808031c4
initcall: 00000000808175c4

RAM Configuration:
Bank #0: 80000000 1 GiB
Bank #1: 880000000 1 GiB

DRAM: 2 GiB
initcall: 00000000808171b8
New Stack Pointer is: fdeb8330
initcall: 00000000808173f0
initcall: 00000000808175a0
initcall: 00000000808175a8
initcall: 0000000080817378
Relocation Offset is: 7f6e4000
Relocating to ffee4000, new gd at fdec3de8, sp at fdeb8330
initcall: 00000000ffefb7e4
initcall: 00000000ffefb7ec
initcall: 0000000080817a18 (relocated to 00000000ffefba18)

function "0000000080817a18" is "initr_caches"

Could you please help to check?

Regards

Joe

  • Hi Expert,

    I tried DRAM to 1GB and used Bank#0 on EVM, it can boot into u-boot. the full log please help to check the attached file.

    U-Boot SPL 2020.01-dirty (Oct 26 2020 - 18:17:33 +0800)
    SYSFW ABI: 3.0 (firmware rev 0x0014 '20.04.1-v2020.04a (Terrific Lla')
    j721e_ddrss_probe(dev=41c87cec)
    j721e_ddrss_ofdata_to_priv(dev=41c87cec)
    j721e_ddrss_power_on(ddrss=41cd7244)
    LPDDR4_Probe: PASS
    LPDDR4_Init: PASS
    --->>> LPDDR4 Initialization is in progress ... <<<---
    j721e_lpddr4_ack_freq_upd_req: received freq change req: req type = 1, req no. = 0 
    j721e_lpddr4_ack_freq_upd_req: received freq change req: req type = 0, req no. = 1 
    j721e_lpddr4_ack_freq_upd_req: received freq change req: req type = 1, req no. = 2 
    j721e_lpddr4_ack_freq_upd_req: received freq change req: req type = 0, req no. = 3 
    j721e_lpddr4_ack_freq_upd_req: received freq change req: req type = 1, req no. = 4 
    j721e_lpddr4_ack_freq_upd_req: received freq change req: req type = 2, req no. = 5 
    j721e_lpddr4_ack_freq_upd_req: received freq change req: req type = 1, req no. = 6 
    j721e_lpddr4_ack_freq_upd_req: received freq change req: req type = 2, req no. = 7 
    j721e_lpddr4_ack_freq_upd_req: received freq change req: req type = 1, req no. = 8 
    j721e_lpddr4_ack_freq_upd_req: received freq change req: req type = 2, req no. = 9 
    LPDDR4_Start: PASS
    >>SPL: board_init_r()
    TLB table from bfffc000 to c0000000
    spl_init
    Trying to boot from MMC2
    Unsupported OS image.. Jumping nevertheless..
    loaded - jumping to U-Boot...
    rproc_pre_probe: 'r5f@5c00000': using fdt
    k3_r5f_core_of_get_memories
    memory     atcm: bus addr 0x840029dc, mem size 0x8000, cpu_addr 0x5c00000, dev_addr 0x0
    memory     btcm: bus addr 0x840029ec, mem size 0x8000, cpu_addr 0x5c10000, dev_addr 0x41010000
    ti_sci_proc_request: proc_id = 6
    ti_sci_proc_get_status: proc_id = 6, boot_vector = 0xx, cfg_flags = 0x0, ctrl_flags = 0x200, sts = 0x0
    ti_sci_proc_set_control: proc_id = 6, ctrl_set = 0x1, ctrl_clr = 0x0
    ti_sci_proc_set_config: proc_id = 6, boot_vector = 0xx, cfg_set = 0x0, cfg_clr = 0x200
    ti_sci_proc_release: proc_id = 6
    rproc_pre_probe: 'r5f@5d00000': using fdt
    k3_r5f_core_of_get_memories
    memory     atcm: bus addr 0x84000ccc, mem size 0x8000, cpu_addr 0x5d00000, dev_addr 0x0
    memory     btcm: bus addr 0x84000cdc, mem size 0x8000, cpu_addr 0x5d10000, dev_addr 0x41010000
    ti_sci_proc_request: proc_id = 7
    ti_sci_proc_get_status: proc_id = 7, boot_vector = 0xx, cfg_flags = 0x0, ctrl_flags = 0x200, sts = 0x0
    ti_sci_proc_set_control: proc_id = 7, ctrl_set = 0x1, ctrl_clr = 0x0
    ti_sci_proc_set_config: proc_id = 7, boot_vector = 0xx, cfg_set = 0x0, cfg_clr = 0x200
    ti_sci_proc_release: proc_id = 7
    rproc_pre_probe: 'a72@0': using fdt
    Loading Environment from MMC... *** Warning - No MMC card found, using default environment
    
    rproc_load: Loading to 'r5f@5c00000' from address 0x88000000 size of 4254052 bytes
    ti_sci_proc_request: proc_id = 6
    ti_sci_proc_power_domain_on: dev_id = 245
    k3_r5f_da_to_va, num_mems = 2 
    ===2 va = 0x5c00000, da = 0x0,  dev_addr = 0x0, size = 0x6d8, mem_size = 0x8000
    Loading phdr 0 to 0x5c00000 (1752 bytes) from src 0x88000040
    k3_r5f_da_to_va, num_mems = 2 
    ===3 da = 0xa1100000 
    Loading phdr 1 to 0xa1100000 (140 bytes) from src 0x88001000
    k3_r5f_da_to_va, num_mems = 2 
    ===3 da = 0xa1102000 
    Loading phdr 2 to 0xa1102000 (0 bytes) from src 0x88002000
    k3_r5f_da_to_va, num_mems = 2 
    ===3 da = 0xa205e680 
    Loading phdr 3 to 0xa205e680 (2032784 bytes) from src 0x88002000
    k3_r5f_da_to_va, num_mems = 2 
    ===3 da = 0xa2250000 
    Loading phdr 4 to 0xa2250000 (0 bytes) from src 0x881f4000
    k3_r5f_da_to_va, num_mems = 2 
    ===3 da = 0xa23a0000 
    Loading phdr 5 to 0xa23a0000 (1361264 bytes) from src 0x881f4000
    k3_r5f_da_to_va, num_mems = 2 
    ===3 da = 0xa24ec580 
    Loading phdr 6 to 0xa24ec580 (839936 bytes) from src 0x88340580
    k3_r5f_da_to_va, num_mems = 2 
    ===3 da = 0xa267b280 
    Loading phdr 7 to 0xa267b280 (0 bytes) from src 0x8840d680
    ti_sci_proc_set_config: proc_id = 6, boot_vector = 0xx, cfg_set = 0x0, cfg_clr = 0x0
    ti_sci_proc_release: proc_id = 6
    _rproc_ops_wrapper: Starting r5f@5c00000...
    ti_sci_proc_request: proc_id = 6
    ti_sci_proc_set_control: proc_id = 6, ctrl_set = 0x0, ctrl_clr = 0x1
    ti_sci_proc_release: proc_id = 6
    Remoteproc 2 started successfully
    ** File not found /lib/firmware/j7-main-r5f0_1-fw **
    _rproc_ops_wrapper: Resetting r5f@5c00000...
    ** File not found /lib/firmware/j7-mcu-r5f0_0-fw **
    rproc_load: Loading to 'a72@0' from address 0x70000000 size of 512 bytes
    Starting ATF on ARM64 core...
    
    _rproc_ops_wrapper: Starting a72@0...
    Shutting down...
    NOTICE:  BL31: v2.3():07.00.00.005-dirty
    NOTICE:  BL31: Built : 14:33:55, Jun 17 2020
    
    U-Boot SPL 2020.01-dirty (Oct 26 2020 - 18:16:48 +0800)
    SYSFW ABI: 3.0 (firmware rev 0x0014 '20.04.1-v2020.04a (Terrific Lla')
    SPL malloc() before relocation used 0x3468 bytes (13 KB)
    >>SPL: board_init_r()
    TLB table from bfff4000 to c0000000
    spl_init
    Detected: J7X-BASE-CPB rev E2
    Detected: J7X-VSC8514-ETH rev E2
    Trying to boot from MMC2
    Jumping to U-Boot
    loaded - jumping to U-Boot...
    image entry point: 0x80800000
    initcall: 00000000808a4a34
    
    
    U-Boot 2020.01-dirty (Oct 26 2020 - 18:16:48 +0800)
    
    initcall: 0000000080817250
    U-Boot code: 80800000 -> 808ED3F8  BSS: -> 8090B0D0
    initcall: 00000000808173bc
    initcall: 000000008080296c
    SoC:   J721E SR1.0
    initcall: 0000000080817a74
    Model: Texas Instruments K3 J721E SoC
    Board: J721EX-PM1-SOM rev E2
    initcall: 000000008081739c
    DRAM:  initcall: 0000000080803128
    initcall: 0000000080817578
    Monitor len: 0010B0D0
    Ram size: 40000000
    Ram top: C0000000
    initcall: 0000000080817048
    initcall: 000000008081705c
    TLB table from bfff0000 to bfffc000
    initcall: 0000000080817484
    initcall: 000000008081748c
    initcall: 00000000808171e8
    Reserving 1068k for U-Boot at: bfee4000
    initcall: 00000000808171ac
    Reserving 32896k for malloc() at: bdec4000
    initcall: 0000000080817340
    Reserving 152 Bytes for Board Info at: bdec3f68
    initcall: 0000000080817494
    initcall: 0000000080817170
    Reserving 368 Bytes for Global Data at: bdec3df8
    initcall: 00000000808170e8
    Reserving 48160 Bytes for FDT at: bdeb81d8
    initcall: 000000008081749c
    initcall: 00000000808174a4
    initcall: 00000000808174c4
    initcall: 00000000808175f4
    initcall: 0000000080803140
    initcall: 00000000808174d0
    
    RAM Configuration:
    Bank #0: 80000000 1 GiB
    
    DRAM:  1 GiB
    initcall: 00000000808170c4
    New Stack Pointer is: bdeb81c0
    initcall: 00000000808172fc
    initcall: 00000000808174ac
    initcall: 00000000808174b4
    initcall: 0000000080817284
    Relocation Offset is: 3f6e4000
    Relocating to bfee4000, new gd at bdec3df8, sp at bdeb81c0
    initcall: 00000000bfefb6c8
    initcall: 00000000bfefb6d0
    initcall: 00000000808178fc (relocated to 00000000bfefb8fc)
    initcall: 00000000808178ac (relocated to 00000000bfefb8ac)
    initcall: 000000008081791c (relocated to 00000000bfefb91c)
    initcall: 0000000080817880 (relocated to 00000000bfefb880)
    initcall: 0000000080817010 (relocated to 00000000bfefb010)
    initcall: 0000000080817864 (relocated to 00000000bfefb864)
    initcall: 0000000080817924 (relocated to 00000000bfefb924)
    initcall: 0000000080817828 (relocated to 00000000bfefb828)
    not found for dev hbmc-mux
    initcall: 0000000080803120 (relocated to 00000000bfee7120)
    initcall: 0000000080892324 (relocated to 00000000bff76324)
    initcall: 0000000080823c38 (relocated to 00000000bff07c38)
    initcall: 0000000080817810 (relocated to 00000000bfefb810)
    initcall: 0000000080817914 (relocated to 00000000bfefb914)
    initcall: 000000008081792c (relocated to 00000000bfefb92c)
    initcall: 000000008081793c (relocated to 00000000bfefb93c)
    Flash: 0 Bytes
    initcall: 00000000808177e8 (relocated to 00000000bfefb7e8)
    MMC:   sdhci@4f80000: 0, sdhci@4fb0000: 1
    initcall: 0000000080817774 (relocated to 00000000bfefb774)
    Loading Environment from MMC... OK
    initcall: 00000000808179b4 (relocated to 00000000bfefb9b4)
    initcall: 0000000080823c50 (relocated to 00000000bff07c50)
    initcall: 000000008081775c (relocated to 00000000bfefb75c)
    initcall: 000000008081e608 (relocated to 00000000bff02608)
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    initcall: 0000000080802628 (relocated to 00000000bfee6628)
    initcall: 0000000080817744 (relocated to 00000000bfefb744)
    initcall: 000000008081771c (relocated to 00000000bfefb71c)
    initcall: 00000000808031f8 (relocated to 00000000bfee71f8)
    Detected: J7X-BASE-CPB rev E2
    Detected: J7X-VSC8514-ETH rev E2
    initcall: 00000000808176f8 (relocated to 00000000bfefb6f8)
    Net:   
    Warning: ethernet@046000000 using MAC address from ROM
    eth0: ethernet@046000000
    initcall: 00000000808176e8 (relocated to 00000000bfefb6e8)
    Hit any key to stop autoboot:  0 
    

    RAM Configuration:
    Bank #0: 80000000 1 GiB

    DRAM: 1 GiB

    -1-

    The issue may be related to memory map on 0x8_8000_0000. Can memory 0x8_8000_0000 map to 0xC000_0000?

    -2-

    How to config the memory map on this kind of 2GB DDR?

    512M32 (16Gbit)
    channel A, rank0  x16bit mode x 1 die
    channel A, rank1 x16bit mode x 1 die
    channel B, rank0 x16bit mode x 1 die
    channel B, rank1 x16bit mode x 1 die

    Regards

    Joe

  • Hi,

    You need to update memory size in device tree files, among a few other places. Also need to update MMU settings. Let us know if this doesn't resolve the issue.

    1) Update device tree memory size. As an example, you would remove the 2nd defined 2GB memory section shown below, located in k3-j721e-som-p0.dtsi, to enable just 2GB instead of 4GB.

    memory@80000000 {
    		device_type = "memory";
    		/* 4G RAM */
    		reg = <0x00000000 0x80000000 0x00000000 0x80000000>;
    		      <0x00000008 0x80000000 0x00000000 0x80000000>;
    	};

    git.ti.com/.../k3-j721e-som-p0.dtsi

    2) Update the "ram_size" descriptor passed to Linux. Either ensure that CONFIG_PHYS_64BIT is not defined, or just delete the pre-processor statements below such that only the green code is executed.

    git.ti.com/.../evm.c

    int dram_init(void) { #ifdef CONFIG_PHYS_64BIT gd->ram_size = 0x100000000; #else gd->ram_size = 0x80000000; #endif return 0; }

    int dram_init_banksize(void)
    {
    	/* Bank 0 declares the memory available in the DDR low region */
    	gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
    	gd->bd->bi_dram[0].size = 0x80000000;
    	gd->ram_size = 0x80000000;
    
    #ifdef CONFIG_PHYS_64BIT
    	/* Bank 1 declares the memory available in the DDR high region */
    	gd->bd->bi_dram[1].start = CONFIG_SYS_SDRAM_BASE1;
    	gd->bd->bi_dram[1].size = 0x80000000;
    	gd->ram_size = 0x100000000;
    #endif
    
    	return 0;
    }
     

    3) Ensure the MMU does not try to access invalid memory. Needs confirmation, but I believe you would need to remove the lines in red below.

    git.ti.com/.../arm64-mmu.c

    struct mm_region j721e_mem_map[NR_MMU_REGIONS] = {
    	{
    		.virt = 0x0UL,
    		.phys = 0x0UL,
    		.size = 0x80000000UL,
    		.attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
    			 PTE_BLOCK_NON_SHARE |
    			 PTE_BLOCK_PXN | PTE_BLOCK_UXN
    	}, {
    		.virt = 0x80000000UL,
    		.phys = 0x80000000UL,
    		.size = 0x20000000UL,
    		.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
    			 PTE_BLOCK_INNER_SHARE
    	}, {
    		.virt = 0xa0000000UL,
    		.phys = 0xa0000000UL,
    		.size = 0x1bc00000UL,
    		.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL_NC) |
    			 PTE_BLOCK_NON_SHARE
    	}, {
    		.virt = 0xbbc00000UL,
    		.phys = 0xbbc00000UL,
    		.size = 0x44400000UL,
    		.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
    			 PTE_BLOCK_INNER_SHARE
    	}, {
    		.virt = 0x880000000UL,
    		.phys = 0x880000000UL,
    		.size = 0x80000000UL,
    		.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
    			 PTE_BLOCK_INNER_SHARE
    	}, {
    		.virt = 0x500000000UL,
    		.phys = 0x500000000UL,
    		.size = 0x400000000UL,
    		.attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
    			 PTE_BLOCK_NON_SHARE |
    			 PTE_BLOCK_PXN | PTE_BLOCK_UXN
    	}, {
    		.virt = 0x4d80000000UL,
    		.phys = 0x4d80000000UL,
    		.size = 0x0002000000UL,
    		.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL_NC) |
    			 PTE_BLOCK_INNER_SHARE
    	}, {
    		/* List terminator */
    		0,
    	}
    };

  • Hi Kevin,

    Thanks for your help. The changes can make customer board boot successfully.

    About interleaved experiments, I will send you the data by email.

    Regards

    Joe