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.

TMDS64EVM: Change DRAM frequency speed?

Part Number: TMDS64EVM
Other Parts Discussed in Thread: AM6442, SYSCONFIG

Hello

For our hardware based on AM6442 SoC we are building image using Yocto and SDK 8 TI meta layers. We are using MT53E1G16D1FW DRAM chip.

1. How to check at what frequency DRAM is running on hardware?

2. Is there is some place in the code or device tree where default frequency is set for DRAM and how can I change it?

BR

Jakub

  • Hi Jakub,

    1. How to check at what frequency DRAM is running on hardware?

    You could use the `k3conf` tool for this to get the DDR module input frequencies, together with the clock ID for that peripheral (https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/am64x/devices.html#soc-doc-am64x-public-devices-desc-device-list):

    $ k3conf dump clock 138

    2. Is there is some place in the code or device tree where default frequency is set for DRAM and how can I change it?

    The frequencies are set in the DDR-specific device tree file generated by the DDR config tool (part of SYSCONFIG, https://www.ti.com/tool/SYSCONFIG). For TI boards those can be found in the U-Boot tree like shown here:

    $ cat arch/arm/dts/k3-am64-evm-ddr4-1600MTs.dtsi
    // SPDX-License-Identifier: GPL-2.0+
    /*
     * This file was generated with the
     * AM64x SysConfig DDR Subsystem Register Configuration Tool v0.08.40
     * Wed Feb 02 2022 16:24:50 GMT-0600 (Central Standard Time)
     * DDR Type: DDR4
     * Frequency = 800MHz (1600MTs)
     * Density: 16Gb
     * Number of Ranks: 1
     */
    
    #define DDRSS_PLL_FHS_CNT 6
    #define DDRSS_PLL_FREQUENCY_1 400000000         <=== THIS
    #define DDRSS_PLL_FREQUENCY_2 400000000         <=== THIS
    
    #define DDRSS_CTL_0_DATA 0x00000A00
    #define DDRSS_CTL_1_DATA 0x00000000
    #define DDRSS_CTL_2_DATA 0x00000000
    <snip>

    Note that you should use the tool to setup your DDR parameters including frequencies; don't edit those DTS files directly.

    Regards, Andreas