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/TDA2SX: memory node in dts file

Part Number: TDA2SX

Tool/software: Linux

Dear TI,

 I am now study dra7-evm-infoadas.dts about the memory node.

The memory node is defined in 'dra7-evm.dts' as:

I dumped dra7-evm-infoadas.dtb with dtbdump tool as .txt file, in which i found memory node was defined as:

My quetions:

1. Is the memory node used for define DDR memory?

2. The ddr address width are defined as 64bit?

3. Why 1536MB is used while the memory map defined in mem_segment_definitioin_linux.xs is 1GB?

4. Why the length of memory node in the dumped txt file is defined as 0x361726d76(3GB)?

   The dra7-evm-infoadas.dtb is generated by dtc tools according to dra7-evm-infoadas.dts,  dra7-evm.dts, dra74x.dtsi, dra7.dtsi, dra7-evm-common.dtsi.

   I ask this quetion because i cannot find any information about memory node in the other files except dra7-evm.dts.

5. How should i decide if i shoud modify the memory node or not in my own dts file?

Regards,

Liu Gan

  • Hi Liu,

    1. Yes this node is used by Linux. This node is however overwritten by u-boot based on DDR available.
    2. The ddr address width is 32bit
    3. 1.5GB is default. All our EVMs ship with atleast 1.5GB RAM and this is why set this as the default. The mem_segment_definitioin_linux.xs is the DDR view available for M4. M4 at any point can only access 1GB of DDR.
    4. Again, as indicated, the DTB is overwritten by u-boot. The DDR available on the EVM is mentioned in EEPROM. Please see board_ti_get_emif_size() in board/ti/dra7xx/evm.c for the RAM size available.
    5. You don't need to modify the memory node in your DTS file.

    Regards
    Shravan
  • Hi Shravan,

    Thank you very much for your detailed reply.
    I got another two questions about this.

    1. When you say that i don't need to modify the memory node in my DTS file, you mean that u-boot will overwritten the memory node info by function board_ti_get_emif_size(), so i don't need to modify myself. Am i right?
    2. I get my own DTS file copy from dra7-evm-infoadas.dts. Which nodes should i modify typically?
    Can't it be just disable more devices that are not used in my custom board? And then modify the reserverd memory section according to the mem_segment_definitioin_linux.xs file?

    Hope for your reply!

    Regards,
    Liu Gan
  • Hi Liu,

    1. Yes, you don't need to modify this. You must make sure ti_get_emif_size returns the correct EMIF size. Make sure EEPROM has correct DDR size flashed, if EEPROM isn't flashed, hard-code ram_size to the RAM available on your board. After this the correct memory size will be reflected.
    2. Yes, this is what you need. Disable devices not used and modify reserved memory and CMA entries.

    Regards
    Shravan
  • Hi Shravan,

    I have no eeprom in my custom board.

    And I  have learned that the emif size is read from the end of the spl image.

    For TDA2x the ram address range from 0x4037DC28(0x4037E000-0x400+0x28) to 0x4037DE28 is used to store eeprom data.

    My questions is  when and how the address range mentioned above is filled with eeprom data structure.

    And if i have no eeprom in my custom board, how should i write the same range ram space.

    What's more, you mentioned that  the DTB is overwritten by u-boot. I just want to know how this is achieved.

    As far as i know, args_mmc command in the uenv.txt can pass mem parameter to kernel. Is that the way?

    My uenv.txt:

    As it can be seen, the mem is 1GB, which is diff from the memory info get from the dtb file.

    Regards,

    Liu Gan

  • Hi Liu,

    Passing command-line argument alone is not sufficient. The EMIF also needs to be configured correctly depending on the amount of DDR available.
    If you don't have EEPROM, just modify the board_ti_get_emif_size() macro to return the size of DDR available on your system.
    Passing the boot-arguments in kernel can merely be used to shrink the DDR view for kernel (i.e if you have 3GB, you can provide kernel 2GB), but configuring of EMIF for DDR available happens from u-boot.

    Regards
    Shavan