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.

AM6548: 2GB / 4GB RAM size config problem

Part Number: AM6548

Hello.

We are developing a device based on the AM6548 SR2.0 processor.

For development, we use the Linux SDK for AM65x 07_00_00_08.

 

The device will have 4Gb and 2Gb RAM memory. We use _defconfig to change 2G/4G options (2 devicetree file options).

Through conditional compilation (define) we set the memory size in uBoot in the file evm.c

                /* 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;

#ifdef CONFIG_2GB_DEVICE

                gd->bd->bi_dram[1].size = 0;

                gd->ram_size = 0x80000000;

#else

                gd->bd->bi_dram[1].size = 0x80000000;

                gd->ram_size = 0x100000000;

#endif

#endif

 

When compiling the 2GB version of the device, the USB bus and Ethernet works normally. When compiling the 4GB version we get an error:

[   9.430219] am65-cpsw-nuss 46000000.ethernet: phy /interconnect@100000/interconnect@28380000/ethernet@46000000/mdio@f00/ethernet-phy@0 not found on slave 1

We found out that this error is fixed if we remove DDR high region.

Can you tell us what might be causing this problem?

  • Hi Artem,

    I will check on this at my end and come back to you.

    Best Regards,
    Keerthy

  • Hi Artem,

    I am using an am65x-evm PG 1.0 and i did not see the above trace. The memory on board is 4GB.
    The description above is bit confusing. Did you see a compilation error or it was runtime error on the
    target?

    - Keerthy

  • Can you provide your uboot log? How much memory do you have displayed in uBoot 2G or 4G?

    We found out that the error occurs when specifying the value of the beginning of the second memory bank.

    gd->bd->bi_dram[1].start = CONFIG_SYS_SDRAM_BASE1;

    If it CONFIG_SYS_SDRAM_BASE1 is 0x880000000, then we get an error.



    Here is our memory configuration in devicetree.

    memory@80000000 {

    device_type = "memory";

    /* 4G RAM */

    reg = <0x00000000 0x80000000 0x00000000 0x80000000>,

    <0x00000008 0x80000000 0x00000000 0x80000000>;

    };



    We are using commands from Processor SDK 07_00_01 Linux documentation to build u-boot:

    $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- <our_r5_defconfig> O=<output directory>/r5

    $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=<output directory>/r5

    $ make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- <our_a53_defconfig> O=<output directory>/a53

    $ make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- ATF=<path to tisdk>/board-support/prebuilt-images/bl31.bin TEE=<path to tisdk>/board-support/prebuilt-images/bl32.bin O=<output directory>/a53



    We added the CONFIG_PHYS_64BIT=y flag in defconfig

    After that, the build report often displays warnings about incorrect type conversion (uint64 to uint32).

    Do you have it installed on your defconfig file?

  • Hi Artem,

    Boot log:


    U-Boot SPL 2020.01-gf9b0d030d3 (Jul 08 2020 - 13:08:37 +0000)
    SYSFW ABI: 3.0 (firmware rev 0x0014 '20.04.1-v2020.04a (Terrific Lla')
    Trying to boot from MMC2
    Starting ATF on ARM64 core...

    NOTICE: BL31: v2.3():07.00.00.005-dirty
    NOTICE: BL31: Built : 12:40:13, Jul 8 2020

    U-Boot SPL 2020.01-gf9b0d030d3 (Jul 08 2020 - 13:05:44 +0000)
    SYSFW ABI: 3.0 (firmware rev 0x0014 '20.04.1-v2020.04a (Terrific Lla')
    Trying to boot from MMC2


    U-Boot 2020.01-gf9b0d030d3 (Jul 08 2020 - 13:05:44 +0000)

    SoC: AM65X SR1.0
    Model: Texas Instruments AM654 Base Board
    Board: AM6-COMPROCEVM rev E3
    DRAM: 4 GiB
    MMC: sdhci@4f80000: 0, sdhci@04FA0000: 1
    Loading Environment from MMC... OK
    In: serial
    Out: serial
    Err: serial
    Net:
    Warning: cpsw_nuss@046000000 using MAC address from ROM
    eth0: cpsw_nuss@046000000, eth1: pruss2_eth
    Hit any key to stop autoboot: 0

    So as you can see it is 4GB.

    You need not redefine  CONFIG_PHYS_64BIT=y.
    This is already part of arch/arm/Kconfig for arm64 builds.

    Can you try booting the 4GB board with the binaries in board-support/prebuilt-images?

    Best Regards,
    Keerthy

  • Thanks for the answer.
    Unfortunately, we have a different board design from TI and we have a different board configuration (including timings and configuration). For that reason, we cannot run the original image.

  • Artem,

    Understood. So the changes that you made in evm.c is something that already
    should be present for 4GB. It should work as long as the ddr timings etc are taken care of
    like you mentioned above.

    Best Regards,
    Keerthy

  • Thank you for reply!

    Could you check please and send booting kernel log for processor AM6548 with Silicon Revision 2.0 and 4 GB RAM size.

    Best regards,

    Aretm

  • Hi Artem,

    Here it is: 

    Hope this helps you.

    Best Regards,
    Keerthy