iMX28 - change the CPU frequency on the fly.

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

iMX28 - change the CPU frequency on the fly.

2,237 Views
AhmetYUCE
Contributor II
i.MX28 EVK Linux Reference Manual, Chapter 7 ( CPU Frequency Scaling (CPUFREQ) Driver ) says its possible to change CPU frequency on the fly using the procedures given on this chapter. cpufreq/stats/time_in_state reports available frequencies as 261818, 360000 and 454736 (all in KHz). If i try to change frequency other than 454.73MHz CPU locks up. Tried on both iMX28 EVK and my custom board, results are the same. Any one tried to change the CPU frequency on the fly ? Is it working or CPUFREQ driver is broken? Regards Ahmet
Tags (1)
7 Replies

1,043 Views
AhmetYUCE
Contributor II
it would be "there is no apparent signal timing problem" , sorry for mistype.
0 Kudos

1,043 Views
AhmetYUCE
Contributor II
The patch, you attached, issued after i've opened a service ticket and spend almost a month on the issue with the FAE. During this time, some other oddities revealed like changing emi pad driver strengths triggers such lock-ups, although there is to apparent signal timing problem. Unfortunately the reason could not be not as simple as you suggested. I can still reproduce problem with two different HW and two different size and models of DDR-II. Be careful with iMX28, it have some surprises.
0 Kudos

1,043 Views
djcatter
Contributor I

Any follow up on this? Just ran into the same issue yesterday. I did include:

L2.6.35_10.12_EMI_FREQ_PATCH_UP/0001-ENGR00000000-Workaround-for-bus-freq-change.patch

The patch in the post above uses the same settings for all of the DDR2, this can also be accomplished in the profiles. Seems like this is an old issue that has not been addressed.

Derek

0 Kudos

1,043 Views
Matt_
Contributor II

On my board the problem is caused by the line DRAM_REG[44] = 0x01020202; in the DDR2 133MHz definition in emi_settings.c

The value of 01 breaks the tWTR minimum timing requirement of 2 clocks or 7.5ns whichever is greater in the Micron datasheet for the DDR2 part I use.

Changing the value to 0x02020202 works for me.

Hope this helps some-one.

Clock switching saves 20% power for me and is well worth a look for idle periods.

Matt

0 Kudos

1,043 Views
YiLi
Contributor I
attached the patch
0 Kudos

1,043 Views
olistudent
Contributor I

Thank you for the patch. I can switch cpu frequencies through the sysfs interface on the fly now.

Regards

Oliver

0 Kudos

1,043 Views
YiLi
Contributor I
The CPU lockup is indeed DDR2 memory lockup, since scaling down CPU clock will lower DDR2 clock too. It only appears at Rev D board which has a different DDR2 chip. One workaround (attached patch) is to keep the DDR controller setting the same as 200Mhz even we lower the DDR clock rate.
0 Kudos