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 DRAM-related setting

Hi,

I want to modify the following parameters in DRAM.

Are these value only configured in u-boot? or also in kernel ?

SDRAM_CONFIG_ADDR     

SDRAM_DUNIT_CTRL_LOW_ADDR 

SDRAM_TIMING_LOW_ADDR  

SDRAM_TIMING_HI_ADDR      

SDRAM_ADDR_CTRL_ADDR      

SDRAM_MODE           

SDRAM_EXT_DRAM_MODE_ADDR  

DDR_CONTROLLER_CTRL_HIGH

DDR2_SDRAM_TIMING_LOW

DDR2_SDRAM_TIMING_HIGH

SDRAM_SRAM_ODT_CNTL_LOW

SDRAM_ODT_CONTROL 

Thank you!

  • Hi Sophia,

    Where are you looking at these registers? The DDR is configured in the SPL in the s_init() function which can be found in <u-boot_dir>/board/ti/am335x/board.c:

    	if (!strncmp("A335X_SK", header.name, HDR_NAME_LEN))
    		config_ddr(303, MT41J128MJT125_IOCTRL_VALUE, &ddr3_data,
    			   &ddr3_cmd_ctrl_data, &ddr3_emif_reg_data);
    	else if  (!strncmp("A335BNLT", header.name, 8))
    		config_ddr(400, MT41K256M16HA125E_IOCTRL_VALUE,
    			   &ddr3_beagleblack_data,
    			   &ddr3_beagleblack_cmd_ctrl_data,
    			   &ddr3_beagleblack_emif_reg_data);
    	else if (!strncmp("A33515BB", header.name, 8) &&
    				strncmp("1.5", header.version, 3) <= 0)
    		config_ddr(303, MT41J512M8RH125_IOCTRL_VALUE, &ddr3_evm_data,
    			   &ddr3_evm_cmd_ctrl_data, &ddr3_evm_emif_reg_data);
    	else
    		config_ddr(266, MT47H128M16RT25E_IOCTRL_VALUE, &ddr2_data,
    			   &ddr2_cmd_ctrl_data, &ddr2_emif_reg_data);

    The ddr_data structures can be found in the same file. The DDR specific header file with all the definitions is <u-boot_dir>/arch/arm/include/asm/arch-am33xx/ddr_defs.h.

    This configuration is done only in the SPL.

    These files I refer to are from the PSP version 04.06.00.11.

    Best regards,
    Miroslav

  • Hi Miroslav,

    Thank you for your answer!

    I just want to make sure that Linux kernel *DO NOT* need to do any modification with memory replacement.