Configure DDR Clock for imx7D

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Configure DDR Clock for imx7D

3,080 Views
sivaprasadtirul
Contributor I

Hi,

We have a custom board based on imx7d7dvk10sc. We assume the current DDR is running at 666.6 MHz.

But we are not able to confirm this in uboot source code. Could some one point me how can I print the ddr frequency in uboot reading from appropriate .cfg files.

Looking forward for inputs.

Thanks,

Siva

Labels (2)
Tags (1)
0 Kudos
Reply
7 Replies

2,373 Views
sivaprasadtirul
Contributor I

Hi Igor,

Thanks for your response.

I have enabled the bus frequency driver using the below 

echo 1 > /sys/bus/platform/drivers/imx_busfreq/soc\:busfreq/enable

* To change to Audio Playback setpoint on iMx7Dual to operate ddr @ 100 MHz on the fly.

   - I wrote a test driver to call the update_ddr_freq_imx_smp(100000000) API to force ddr frequency to 100 MHz. But I don't see the frequency change when I measured using oscilloscope. Still, the system runs on 533 MHz

  - I also tried to change the default setting of bus frequency to 100 MHz in the device tree. But the system bootsup with again 533 MHz.

Is this right approach to change the frequency on the fly while system is running ?

Looking forward for your response.

Thanks,

Siva

0 Kudos
Reply

2,373 Views
igorpadykov
NXP Employee
NXP Employee

Hi Siva

one can follow sect.2.3.4.2 Software Operation attached Linux Manual,

start audio playback and turn off lcd. Linux automatically changes frequency using

bus freq driver. I do not think that it can be changed manually. Also please check

sect.4.3. Use case three: Audio_Playback, M4 idle AN5383 i.MX7DS Power

Consumption Measurement

https://www.nxp.com/docs/en/application-note/AN5383.pdf 

Best regards
igor

0 Kudos
Reply

2,373 Views
sivaprasadtirul
Contributor I

Hi igor,

Sorry for re-opining this ticket again. Now this became a blocker for us. If you think it cannot be changed manually.

How we can make DDR frequency change automatically either IRAM anything.

We would like to know any possible option that the DDR frequency can be changed from 533 MHz.

But we want to change the DDR clock from 533 MHz. Please do let us know changing from IRAM requires any official support ?

0 Kudos
Reply

2,373 Views
igorpadykov
NXP Employee
NXP Employee

Hi siva

please look at codes for changing ddr frequency (from nxp official linux repository)

busfreq-imx.c,busfreq_ddr3.c,busfreq_lpddr2.c

mach-imx\arm\arch - linux-imx - i.MX Linux kernel 

Best regards
igor

0 Kudos
Reply

2,373 Views
igorpadykov
NXP Employee
NXP Employee

Hi Siva

uboot uses default frequency, described in Table 6-28. Clock Root Setting by ROM

i.MX7D Reference Manual, note 533MHz is max. ddr frequency supported by DDR Controller

(DDRC) i.MX7D, as described in sect.1.4.7 External Memory Interface.

http://cache.nxp.com/files/32bit/doc/ref_manual/IMX7DRM.pdf


Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

2,373 Views
sivaprasadtirul
Contributor I

Hi igor,

Thanks for your reply. So, is that possible to lower the DDRC frequency below 533 MHz?

If so what are the possible options of various clocks that I can assign ? 

Could you also please point me to do it in the right way. 

Thanking you in advance for your help.

Best Regards,

Siva

0 Kudos
Reply

2,373 Views
igorpadykov
NXP Employee
NXP Employee

Hi Siva

nxp uboot does not change ddr frequency. It can be changed in linux, example below :
https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm/mach-imx/ddr3_freq_imx7d.S?h=imx_...
So it is necessary to add such codes to uboot, note code for ddr frequency change

should be performed from IRAM.

Best regards
igor

0 Kudos
Reply