- Download and install Milestone Overclock (this is just so you can grab the kernel module).
- Find overclock.ko from the milestone directory and move/copy it over to /system/lib/modules. You can optionally uninstall Milestone Overclock now - you no longer need it.
- Run the following script (be sure to substitute A, B, C, D with your own vsels, and W, X, Y, Z with your own frequencies).
echo 0xc05a8dcc > /proc/overclock/mpu_opps_addr
echo 0xc0048a00 > /proc/overclock/omap2_clk_init_cpufreq_table_addr
echo 0xc059b258 > /proc/overclock/cpufreq_stats_table_addr
echo 0xc02d1104 > /proc/overclock/cpufreq_stats_update_addr
echo D > /proc/overclock/max_vsel
echo Z00000 > /proc/overclock/max_rate
echo 1 W00000000 A > /proc/overclock/mpu_opps
echo 2 X00000000 B > /proc/overclock/mpu_opps
echo 3 Y00000000 C > /proc/overclock/mpu_opps
echo 4 Z00000000 D > /proc/overclock/mpu_opps
echo 0 Z00000 > /proc/overclock/freq_table
echo 1 Y00000 > /proc/overclock/freq_table
echo 2 X00000 > /proc/overclock/freq_table
echo 3 W00000 > /proc/overclock/freq_table
If you want the new settings to stick at boot, you'd want to put the script in /etc/init.d somewhere. You can name it 99overclock or something like that.
As for how you can determine the best frequencies and vsels, you'll have to experiment. If you're lazy, I recommend using something like Quickclock - the developer, Paul, is an awesome guy. :)
Finally, here's a nice trick. The numbers in the following file will tell you your usage pattern per frequency:
/sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_stateHere's an example:
bash-3.2# cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_stateYou will notice that your phone spends most of the time at the lowest clock frequency and rarely will it use the middle ones. Interesting, but expected.