Part Number: PROCESSOR-SDK-AM335X
I am updating from U-Boot 2015.07 to 2017.01 and there have been many changes to the way the clocks were setup. The CLK_M_OSC on my board is 25MHz and set as such in the U-boot configuration. However, when the DDR DPLLs are set up in the SPL, the processor hangs at with an invalid instruction exception. Looking into the clock settings in clock_am33xx.c, there are the dpll_params for 303MHz, 400Hz and 266Mhz. My board is going to run at 400MHz, so this is the table as defined:
const struct dpll_params dpll_ddr3_400MHz[NUM_CRYSTAL_FREQ] = {
{125, 5, 1, -1, -1, -1, -1}, /*19.2*/
{50, 2, 1, -1, -1, -1, -1}, /* 24 MHz */
{16, 0, 1, -1, 4, -1, -1}, /* 25 MHz */
{200, 12, 1, -1, 4, -1, -1} /* 26 MHz */
};
So seemingly for a 25MHz CLK_M_OSC it would take the third element, which makes sense:
m = 16, n = 0 => m * 25 / n + 1 = 16 * 25 / 1 = 400MHz. Great right?
But why is M4 set. Correct me if I am wrong, but I don't see M4 connected to anything in the TRM. And if I go back to 2015.07 U-Boot the DLL params are described as:
const struct dpll_params dpll_ddr_bone_black = {400, OSC-1, 1, -1, -1, -1, -1};
Which seems to make more sense. Nonetheless if I change M4 from 4 to -1 in the new U-Boot everything works and the board comes up fine. Is this a typo in the configuration?
Thanks,
Chris