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.

AM625: How to set up AM625 4GB RAM on SDK 9.2?

Part Number: AM625

Tool/software:

CPU: am6254ATCGGAALW 

RAM: MT40A2G16

Dear Team,

The following is a patch that works successfully on 9.0.

edit:

board-support/ti-linux-kernel/arch/arm64/boot/dts/ti/k3-am625-sk.dts

board-support/ti-linux-kernel/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi

board-support/ti-u-boot/arch/arm/dts/k3-am625-sk.dts

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

};

board-support/ti-u-boot/arch/arm/dts/k3-am625-r5-sk.dts

-#include "k3-am62x-sk-ddr4-1600MTs.dtsi"
+#include "k3-am62x-ddr-config.dtsi"

/ {
	memory@80000000 {
		device_type = "memory";
-		/* 2G RAM */
-		reg = <0x00000000 0x80000000 0x00000000 0x80000000>;
+		/* 4G RAM */
+		reg = <0x00000000 0x80000000 0x00000000 0x80000000>,
+		<0x00000008 0x80000000 0x00000000 0x80000000>;
		bootph-pre-ram;
	};
};

add board-support/ti-u-boot/arch/arm/dts/k3-am62x-ddr-config.dtsi from sysconfig

board-support\ti-u-boot\drivers\ram\k3-ddrss\k3-ddrss.c

/* AM64x supports only up to 2 GB SDRAM */

-writel(0x000001EF, ddrss->ddrss_ss_cfg + DDRSS_V2A_CTL_REG);

+writel(0x00000210, ddrss->ddrss_ss_cfg + DDRSS_V2A_CTL_REG);

writel(0x0, ddrss->ddrss_ss_cfg + DDRSS_ECC_CTRL_REG);

 

The following is bdinfo and free -h use same patch on SDK9.0 and SDK9.2.

SDK9.0:

U-Boot SPL 2023.04-00001-gf5b119738d-dirty (Jun 19 2024 - 19:58:43 +0800)
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
SPL initial stack usage: 13376 bytes
Trying to boot from MMC2
Starting ATF on ARM64 core...

NOTICE:  BL31: v2.8(release):v2.8-226-g2fcd408bb3-dirty
NOTICE:  BL31: Built : 00:42:57, Jan 13 2023

U-Boot SPL 2023.04-00001-gf5b119738d-dirty (Jun 19 2024 - 19:58:52 +0800)
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
SPL initial stack usage: 1856 bytes
i2c_write: error waiting for data ACK (status=0x116)
pca953x gpio@22: Error reading output register
Error (-2): cannot determine file size
Trying to boot from MMC2


U-Boot 2023.04-00001-gf5b119738d-dirty (Jun 19 2024 - 19:58:52 +0800)

SoC:   AM62X SR1.0 GP
Model: Texas Instruments AM625 SK
EEPROM not available at 80, trying to read at 81
Reading on-board EEPROM at 0x51 failed -1
DRAM:  2 GiB (effective 4 GiB)
Core:  70 devices, 31 uclasses, devicetree: separate
MMC:   mmc@fa10000: 0, mmc@fa00000: 1
Loading Environment from nowhere... OK
In:    serial
Out:   serial
Err:   serial
EEPROM not available at 80, trying to read at 81
Reading on-board EEPROM at 0x51 failed -1
Net:   eth0: ethernet@8000000port@1
Autoboot in 3 seconds
i2c_write: error waiting for data ACK (status=0x116)
pca953x gpio@22: Error reading output register
switch to partitions #0, OK
mmc1 is current device
i2c_write: error waiting for data ACK (status=0x116)
pca953x gpio@22: Error reading output register
SD/MMC found on device 1
Failed to load 'boot.scr'
677 bytes read in 14 ms (46.9 KiB/s)
Loaded env from uEnv.txt
Importing environment from mmc1 ...
=> bdinfo
boot_params = 0x0000000000000000
DRAM bank   = 0x0000000000000000
-> start    = 0x0000000080000000
-> size     = 0x0000000080000000
DRAM bank   = 0x0000000000000001
-> start    = 0x0000000880000000
-> size     = 0x0000000080000000
flashstart  = 0x0000000000000000
flashsize   = 0x0000000000000000
flashoffset = 0x0000000000000000
baudrate    = 115200 bps
relocaddr   = 0x00000000ff61b000
reloc off   = 0x000000007ee1b000
Build       = 64-bit
current eth = ethernet@8000000port@1
ethaddr     = 1c:63:49:1b:f9:cf
IP addr     = <NULL>
fdt_blob    = 0x00000000fd5ec020
new_fdt     = 0x00000000fd5ec020
fdt_size    = 0x000000000000fd60
Video       = dss@30200000 inactive
multi_dtb_fit= 0x0000000000000000
lmb_dump_all:
 memory.cnt  = 0x2
 memory[0]      [0x80000000-0xffffffff], 0x80000000 bytes flags: 0
 memory[1]      [0x880000000-0x8ffffffff], 0x80000000 bytes flags: 0
 reserved.cnt  = 0x6
 reserved[0]    [0x9ca00000-0x9cafffff], 0x00100000 bytes flags: 0
 reserved[1]    [0x9cb00000-0x9e6fffff], 0x01c00000 bytes flags: 4
 reserved[2]    [0x9e780000-0x9fffffff], 0x01880000 bytes flags: 4
 reserved[3]    [0xfc5e0000-0xffffffff], 0x03a20000 bytes flags: 0
 reserved[4]    [0xfd5e69d0-0xffffffff], 0x02a19630 bytes flags: 0
 reserved[5]    [0x880000000-0x8ffffffff], 0x80000000 bytes flags: 0
