I'd like to change the frequency of the iMX6UL DDR clock via the PFD divider.
I've been able to change register "CCM_ANALOG_PFD_528n" field "PFD2_FRAC" in uboot and see clock adjust accordingly. However, after changing the fractional divider value, the "PFD2_STABLE" bit never shows stable (1), it stays (0).
What is the proper sequence of register writes so that the PFD is stable after editing?
I've read through EB790 (https://www.nxp.com/docs/en/engineering-bulletin/EB790.pdf ) but it does not seem to give an example of changing the frequency divider, just disabling or bypassing altogether.
Solved! Go to Solution.
Upon further reading of the IMX6ULRM, I re-read this section:
This seems to imply that the PFD2_STABLE bit will merely invert when stable...so won't necessarily be (1). So perhaps it is fine that the bit remains (0) after I adjust the divider, as it was (1) previously.
Is this is a correct interpretation?
Upon further reading of the IMX6ULRM, I re-read this section:
This seems to imply that the PFD2_STABLE bit will merely invert when stable...so won't necessarily be (1). So perhaps it is fine that the bit remains (0) after I adjust the divider, as it was (1) previously.
Is this is a correct interpretation?
yes this is correct interpretation.
Best regards
igor
Hi Nick
examples of changing ddr frequency can be found in
llinux..arm/mach-imx/busfreq_ddr3.c, ddr3_freq_imx6sx.S
mach-imx\arm\arch - linux-imx - i.MX Linux kernel
and description in sect.2.5.4 Dynamic Bus Frequency attached Linux Manual.
Note ddr freqeuncy changing should be done from OCRAM, not by code running on ddr.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi igor,
Is there an example of doing this in u-boot? I am using mainline u-boot based on the iMX6UL EVK board.
My initial inclination is to put a modification in the `imximage.cfg` DCD script, but it looks like there's some loops involved in the assembly code you linked...so that would be difficult with plain register writes that the DCD script allows.
Is there a u-boot C function that already exists for modifying DDR clock (and perhaps calls the underlying assembly code you mentioned)?
Hi Nick
nxp uboot does not support modifying ddr clock, in general one can look
at spl uboot:
ventana/bootloader – Gateworks
Best regards
igor