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.

Linux/AM5708: Kernel hangs after reducing DDR size

Part Number: AM5708

Tool/software: Linux

Hi,

I have AM5708 based custom board and I had released revision A of that with 1GB of RAM with 532Mhz DDR frequency. Now I have reduced the size of DDR from 1GB to 512 MB and all the other components are same. Just DDR is changed with 2 Chips of 512 to 2 Chips of 256. I have changed Row size and Page size and LISA register according to DDR datasheet and Device tree node for memory in kernel. But When I power up the Board it hangs at  ** Starting kernel **

I have changed :

In file arch/arm/boot/dts/am570x-custom-board.dts

memory {
        device_type = "memory";
        reg = <0x0 0x80000000 0x0 0x40000000>; /* 1024 MB */
    };
And I tried to modify reg to "reg = <0x0 0x80000000 0x0 0x20000000>;"


In Board file I have changed Registers for DDR :

const struct emif_regs j6e_emif_2_regs_ddr3_532_mhz_1cs_dra_es1 = {


    .sdram_config_init = 0x61851AB2,            

    .sdram_config = 0x61851AB2,             

    .sdram_config2 = 0x00000000,                    

};

I have tried to modify .sdram_config_init from "0x618522B2" to "0x61851AB2" and sdram_config from "0x618522B2" to "0x61851AB2"

const struct dmm_lisa_map_regs j6e_lisa_map_4G_x_2_x_2 = {

    .dmm_lisa_map_0 = 0x0,

    .dmm_lisa_map_1 = 0x0,

    .dmm_lisa_map_2 = 0x0,

    .dmm_lisa_map_3 = 0x80500100,

    .is_ma_present  = 0x1

};

Modified .dmm_lisa_map_3 from "0x80600100" to "0x80500100"


 

U-Boot SPL EDGE
DRA722-GP ES2.0
Trying to boot from MMC1
U-Boot: CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 : u-boot.img
SPL: trying to load u-boot.img from secondry partition!!
reading u-boot.img
reading u-boot.img
reading u-boot.img
reading u-boot.img


U-Boot 2016.05-00333-ge1198ea-dirty (Jan 17 2018 - 11:33:14 +0530)

CPU  : DRA722-GP ES2.0
Model: TI AM5708 EDGE
Board: AM570x EDGE REV
       Watchdog enabled
DRAM:  512 MiB
MMC:   no pinctrl for sdr104
no pinctrl for ddr50
no pinctrl for sdr50
no pinctrl for sdr25
no pinctrl for sdr12
no pinctrl for hs200_1_8v
OMAP SD/MMC: 0, OMAP SD/MMC: 1
reading uboot.env

** Unable to read "uboot.env" from mmc0:1 **
Using default environment

SCSI:  0 device not found
ERROR: scsi device not found

at drivers/block/disk-uclass.c:43/scsi_init()
Net:   
Warning: ethernet@48484000 using MAC address from ROM
eth0: ethernet@48484000
U-Boot: Loaded, undefined EEPROM reg value!!
Kernel: Secondary Fail, booting from primary kernel!!
FS : Booting from primary FS!!
Autoboot in 2 seconds
EDGE# setenv boot_fit 0
EDGE# boot
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
reading boot.scr
** Unable to read file boot.scr **
reading uEnv.txt
** Unable to read file uEnv.txt **
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
reading zImage
3738192 bytes read in 173 ms (20.6 MiB/s)
reading am570x-edge.dtb
85212 bytes read in 10 ms (8.1 MiB/s)
Kernel image @ 0x82000000 [ 0x000000 - 0x390a50 ]
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Device Tree to 8ffe8000, end 8ffffcdb ... OK

Starting kernel ...


I have followed and changed accordingly but no luck :

https://e2e.ti.com/support/arm/automotive_processors/f/1020/t/651203 
 and

https://e2e.ti.com/support/arm/automotive_processors/f/1020/t/652269


Is there anything I am missing in configuration? I have Enabled Early printk from kernel also but there is no console log. I have Debugged spl via Jtag and I am able to write 512MB of (whole range) DDR via jtag.
Guide me in solving this problem.


