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.

AM335X DDR3 board port configuration

Other Parts Discussed in Thread: TPS65910

I am bringing up a custom board with TPS65910 PMIC and DDR3. I have made a board port folder under /board/ti/am335xcustom which is based on /board/ti/am335x. I used the same configuration as include/configs/am335x_evm.h while i am debugging the MLO and UBOOT in RAM.  I built and  loaded MLO (Using CCS load memory feature)  into on-board RAM to initialize DDR3, clocks , PLL etc. MLO runs until it could not find Uboot in any of the onboard persistent storage devices (MMC/SD, NAND etc) . I expected this to be the outcome since i have not flash Uboot into on-board nand flash.  I then load Uboot into the configured DDR3. However, upon inspection of 0x80100000 (load address of Uboot) i see all zeros. Clearly my MLO is not correctly initializing DDR3. However, if i use the GEL file to initialize DDR3 followed my loading Uboot  into DDR3 memory, Uboot run and i get the delayed command prompt before it attempt to load the kernel. Where can i find a document that works me through the changes i need to make to my configuration file for MLO to correctly configure DDR3? At the moment i am forcing the configuration in /board/ti/am335x/evm.c by setting the variable " is_ddr3 = 1" . Apparently the SK_AM335x that i based my port on has an on-board EEPROM that stores the peripherals supported by the board. Since my custom board does not have an on-board EEPROM i just set the is_ddr3 variable. This forces the following sets of code to run:

        ddr_pll_config(303);
        config_am335x_ddr3()

Is this all that is required to have MLO correctly configure my DDR3? Thanks.

  • More than likely you will have to make changes to the ddr defs file located here:

    arch/arm/include/asm/arch-ti81xx/ddr_defs.h

    Here is a link to an EMIF configuration page, it has a section on DDR configuration, there is a tool that can be downloaded from this page

    http://processors.wiki.ti.com/index.php/AM335x_EMIF_Configuration_tips

    I don't know if it helps, but if you would like to use an alternate board file as a starting point one can be found here, this is part of the training labs used to demonstrate how to port u-boot. It is set up to be used on the BeagleBone Board. This file has had a lot of code removed and shows how to enable the MMC and ethernet interfaces.

    https://gitorious.org/sitara-board-port/sitara-board-port-uboot/blobs/board-port-05.04.01.00/board/ti/am335x/evm.c

     

  • Thanks very much for your input. I made a line-by-line copy of DDR3 Initialization in Code Composer Studio for the SOC and it worked. Through this process i found out that the ported c-code in the SDK does not work; at least not the version i had. Thanks .

    Staphae

  • Hi Staphae,

    Can you explain wat you did to fix this issue, i sucessfully loaded MLO to internal ram of processor using UART, but it couldn't load UBOOT image in to external ram, the same problem you faced.

    i couldn't understand " I made a line-by-line copy of DDR3 Initialization in Code Composer Studio for the SOC", it will be more helpful if you help on this to fix this issue.

    Thanks in advance

    Vinoth

  • Hi Vinoth,

    What debug message did you get when you ran MLO? If MLO runs successfully, then it should look for u-boot on one of the boot medium. And if you enable debug messages you will see a debug message to that effect.  However, even if  MLO could not find u-boot on say the SD Card, you can load u-boot into the external memory using Code Composer.

    What i suggest you do is have someone else look over the DDR3 Initialization code. A one line variation could make a difference and it's only by verifying that there is no error in your ported code that u will be sure that the initialization of DDR3 was successful. Once that is verified, you should be able to run u-boot.

    Please not that MLO will not necessary load u-boot, it might only initialize DDR3 and other processor settings. However, once MLO successfully configures the processor and DDR3, you should be able to load u-boot. If you are loading MLO through UART, could it be that MLO is also configured to look for u-boot on the UART? It all depends on where you configured MLO to look for u-boot.

    Hope that helps.

    Staphae

  • Hi Staphae,

    Thanks for your prompt reply. when i try to load uboot, my board was resetting, so i increased the current  and uboot was successfully loaded in UART, as this is my new custom board.

    -Vinoth