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.
The SoC we are using is AM5718, hence have been referring to the data sheet with the name "SPRS957G –MARCH 2016–REVISED MAY 2018". Table 6-15 in that document states that EMIF_DLL_FCLK max frequency is 266 MHz. This corresponds to DDR3-1066.
The U-Boot code base is TI's distribution, branch ti2017.04-rc1. The board file on which we based our own board file, board/ti/am57xx/board.c contains code to set up PRCM based on the processor model, choosing either a "DRA72X" or "DRA7XX" configuration. For the purposes of that test, our processor type, as determined by the code reading version registers, is DRA722-GP ES2.0 so the code chooses the "DRA72X" configuration. The only difference between those two configurations is in the setup of the DDR DPLL. While the DRA7XX setup is for DDR-1066 (EMIF_DLL_FCLK = 266 MHz), the DRA72X setup is for DDR-1333 (EMIF_DLL_FCLK = 333 MHz).
So I have a TI data sheet telling me in effect that the highest supported speed grade is DDR-1066 but TI code choosing the higher speed grade DDR-1333. So is this a mistake in the data sheet, a bug in the code, or confusion on my part?
Section 8.2.2.5 definitely states that DDR3-1333 is supported. But as I understand things, there is an apparent inconsistency in that document. Here's my reasoning:
So as I understand your reply, I can rely on section 8.2.2.5 of the data sheet and run DDR3-1333 with EMIF_DLL_FCLK = 333 MHz and can ignore Table 6-15 in that same data sheet that says I cannot run that fast?
Hi David, EMIF_DLL_FCLK should stay its max of 266MHz. If you look at Figure 3-55 in the TRM, you will see that EMIF_DLL_GCLK source is from CLKOUTX2_H11. H11 is a post divider off the DDR PLL. Go back to Figure 3-45 to see the PLL block diagram and the output from H11 post divider
If you look at the formulas under Fig 3-45, you can derive EMIF_DLL_GCLK as (Fref * 2 * M / (N+1))/H11. For both DDR3-1066 and DDR-1333 options, H11=8, as shown in the code below from u-boot, and the result of the formula is 266MHz for both cases as well.
static const struct dpll_params ddr_dpll_params_2664mhz[NUM_SYS_CLKS] = {
{111, 0, 2, 1, 8, -1, -1, -1, -1, -1, -1, -1}, /* 12 MHz */
{333, 4, 2, 1, 8, -1, -1, -1, -1, -1, -1, -1}, /* 20 MHz */
{555, 6, 2, 1, 8, -1, -1, -1, -1, -1, -1, -1}, /* 16.8 MHz */
{555, 7, 2, 1, 8, -1, -1, -1, -1, -1, -1, -1}, /* 19.2 MHz */
{666, 12, 2, 1, 8, -1, -1, -1, -1, -1, -1, -1}, /* 26 MHz */
{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, /* 27 MHz */
{555, 15, 2, 1, 8, -1, -1, -1, -1, -1, -1, -1}, /* 38.4 MHz */
};
static const struct dpll_params ddr_dpll_params_2128mhz[NUM_SYS_CLKS] = {
{266, 2, 2, 1, 8, -1, -1, -1, -1, -1, -1, -1}, /* 12 MHz */
{266, 4, 2, 1, 8, -1, -1, -1, -1, -1, -1, -1}, /* 20 MHz */
{190, 2, 2, 1, 8, -1, -1, -1, -1, -1, -1, -1}, /* 16.8 MHz */
{665, 11, 2, 1, 8, -1, -1, -1, -1, -1, -1, -1}, /* 19.2 MHz */
{532, 12, 2, 1, 8, -1, -1, -1, -1, -1, -1, -1}, /* 26 MHz */
{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, /* 27 MHz */
{665, 23, 2, 1, 8, -1, -1, -1, -1, -1, -1, -1}, /* 38.4 MHz */
};
Regards,
James
I'm afraid I'm still confused.
The equation for EMIF_DLL_GLCK depends on Fref, M, N, and H11. For the two cases, Fref, N, and H11 are the same values of, respectively 20 MHz, 4, and 8. However M is either 333 or 266. Therefore EMIF_DLL_GCLK must differ between those two cases. If I rewrite that equation, substituting in values that are constant between the two cases, I get
EMIF_DLL_GCLK = (20 x 2 x M / (4 +1)) / 8 = M
Further, there's this cool tool, TI_Clock_Tree_Tool written in Java that I downloaded from the TI website. This shows the whole clock system and allows one to click on various objects in the diagram, fill in the parameters, and see the results on the diagram as well as the bit patterns in the controlling registers. Using that tool and filling in Fref, M, N, and H11, I also see EMIF_DLL_GLCK set to either 333 MHz or 266 MHz depending on the value of M.
Can you help me see the error in my logic?