Thank you,
Chintan. 

  • Which exactly processor and Linux SDK are you using?
  • Hi,

    I am using AM5708 processor and I am not using SDK, I am using Yocto ti kernel 4.4.41 and Uboot 2016-05.

  • Hi,

    Prerak Patel is my teammate and we were facing same issue when we had made revision A board with 1GB RAM. We had removed RTC and SATA and problem got resolved at that time. But Now we have changed RAM from 1GB to 512MiB and Now again we are facing same issue.

    Can you help me out here with this issue?

    Thank you,
    Chintan.

  • I've checked the fdt addresses, they seem okay. Can you attach the U-Boot environment variables, to check them too?

    => printenv

  • Hi Kemal,

    EDGE# printenv
    EXPORT  table = 9ff9e324, htab.size = 521, htab.filled = 68, size = 0
    Unsorted: n=68
              0: 9ef2ec40 ==> bootdir    => /boot
              1: 9ef2eca4 ==> bootm_size => 0x10000000
              2: 9ef2eda8 ==> boot_fit   => 0
              3: 9ef2ee48 ==> loadbootscript => load mmc ${mmcdev} ${loadaddr} boot.scr
              4: 9ef2eefc ==> dofastboot => 0
              5: 9ef2ef9c ==> netloadimage => tftp ${loadaddr} ${bootfile}
              6: 9ef2f064 ==> arch       => arm
              7: 9ef2f168 ==> mmcdev     => 0
              8: 9ef2f294 ==> fdtcontroladdr => 9ef18fb8
              9: 9ef2f320 ==> board_name => am570x_edge
             10: 9ef2f334 ==> pxefile_addr_r => 0x80100000
             11: 9ef2f49c ==> importbootenv => echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize}
             12: 9ef2f4c4 ==> scriptaddr => 0x80000000
             13: 9ef2f4d8 ==> envboot    => mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootscript; th;
             14: 9ef2f564 ==> dfu_alt_info_qspi => MLO raw 0x0 0x040000;u-boot.img raw 0x040000 0x0100000;u-boot-spl-os raw 0x140000 0x080000;u-bo0
             15: 9ef2f5dc ==> ethaddr    => e8:eb:11:de:aa:3e
             16: 9ef2f62c ==> fdt_addr_r => 0x88000000
             17: 9ef2f6a4 ==> dfu_bufsiz => 0x10000
             18: 9ef2f6e0 ==> finduuid   => part uuid mmc ${bootpart} uuid
             19: 9ef2f7a8 ==> bootscript => echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}
             20: 9ef2f7d0 ==> boot_fdt   => try
             21: 9ef2f848 ==> baudrate   => 115200
             22: 9ef2f960 ==> usbtty     => cdc_acm
             23: 9ef2f9c4 ==> args_fit   => setenv bootargs console=${console} root=${mmcroot} rw rootfstype=${mmcrootfstype}
             24: 9ef2fb18 ==> dfu_alt_info_mmc => boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw raw 0x100 0x100;u-boot.img.raw raw 0x300 0x4001
             25: 9ef2fc6c ==> bootcmd    => if test ${dofastboot} -eq 1; then echo Boot fastboot requested, resetting dofastboot ...;setenv dofast;
             26: 9ef2fcd0 ==> kernel_addr_r => 0x82000000
             27: 9ef2fe74 ==> mmcrootfstype => ext4 rootwait
             28: 9ef2ff50 ==> fit_loadaddr => 0x83000000
             29: 9ef2ff8c ==> bootfile   => zImage
             30: 9ef2ffb4 ==> netloadfdt => tftp ${fdtaddr} ${fdtfile}
             31: 9ef30018 ==> board      => edge
             32: 9ef30068 ==> stderr     => serial@48020000
             33: 9ef3007c ==> bootenvfile => uEnv.txt
             34: 9ef300a4 ==> vram       => 16M
             35: 9ef3016c ==> fdtfile    => undefined
             36: 9ef30298 ==> netargs    => setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts}p
             37: 9ef3034c ==> loadaddr   => 0x82000000
             38: 9ef304b4 ==> rdaddr     => 0x88080000
             39: 9ef304c8 ==> bootdelay  => 2
             40: 9ef304dc ==> dfu_alt_info_emmc => rawemmc raw 0 3751936;boot part 1 1;rootfs part 1 2;MLO fat 1 1;MLO.raw raw 0x100 0x100;u-boot.1
             41: 9ef305a4 ==> rootpath   => /export/rootfs
             42: 9ef305f4 ==> loadimage  => load ${devtype} ${bootpart} ${loadaddr} ${bootfile}
             43: 9ef3066c ==> fdtaddr    => 0x88000000
             44: 9ef306a8 ==> mmcroot    => /dev/mmcblk0p2
             45: 9ef30720 ==> nfsopts    => nolock
             46: 9ef3084c ==> stdin      => serial@48020000
             47: 9ef30860 ==> cpu        => armv7
             48: 9ef30874 ==> partitions => uuid_disk=${uuid_gpt_disk};name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}
             49: 9ef308d8 ==> stdout     => serial@48020000
             50: 9ef308ec ==> vendor     => ti
             51: 9ef3098c ==> loadfdt    => load ${devtype} ${bootpart} ${fdtaddr} ${fdtfile}
             52: 9ef309f0 ==> ramdisk_addr_r => 0x88080000
             53: 9ef30b6c ==> update_to_fit => setenv loadaddr ${fit_loadaddr}; setenv bootfile ${fit_bootfile}
             54: 9ef30e00 ==> loadfit    => run args_fit; bootm ${loadaddr};
             55: 9ef30e78 ==> console    => ttyO2,115200n8
             56: 9ef30ea0 ==> dfu_alt_info_ram => kernel ram 0x80200000 0x4000000;fdt ram 0x80f80000 0x80000;ramdisk ram 0x81000000 0x4000000
             57: 9ef30eb4 ==> soc        => omap5
             58: 9ef30f40 ==> mmcboot    => mmc dev ${mmcdev}; setenv devnum ${mmcdev}; setenv devtype mmc; if mmc rescan; then echo SD/MMC found ;
             59: 9ef30fb8 ==> static_ip  => ${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
             60: 9ef3101c ==> fit_bootfile => edge.fit
             61: 9ef31058 ==> bootpart   => 0:3
             62: 9ef3115c ==> findfdt    => if test $board_name = omap5_uevm; then setenv fdtfile omap5-uevm.dtb; fi; if test $board_name = dra7xx)
             64: 9ef311ac ==> loadbootenv => fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
             65: 9ef3133c ==> mmcloados  => run args_mmc; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${l;
             66: 9ef313b4 ==> netboot    => echo Booting from network ...; setenv autoload no; run netloadimage; run netloadfdt; run netargs; boot}
             67: 9ef31454 ==> args_mmc   => run finduuid;setenv bootargs console=${console} ${optargs} root=${mmcroot} rw rootfstype=${mmcrootfstyM
    arch=arm
    args_fit=setenv bootargs console=${console} root=${mmcroot} rw rootfstype=${mmcrootfstype}
    args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=${mmcroot} rw rootfstype=${mmcrootfstype} mem=512M
    baudrate=115200
    board=edge
    board_name=am570x_edge
    boot_fdt=try
    boot_fit=0
    bootcmd=if test ${dofastboot} -eq 1; then echo Boot fastboot requested, resetting dofastboot ...;setenv dofastboot 0; saveenv;echo Booting int;
    bootdelay=2
    bootdir=/boot
    bootenvfile=uEnv.txt
    bootfile=zImage
    bootm_size=0x10000000
    bootpart=0:3
    bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}
    console=ttyO2,115200n8
    cpu=armv7
    dfu_alt_info_emmc=rawemmc raw 0 3751936;boot part 1 1;rootfs part 1 2;MLO fat 1 1;MLO.raw raw 0x100 0x100;u-boot.img.raw raw 0x300 0x400;spl-o1
    dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw raw 0x100 0x100;u-boot.img.raw raw 0x300 0x400;spl-os-args.raw raw 0x80 0x81
    dfu_alt_info_qspi=MLO raw 0x0 0x040000;u-boot.img raw 0x040000 0x0100000;u-boot-spl-os raw 0x140000 0x080000;u-boot-env raw 0x1C0000 0x010000;0
    dfu_alt_info_ram=kernel ram 0x80200000 0x4000000;fdt ram 0x80f80000 0x80000;ramdisk ram 0x81000000 0x4000000
    dfu_bufsiz=0x10000
    dofastboot=0
    envboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootscript; then run bootscript;else if run lo;
    ethaddr=e8:eb:11:de:aa:3e
    fdt_addr_r=0x88000000
    fdtaddr=0x88000000
    fdtcontroladdr=9ef18fb8
    fdtfile=undefined
    findfdt=if test $board_name = omap5_uevm; then setenv fdtfile omap5-uevm.dtb; fi; if test $board_name = dra7xx; then setenv fdtfile dra7-evm.d
    finduuid=part uuid mmc ${bootpart} uuid
    fit_bootfile=edge.fit
    fit_loadaddr=0x83000000
    importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize}
    kernel_addr_r=0x82000000
    loadaddr=0x82000000
    loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
    loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr
    loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${fdtfile}
    loadfit=run args_fit; bootm ${loadaddr};
    loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootfile}
    mmcboot=mmc dev ${mmcdev}; setenv devnum ${mmcdev}; setenv devtype mmc; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadi;
    mmcdev=0
    mmcloados=run args_mmc; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdtaddr}; else if;
    mmcroot=/dev/mmcblk0p2
    mmcrootfstype=ext4 rootwait
    netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
    netboot=echo Booting from network ...; setenv autoload no; run netloadimage; run netloadfdt; run netargs; bootz ${loadaddr} - ${fdtaddr}
    netloadfdt=tftp ${fdtaddr} ${fdtfile}
    netloadimage=tftp ${loadaddr} ${bootfile}
    nfsopts=nolock
    partitions=uuid_disk=${uuid_gpt_disk};name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}
    pxefile_addr_r=0x80100000
    ramdisk_addr_r=0x88080000
    rdaddr=0x88080000
    rootpath=/export/rootfs
    scriptaddr=0x80000000
    soc=omap5
    static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
    stderr=serial@48020000
    stdin=serial@48020000
    stdout=serial@48020000
    update_to_fit=setenv loadaddr ${fit_loadaddr}; setenv bootfile ${fit_bootfile}
    usbtty=cdc_acm
    vendor=ti
    ver=U-Boot 2016.05-00333-ge1198ea-dirty (Jan 19 2018 - 15:52:20 +0530)
    vram=16M


    Thank you,
    Chintan.

  • The environment variables are okay too. Can you explicitly inform the kernel about DDR size and check then whether the board boots successfully?

    => setenv optargs mem=512M
    => saveenv