i.MX 8MQuad EVK, change DDR frequency

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

i.MX 8MQuad EVK, change DDR frequency

1,552 Views
jekim
Contributor III

Hello,

My DISTRO version is 4.9.88_2.0.0. I'm going to change DDR(lpddr4) frequency. Reference manual mentioned fsl-imx8mq.dtsi, busfreq-imx8mq.c and busfreq-imx.h are related with it. I'm not familiar with this program yet. Can I refer to any example code about bus frequency modification?

In addtition, below folder arch/arm/mach-imx is also introduced in reference manual. Frequency related files seem not related with lpddr4 for i.MX 8Mquad EVK. Can I ignore this mach-imx folder?

In case, I do compilation with modified source code, I would have to burn SD card again with new image file.

Is there any way to change DDR frequency w/o compilation at u-boot prompt or whatever?

Best Regards,

Jeff

user@TW-JEFF:~/imx-yocto-bsp/build-wayland/tmp/work/aarch64-poky-linux/linux-libc-headers/4.9-r0/git/arch/arm/mach-imx$ ls -l *freq*
-rw-r--r-- 1 user user 20547  六  27 16:09 busfreq_ddr3.c
-rw-r--r-- 1 user user 40093  六  27 16:09 busfreq-imx.c
-rw-r--r-- 1 user user 10265  六  27 16:09 busfreq_lpddr2.c
-rw-r--r-- 1 user user 21474  六  27 16:09 ddr3_freq_imx6.S
-rw-r--r-- 1 user user 15519  六  27 16:09 ddr3_freq_imx6sx.S
-rw-r--r-- 1 user user 10549  六  27 16:09 ddr3_freq_imx7d.S
-rw-r--r-- 1 user user 15002  六  27 16:09 lpddr2_freq_imx6q.S
-rw-r--r-- 1 user user 12219  六  27 16:09 lpddr2_freq_imx6.S
-rw-r--r-- 1 user user  9442  六  27 16:09 lpddr2_freq_imx6sll.S
-rw-r--r-- 1 user user 10005  六  27 16:09 lpddr2_freq_imx6sx.S
-rw-r--r-- 1 user user  8336  六  27 16:09 lpddr3_freq_imx.S

Labels (1)
0 Kudos
5 Replies

1,105 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jeff

algorithms describing change of DDR frequency are provided in

sect.2.3.4 Dynamic Bus Frequency attached Linux Manual. I am afraid it is

not possible to change DDR frequency by changing dts or some piece of linux code,

as it is integrated to whole chip clock framework and operation of other modules may be

affected by its change. DDR/BUS frequency can be disabled or enabled using commands

given on p.66 Linux Manual.

>Frequency related files seem not related with lpddr4 for i.MX 8Mquad EVK. Can I ignore this mach-imx folder?

one can ignore not related to lpddr4 files, but not whole mach-imx folder.

>Is there any way to change DDR frequency w/o compilation at u-boot prompt or whatever?

I am afraid not.

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

0 Kudos

1,105 Views
jekim
Contributor III

Hi igor,

Thank you for reply. You suggested me to enable the bus frequency scaling from user space than modifying source codes. The enabling command should be "echo 1 > /sys/device/platform/busfreq/enable".

I'm not clear what does "user space" exactly mean. In addition, above command seems just enabling bus frequency driver.

But, I still have to specify what new frequency should be. I can't find this introduction from the manual. Could you let me know how can I specify desired DDR frequency after enabling bus frequency driver?

Best Regards,

Jeff

0 Kudos

1,105 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jeff

bus frequency driver has codes for changing ddr frequency.

Best regards
igor

0 Kudos

1,105 Views
jekim
Contributor III

Hi igor,

That's great. Could you let me know relevant manual page for bus frequency driver codes?

Best Regards,

Jeff

0 Kudos

1,105 Views
igorpadykov
NXP Employee
NXP Employee

it is in linux/drivers/soc/imx/busfreq-imx8mq.c

busfreq-imx8mq.c\imx\soc\drivers - linux-imx - i.MX Linux kernel 

Best regards
igor