devicetree  = separate
arch_number = 0x0000000000000000
TLB addr    = 0x00000000ffff0000
irq_sp      = 0x00000000fd5eaff0
sp start    = 0x00000000fd5eaff0
Early malloc usage: 3c28 / 8000
=>

root@AM62:~# free -h
               total        used        free      shared  buff/cache   available
Mem:           3.8Gi       390Mi       3.3Gi        11Mi       284Mi       3.4Gi
Swap:             0B          0B          0B
root@AM62:~#

SDK9.2:

U-Boot SPL 2023.04-dirty (Jul 16 2024 - 16:59:51 +0800)
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.7--v09.02.07 (Kool Koala)')
SPL initial stack usage: 13408 bytes
Trying to boot from MMC2
Starting ATF on ARM64 core...

NOTICE:  BL31: v2.10.0(release):v2.10.0-367-g00f1ec6b87-dirty
NOTICE:  BL31: Built : 16:09:05, Feb  9 2024

U-Boot SPL 2023.04-dirty (Jul 16 2024 - 16:59:59 +0800)
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.7--v09.02.07 (Kool Koala)')
SPL initial stack usage: 1856 bytes
i2c_write: error waiting for data ACK (status=0x116)
pca953x gpio@22: Error reading output register
Trying to boot from MMC2


U-Boot 2023.04-dirty (Jul 16 2024 - 16:59:59 +0800)

SoC:   AM62X SR1.0 GP
Model: Texas Instruments AM625 SK
EEPROM not available at 80, trying to read at 81
Reading on-board EEPROM at 0x51 failed -1
DRAM:  2 GiB (effective 4 GiB)
Core:  72 devices, 32 uclasses, devicetree: separate
MMC:   mmc@fa10000: 0, mmc@fa00000: 1
Loading Environment from nowhere... OK
In:    serial
Out:   serial
Err:   serial
EEPROM not available at 80, trying to read at 81
Reading on-board EEPROM at 0x51 failed -1
Net:   eth0: ethernet@8000000port@1
Hit any key to stop autoboot:  0
=> bdinfo
boot_params = 0x0000000000000000
DRAM bank   = 0x0000000000000000
-> start    = 0x0000000080000000
-> size     = 0x0000000080000000
DRAM bank   = 0x0000000000000001
-> start    = 0x0000000080000000
-> size     = 0x0000000080000000
flashstart  = 0x0000000000000000
flashsize   = 0x0000000000000000
flashoffset = 0x0000000000000000
baudrate    = 115200 bps
relocaddr   = 0x00000000ff616000
reloc off   = 0x000000007ee16000
Build       = 64-bit
current eth = ethernet@8000000port@1
ethaddr     = 1c:63:49:1b:f9:cf
IP addr     = <NULL>
fdt_blob    = 0x00000000fd5e7820
new_fdt     = 0x00000000fd5e7820
fdt_size    = 0x000000000000f560
Video       = dss@30200000 inactive
multi_dtb_fit= 0x0000000000000000
lmb_dump_all:
 memory.cnt  = 0x1
 memory[0]      [0x80000000-0xffffffff], 0x80000000 bytes flags: 0
 reserved.cnt  = 0x4
 reserved[0]    [0x9ca00000-0x9cafffff], 0x00100000 bytes flags: 0
 reserved[1]    [0x9cb00000-0x9e6fffff], 0x01c00000 bytes flags: 4
 reserved[2]    [0x9e780000-0x9fffffff], 0x01880000 bytes flags: 4
 reserved[3]    [0xfc5e2000-0xffffffff], 0x03a1e000 bytes flags: 0
devicetree  = separate
arch_number = 0x0000000000000000
TLB addr    = 0x00000000ffff0000
irq_sp      = 0x00000000fd5e6ff0
sp start    = 0x00000000fd5e6ff0
Early malloc usage: 3c28 / 8000
=>

root@am62xx-evm:~# free -h
               total        used        free      shared  buff/cache   available
Mem:           1.9Gi       151Mi       1.7Gi       900Ki        99Mi       1.7Gi
Swap:             0B          0B          0B
root@am62xx-evm:~# 

 

Thanks,

Andrew