Overclock NEW JXD Amlogic M3 Kernel - Android General

Hi,
Amlogic M3 cpu are cable to 1GHZ
The old firmwares for JXD devices has the amlogic CPU frequency set to 600MHZ.
The solution was easy, hex editing a9_clk estructure was possble overclock to 1GHZ.
But in the new firmwares for android ICS is not possible overclock, if hex edit the firmware setcpu marks 1GHZ but performance are only 800MHZ.
I search in the leaked source code but I dont found the limitation of 800MHZ.
Any help?

naxeras said:
Hi,
Amlogic M3 cpu are cable to 1GHZ
The old firmwares for JXD devices has the amlogic CPU frequency set to 600MHZ.
The solution was easy, hex editing a9_clk estructure was possble overclock to 1GHZ.
But in the new firmwares for android ICS is not possible overclock, if hex edit the firmware setcpu marks 1GHZ but performance are only 800MHZ.
I search in the leaked source code but I dont found the limitation of 800MHZ.
Any help?
Click to expand...
Click to collapse
Any with amlogic CPU?
The limitation is in the kernel, I have source code of the kernel but i not found where is the limitation to 800MHZ.

naxeras said:
Any with amlogic CPU?
The limitation is in the kernel, I have source code of the kernel but i not found where is the limitation to 800MHZ.
Click to expand...
Click to collapse
See on arch/arm/mach-meson3 directory.
Maybe exists an clock.c file that has the limitation.
On M1 kernel is at https://github.com/CML/amlogic_m1_kernel/blob/ICS/kernel/arch/arm/mach-meson/clock.c (tested on b10ref and a00ref "up from 800mhx to 1ghz")
On M3 kernel maybe is at https://github.com/madmaze/Meson-3-Kernel/blob/master/arch/arm/mach-meson3/clock.c
Because is similar architecture.
¿Where is your tablet model/manufacturer?
Regards

Yes, in meson M3, have a clock.c, but I edit static struct clk a9_clk, in the max value to 1000000, but the limitation continues to 800000.
When I edit a9_clk in the sorce code or, with HEX edit, Set CPU says are 1GHZ but performance is 800MHZ, even I have another kernels without source code, with 600MHZ limitation.
Even I use openamlogic messon 3 clock.c in the JXD source code, but the limitation continues.
For try I edit max value to 1400000 but performace are same.
Manufacturer are JXD model s5110.

Which reference board is s5110 based on? Have you checked kernel's init.rc script (the part where governor and possible min/max frequency is set)?

stane1983 said:
Which reference board is s5110 based on? Have you checked kernel's init.rc script (the part where governor and possible min/max frequency is set)?
Click to expand...
Click to collapse
How I view the reference board?
In the governor min is 300 and max is 1000 but kernel only runs at 800.
Please help.

Related

[DEV ONLY] i9003 overclock module [need help from devs]

hello guys so i was looking at this project for Motorola Droid X:
http://code.google.com/p/milestone-overclock/
since Droid X has similar OMAP3630 chipset i thought we could try it out for this device...
if it has already been tried out by u guys then sorry for dupe post
anyways the sources available (milestone-overclock-module-1.4.8.tar.gz) were not directly compatible with the i9003 kernel sources (GB_CHN_UPDATE1) so i have modified it slightly.... and now the module gets compiled and it gets loaded (by insmod)... the sysfs and proc interface is active... even the app (MilestoneOverclock148.apk) detects the module correctly... but the changes dont work...
i invite all devs to help out with this...
modified sources are posted here:
https://github.com/DooMLoRD/i9003-overclock
noobs kindly dont spam this thread....
P.S.: Droid X has got overclock upto 1.4GHz with help of this so i am sure we can try little more overclock than 1.1GHz
If you look at the Samsung code in arch/arm/mach-omap2 and /plat-omap, and compare it with code seen for example in the nook color sources (OMAP 3630, see here), there are HUGE differences.
Normally the opp frequency table seems to be hard coded and easy to edit. Samsung on the other hand decided to dynamically assemble it in board-latona.c with info from cpufreq34xx.c (if I overlook that correctly). These differences could be the reason the module does not work.
Further, the line Amit and you changed in clock.c could - but I am not quite sure - actually lead to 10% higher clocks on every opp step. Because what you changed
Code:
- mpurate *= 1000000;
+ mpurate *= 1100000;
is a conversion factor from MHz to Hz. The line
Code:
if (mpurate < 1000)
above seems to be a logical check if the desired clock has been given in Hz or MHz, which is expected to be at max 800 for the 3630. For our 3640 the highest frequency is 1000, which would require the check to be
Code:
if (mpurate < 1001)
or similar, but they might have overlooked this change. If the input is below this boundary, it is thought to be in MHz, and is converted to match the internal logic which works with Hz only.
And two more questions: I experimented a lot with the OC code, and even added two new opps (1100/840 and 1200/865) to my tables. I could select them, and everything including cpufreq scaling tables was correct, but the CPU never was actually clocked above 1000MHz. Do you know why? And did you check if it is with your kernel (compare benchmark values, do not trust any other source, they all lie )?
previously i was also having milestone A853 and by the overclock module it can be overclocked to 1.2 ghz
XDA_Bam said:
If you look at the Samsung code in arch/arm/mach-omap2 and /plat-omap, and compare it with code seen for example in the nook color sources (OMAP 3630, see here), there are HUGE differences.
Normally the opp frequency table seems to be hard coded and easy to edit. Samsung on the other hand decided to dynamically assemble it in board-latona.c with info from cpufreq34xx.c (if I overlook that correctly). These differences could be the reason the module does not work.
Further, the line Amit and you changed in clock.c could - but I am not quite sure - actually lead to 10% higher clocks on every opp step. Because what you changed
Code:
- mpurate *= 1000000;
+ mpurate *= 1100000;
is a conversion factor from MHz to Hz. The line
Code:
if (mpurate < 1000)
above seems to be a logical check if the desired clock has been given in Hz or MHz, which is expected to be at max 800 for the 3630. For our 3640 the highest frequency is 1000, which would require the check to be
Code:
if (mpurate < 1001)
or similar, but they might have overlooked this change. If the input is below this boundary, it is thought to be in MHz, and is converted to match the internal logic which works with Hz only.
And two more questions: I experimented a lot with the OC code, and even added two new opps (1100/840 and 1200/865) to my tables. I could select them, and everything including cpufreq scaling tables was correct, but the CPU never was actually clocked above 1000MHz. Do you know why? And did you check if it is with your kernel (compare benchmark values, do not trust any other source, they all lie )?
Click to expand...
Click to collapse
Yes I know the changes in diff omap kernel sources... Spent a few hrs today comparing milestone/droid x and i9003 kernel sources to get this module complied and loading...
I am sure that the change done by amit is correct, because there is a very prominent change in linpack scores ~18 compared to ~16 which is typical of a 10% overclock...
As for ur other two questions I posted this earlier in the other thread
DooMLoRD said:
Not sure... These omap chips seem to have only 4 bins (300/600/800/1000)... We are currently making the 1000 MHz bin run at 1100mhz... I am not sure if we can add extra bins... I tried adding a lower 125MHz bin, it was shown by setcpu but the device never really went below 300mhz... May be we need to investigate it further...
Sent from my R800i using XDA App
Click to expand...
Click to collapse
P.S.: the chip on this phone is OMAP3630
Sent from my R800i using XDA App
DooMLoRD said:
I am sure that the change done by amit is correct, because there is a very prominent change in linpack scores ~18 compared to ~16 which is typical of a 10% overclock...
Click to expand...
Click to collapse
OK, so the overclock is working. Nice Concerning the mpurate, have a look here. The author is working at TI, so I expect him to be familiar with the code. However, that does not mean we can't use the conversion factor for overclock. It's just not "clean".
DooMLoRD said:
P.S.: the chip on this phone is OMAP3630
Click to expand...
Click to collapse
Yep, you're right. Got that wrong
---------- Post added at 10:50 PM ---------- Previous post was at 10:41 PM ----------
And another idea: For the Nook Color, there is a guy who implemented an interface and an app to change the clocks. It is different from droid-overclock, because he implemented a sysfs interface in the kernel sources. Hope this helps.
http://code.google.com/p/milestone-overclock/
sorry its of no use as yr already checked it out
XDA_Bam said:
And another idea: For the Nook Color, there is a guy who implemented an interface and an app to change the clocks. It is different from droid-overclock, because he implemented a sysfs interface in the kernel sources. Hope this helps.
Click to expand...
Click to collapse
That looks very much like the sysfs interface we added for VDD control on QSD8250/MSM7X30... Should work I think...
Sent from my R800i using XDA App
akashsgpgi said:
http://code.google.com/p/milestone-overclock/
sorry its of no use as yr already checked it out
Click to expand...
Click to collapse
U should be BANNED for spamming.... The link u posted is already there in the second line of the main post...
READ!!!!
Sent from my R800i using XDA App
I made progress with the sysfs interface seen on the Nook. Kernel boots, and the correct rates are displayed under /sys/power/mpu_freq_oppX. I was also able to set the hightest opp to 800 MHz, so that the two highest were both at the same frequency. The setting worked (confirmed with Linpack). But 1100 MHz was ignored (stayed at 1000). Looking into this further.
XDA_Bam said:
I made progress with the sysfs interface seen on the Nook. Kernel boots, and the correct rates are displayed under /sys/power/mpu_freq_oppX. I was also able to set the hightest opp to 800 MHz, so that the two highest were both at the same frequency. The setting worked (confirmed with Linpack). But 1100 MHz was ignored (stayed at 1000). Looking into this further.
Click to expand...
Click to collapse
so wht cpu freq table are u using exactly?
wht i think is we should concentrate on this (atleast for now):
just keep the 4 bins as is (300, 600, 800, 1000)
then try n get the access to these via sysfs (or proc)
see if we can modify them via that interface, say change 1000 to 1100 or change 800 to 900
and then do tests if these work...
if possible make a sysfs (or proc) interface for VDD (voltage control) too...
have u pushed the testing changes... i am working on same thing here... might help to speed things up...
I am currently testing on the master branch, so the branch is "wrong", but this is the commit:
Sysfs interface
Because only underclock works as of now, I am tested setting
Code:
if (mpurate < 2000)
but that didn't help. Now I will define 1100 and 1200 MHz steps in board-latona.c and cpufreq34xx.c to see if this helps.
EDIT: Nope, that didn't solve it. CPU does not run at 1100. Not even 900. Stays at 1000 in both cases. 800 can be forced...
some updates on the overclock module:
we need to search in /proc/kallsyms for:
clk_init_cpufreq_table
cpufreq_stats_update
on our kernel (uc-kernel v04) they are at:
Code:
c005a198 T clk_init_cpufreq_table
c03c5aec t cpufreq_stats_update
these may be different on stock kernel we need to use specific address
I just thought this might be helpful since Optimus black has the same hardware.
joelmonty said:
I just thought this might be helpful since Optimus black has the same hardware.
Click to expand...
Click to collapse
its the same module dude...
these are all based on milestone-overclock module
DooMLoRD said:
some updates on the overclock module:
we need to search in /proc/kallsyms for:
clk_init_cpufreq_table
cpufreq_stats_update
on our kernel (uc-kernel v04) they are at:
Code:
c005a198 T clk_init_cpufreq_table
c03c5aec t cpufreq_stats_update
these may be different on stock kernel we need to use specific address
Click to expand...
Click to collapse
Why these two? Cpufreq seems to be quite happy with the frequency tables. All frequencies are correctly listed, and the highest available for hardware and scaling are correct (say 1100, if I set it). But some "mysterious barrier" doesn't let the cpu clock as high as requested by cpufreq.
XDA_Bam said:
Why these two? Cpufreq seems to be quite happy with the frequency tables. All frequencies are correctly listed, and the highest available for hardware and scaling are correct (say 1100, if I set it). But some "mysterious barrier" doesn't let the cpu clock as high as requested by cpufreq.
Click to expand...
Click to collapse
read the sources of the module it explains why we need to look at those values...
DooMLoRD said:
read the sources of the module it explains why we need to look at those values...
Click to expand...
Click to collapse
Looked into it, and got the module to load and change frequencies by manually setting omap2_clk_init_cpufreq_table_addr=0xXXXXXX. I was able to underclock to 800 and back to 1000 MHz. 1200 was set, but not correctly applied - the mpu was still running at 1000 MHz. Further on, it ****ed up the frequency table. Instead of [300,600,800,1000] it was [600, 600, 1000, 1000] after the test. Not good
XDA_Bam said:
Looked into it, and got the module to load and change frequencies by manually setting omap2_clk_init_cpufreq_table_addr=0xXXXXXX. I was able to underclock to 800 and back to 1000 MHz. 1200 was set, but not correctly applied - the mpu was still running at 1000 MHz. Further on, it ****ed up the frequency table. Instead of [300,600,800,1000] it was [600, 600, 1000, 1000] after the test. Not good
Click to expand...
Click to collapse
yups code needs some more patching but i am sure this is the way forward for stable overclock
I've got the basics working with a completely reworked sysfs interface (no module). See GitHub.
The idea is simple: At all times, there shall be no more than 4 OPPs enabled. For each overclock "wish", we disable the currently highest OPP, and enable the overclocked one. If this has no corresponding OPP yet, we create it.
The code works, and has the following problems / features:
Only the highest OPP can be set for now. Consequently, the overclock has to be higher than 800 MHz.
The voltage is not adjusted, yet. All overclock frequencies are run with the 1 GHz stock voltage.
The cpufreq table, policy and stats are not updated, yet
The cpu does not go into deep sleep after the clocks have been adjusted (possibly because the cpufreq table is wrong)
As OPPs are added to the table if necessary, it is theoretically possible to max out the OPP array by defining new frequencies hundreds of times (depending on the maximum array size).
To set the frequency (in MHz), type
Code:
echo "1100" > /sys/power/overclock_max_freq
It would be really cool if you could take a look, DooMLoRD. The only real problem I see right now is the cpufreq table. If this would be correctly updated, the rest would be "easy" I tried some stuff (not in the commit), but nothing worked, yet.
XDA_Bam said:
I've got the basics working with a completely reworked sysfs interface (no module). See GitHub.
The idea is simple: At all times, there shall be no more than 4 OPPs enabled. For each overclock "wish", we disable the currently highest OPP, and enable the overclocked one. If this has no corresponding OPP yet, we create it.
The code works, and has the following problems / features:
Only the highest OPP can be set for now. Consequently, the overclock has to be higher than 800 MHz.
The voltage is not adjusted, yet. All overclock frequencies are run with the 1 GHz stock voltage.
The cpufreq table, policy and stats are not updated, yet
The cpu does not go into deep sleep after the clocks have been adjusted (possibly because the cpufreq table is wrong)
As OPPs are added to the table if necessary, it is theoretically possible to max out the OPP array by defining new frequencies hundreds of times (depending on the maximum array size).
To set the frequency (in MHz), type
Code:
echo "1100" > /sys/power/overclock_max_freq
It would be really cool if you could take a look, DooMLoRD. The only real problem I see right now is the cpufreq table. If this would be correctly updated, the rest would be "easy" I tried some stuff (not in the commit), but nothing worked, yet.
Click to expand...
Click to collapse
this is the same problem as with other overclocks i was playing with...
the cpufreq table doesnt get updated... only the module based way seems to change that table...
anyways we will have to investigate this further...
oh btw i have found patch to overclock GPU...
DooMLoRD said:
oh btw i have found patch to overclock GPU...
Click to expand...
Click to collapse
Nice. Hehe

[How-To] OC/UV a kernel

As I cannot find any related guide while google-ing, I want to post this question on here for the purpose of learning and probably helping other people.
[Q1] How to overclock a kernel
which files are needed -> kernel source .. ?
what files need to be edited ?
is the cpufreq driver related ?
how to determine which frequencies need higher voltage and how high exactly ?
[Q2] Undervolting
which files are needed -> kernel source .. ?
what files need to be edited ?
is the cpufreq driver related ?
how to determine which frequencies can use lowered voltage and how to calculate them ?
I would be very thankful if any developer could teach me (probably others too) and I will contribute back for sure.
I am right now fixing up bugs in TeamGummy rom, and I'm nearly finished.
Only thing I lack is a custom kernel, which I want to build myself along with the rom.
*push*
Watch out guys, master guevor is going to teach us a little of his enormous knowlegde, so better keep your eyes on this one.
Overclocking
I must say that all I'm going to write, is what I've gathered looking at the code and changes made by others (thanks Blades and Roach2010) (I have not had any documentation about it), so I could make mistakes or misinterpretation.
Nor do I explain everything, because if you do not have a minimal knowledge get to play this directly may be dangerous.
(Q1) Overclocking
Files to modify
arch/arm/mach-tegra/tegra2_clocks.c (All matters relating to the frequencies.)
The system uses a series of programmed pll clocks which in turn can be used as a basis to other clocks. Let's say for this case pll_x is used for the base of processor clock.
The frequency table are in tegra_pll_x_freq_table processor. Seeing the type definition clk_pll_freq_table in clock.h we know that has entries consisting of 6 values​​. (input_rate, output_rate, n, m, p, cpcon)
These values ​​allow tegra2_pll_clk_set_rate function to set the pll frequency.
The values ​​of interest are the frequency of input and output that indicates the input frequency base to be used and what frequency we want to set (it will use the frequency corresponding to the current base and the output frequency we want). m * p values ​​give us the divisor and n is the multiplier. For simplicity we say that n/(m*p) will give us the multiplier, which applied to the base frequency will give the target frequency.
So if we want to add new frequencies, we must add entries in this structure (tegra_pll_x_freq_table) so the system knows how to program a frequency we want to use.
Add 4 entries for each frequency we want to add (one for each base frequency: 12000000,13000000,19200000,26000000 in our case), with multipliers/dividers to calculate the frequency for which we are adding.
If we add higher frequencies than at present, we have to change the maximum (max_rate) in the tegra_clk_virtual_cpu and tegra_clk_cclk structures, otherwise the system will ignore it. Also have to change the limits for our type of processor in sku_limits. For this case the cpu, cclk y pll_x in the values ​​for our processor (0x04, 0x08, 0x0F).
Finally we modify the table of frequencies used by the processor (frequency list and their order). Is defined at cpufreq_tables and contains a list of lists where we can add a new list or not to touch anything and modify an existing list.
We can look at the existing list freq_table_1p2GHz or in my source I added the list freq_table_1p7GHz.
Contains a list of frequencies that the system can select. It uses the list whose maximum corresponds to the maximum indicated above.
​
arch/arm/mach-tegra/tegra2_dvfs.c (Everything related to the voltages and its relationship with the frequencies.)
This part is much more sensitive and therefore can affect much to the duration of the battery as to stability. I have no formula (unfortunately for me) on how to modify the values, so the task has been more trial and error.
The first thing to know is that one must distinguish between the core voltage and the cpu and should be the latter inferior to the first. In tegra2_dvfs_rel_vdd_cpu_vdd_core function establishes the relationship between the two, being the default 120mV core above the cpu.
Basically what we do if we have added frequencies higher than normal, is to increase the voltage so that they are stable (depend on each processor). I recommend (at first) increment in the same extent all the values ​​involved (maximum voltage).
Therefore we can modify:
Table core_millivolts, establishing the voltages that core can use.
Table cpu_millivolts, establishing the voltages that cpu can use. It contains all the steps and should take into account the difference with the core discussed earlier. If we added any frequency, we add the corresponding voltages.
Tables core_speedo_nominal_millivolts and cpu_speedo_nominal_millivolts contain a nominal voltage of both the core and the cpu.
The maximum and nominal voltages in structures tegra2_dvfs_rail_vdd_cpu, tegra2_dvfs_rail_vdd_core and tegra2_dvfs_rail_vdd_aon.
Finally we adjust the settings for dvfs_init ("cpu", 1,) according to the list of frequencies we want to use (adding if we added new frequencies or changing them if changed change some)
With these changes we should be able to overclock, although we know that although you can configure (once started) a maximum frequency below the maximum that we put on the tables, there is a problem and many times after suspending the system will use the maximum frequency of the table. To avoid this we must make some changes in cpufreq.c
​
drivers/cpufreq/cpufreq.c
The problem occurs in the second core when reconnected after being disconnected in the suspension process. The problem is solved with the next patch.
Code:
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index e157205..2626e2d 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1048,18 +1048,27 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
/* Set governor before ->init, so that driver could check it */
#ifdef CONFIG_HOTPLUG_CPU
+ struct cpufreq_policy *cp;
for_each_online_cpu(sibling) {
- struct cpufreq_policy *cp = per_cpu(cpufreq_cpu_data, sibling);
+ cp = per_cpu(cpufreq_cpu_data, sibling);
if (cp && cp->governor &&
- (cpumask_test_cpu(cpu, cp->related_cpus))) {
+ (cpumask_test_cpu(cpu, cp->related_cpus))) {
+ dprintk("found sibling CPU, copying policy\n");
policy->governor = cp->governor;
+ policy->min = cp->min;
+ policy->max = cp->max;
+ policy->user_policy.min = cp->user_policy.min;
+ policy->user_policy.max = cp->user_policy.max;
found = 1;
break;
}
}
#endif
if (!found)
+ {
+ dprintk("failed to find sibling CPU, falling back to defaults\n");
policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
+ }
/* call driver. From then on the cpufreq must be able
* to accept all calls to ->verify and ->setpolicy for this CPU
*/
@@ -1071,6 +1080,16 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
policy->user_policy.min = policy->min;
policy->user_policy.max = policy->max;
+ if (found)
+ {
+ /* Calling the driver can overwrite policy frequencies again */
+ dprintk("Overriding policy max and min with sibling settings\n");
+ policy->min = cp->min;
+ policy->max = cp->max;
+ policy->user_policy.min = cp->user_policy.min;
+ policy->user_policy.max = cp->user_policy.max;
+ }
+
blocking_notifier_call_chain(&cpufreq_policy_notifier_list,
CPUFREQ_START, policy);
Ok, I'm on it. Trying my best, but I'm afraid you have to push me a little..
Facing heavy compile errors.
Question :
In your kernel source dir, which command do you use to start compiling ?
EDIT :
EDIT 2 :
@ all people trying to compile, do NOT use
Code:
make tegra_defconfig
!
Better grab an existing .config file from an already running kernel (thanks to guevor for this)
Just google "cyanogenmod building kernel from source" , it's described well over there.
If people request, I can share the kernel config and the precompiled blob tools once I get them from guevor.
First kernel compiled successfull, I have my zImage ready.
OC'd and Voltages changed.
First test kernel incoming the next days, I could need some testers.
Pm me if you want to test.
Thanks for this! I love your work and you sharing your vast knowledge of this subject! Thanks OP for giving him the means of enlightening us
back from the dead
edited
I was a little sleep deprived... my bad
Necromancy!
Say I want to just simply modify my cpu_max_freq via my stock kernel (no source availabel) and I have the boot.img and have unpacked it to boot.img-kernel. What should I do from here to get into the internals of the kernel to adjust the cpu_max_freq? I'm running an ARM Cortex A9, the same as the Tegra2 cpu per say.
Thanks
1chris89 said:
Say I want to just simply modify my cpu_max_freq via my stock kernel (no source availabel) and I have the boot.img and have unpacked it to boot.img-kernel. What should I do from here to get into the internals of the kernel to adjust the cpu_max_freq? I'm running an ARM Cortex A9, the same as the Tegra2 cpu per say.
Thanks
Click to expand...
Click to collapse
You can't do it that way. You can try to create oc modules but I couldn't tell you how to do that
Sent from my EVO using Tapatalk 2
Can you send me in the right direction?
Looks like unpacking the kernel isn't happening but I can create an overclock module which is FAR from easy but here's something I started on a little not sure if it's specific to the other device or whatever but I'll see how it goes.
http://forum.ppcgeeks.com/android-t...modules-tinboot-nand-boot-more-beginners.html
1chris89 said:
Say I want to just simply modify my cpu_max_freq via my stock kernel (no source availabel) and I have the boot.img and have unpacked it to boot.img-kernel.
Click to expand...
Click to collapse
Since the kernel is under GPL, get the sources from where you got the binary.
1chris89 said:
I'm running an ARM Cortex A9, the same as the Tegra2 cpu per say.
Click to expand...
Click to collapse
Is it a Tegra 2 or not? If not, this thread won't help you.
I don't understand this part:
The values ​​of interest are the frequency of input and output that indicates the input frequency base to be used and what frequency we want to set (it will use the frequency corresponding to the current base and the output frequency we want). m * p values ​​give us the divisor and n is the multiplier. For simplicity we say that n/(m*p) will give us the multiplier, which applied to the base frequency will give the target frequency.
So if we want to add new frequencies, we must add entries in this structure (tegra_pll_x_freq_table) so the system knows how to program a frequency we want to use.
Add 4 entries for each frequency we want to add (one for each base frequency: 12000000,13000000,19200000,26000000 in our case), with multipliers/dividers to calculate the frequency for which we are adding.
Click to expand...
Click to collapse
I want to add new frequencies but I don't get it.. also, why 4 entries for a single frequency? thanks!
Someone pleaseeee?
I hope there's a video tutorial for "adding overclocking features to your kernel", I hate to admit that I can't follow the instructions carefully due to lack of English knowledge

Porting Thunderzap MTK6577 kernel to Star N9588?

I'm interested in overclocking my STAR N9588 it's the MTK6577 1ghz cortex a9 1gb ram and I wanna port this 1.4Ghz kernel over.
Can someone explain exactly how to do that?
thanks
1chris89 said:
I'm interested in overclocking my STAR N9588 it's the MTK6577 1ghz cortex a9 1gb ram and I wanna port this 1.4Ghz kernel over.
Can someone explain exactly how to do that?
thanks
Click to expand...
Click to collapse
Mate, no OEM has realised JB Sources for the MTK6577 as of yet, well Wiko do realised ..
but our dev found them rather incomplete for successfully compiling a kernel!
Wow that really sucks
We should be able to overclock the MTK6577, right? If we put all of our brains together for some super brain storming...
Anyway couldn't I just go into each relevant file being probably 10 or more in /system/device I believe and there's all about max frequency and everything on all these CPU_MAX_FREQ files etc etc...
What do you think?
I just really think the MTK6577 needs some help in the HD decode department and especially a gpu overclock as even the Live wallpaper lags when scrolling...
*OH YEAH*
Can I port CM10 to my STAR N9588?
Thanks bro
1chris89 said:
Wow that really sucks
We should be able to overclock the MTK6577, right? If we put all of our brains together for some super brain storming...
Anyway couldn't I just go into each relevant file being probably 10 or more in /system/device I believe and there's all about max frequency and everything on all these CPU_MAX_FREQ files etc etc...
What do you think?
I just really think the MTK6577 needs some help in the HD decode department and especially a gpu overclock as even the Live wallpaper lags when scrolling...
*OH YEAH*
Can I port CM10 to my STAR N9588?
Thanks bro
Click to expand...
Click to collapse
First, This isnt the Right section to post..Contact a MOD to change the thread to appropraite one... CM isnt yet available for Mediatek phones...SO have to wait....
1chris89 said:
Wow that really sucks
We should be able to overclock the MTK6577, right? If we put all of our brains together for some super brain storming...
Anyway couldn't I just go into each relevant file being probably 10 or more in /system/device I believe and there's all about max frequency and everything on all these CPU_MAX_FREQ files etc etc...
What do you think?
I just really think the MTK6577 needs some help in the HD decode department and especially a gpu overclock as even the Live wallpaper lags when scrolling...
*OH YEAH*
Can I port CM10 to my STAR N9588?
Thanks bro
Click to expand...
Click to collapse
All that is possible if we have a full tree of the sources.. without them even of you try to play with boot.IMG it won't boot and you will be stuck in a rut!
It appears overclocking the thing isn't that hard at all. Only problem is pull the right files, editing them then pushing them back. Like any file in /sys/devices/ etc I'm trying to adb pull /sys/devices and it doesn't seem to pull all the files. So I tried adb pull /sys/devices/*.* and it didn't seem to like that either. I tried editing the files and they simply don't save. So basically I need to say edit the files in the rom .zip prior to flashing in say TWRP and I can get a nice overclock no problem. It's not a matter of the stupid A** MTK crap it's a matter of modifying the android system (Cortex A9) portion with the updated files to allow for overclocking. As it's all so possible and they say the Cortex A9 can handle upwards of 1.6Ghz without any overvolt necessary.
Once I get this rolling I can help a few of you who are truly interested out. Unless you want to continue to think its impossible to do so then I say continue thinking that as it won't get you anywhere in life.
1chris89 said:
It appears overclocking the thing isn't that hard at all. Only problem is pull the right files, editing them then pushing them back. Like any file in /sys/devices/ etc I'm trying to adb pull /sys/devices and it doesn't seem to pull all the files. So I tried adb pull /sys/devices/*.* and it didn't seem to like that either. I tried editing the files and they simply don't save. So basically I need to say edit the files in the rom .zip prior to flashing in say TWRP and I can get a nice overclock no problem. It's not a matter of the stupid A** MTK crap it's a matter of modifying the android system (Cortex A9) portion with the updated files to allow for overclocking. As it's all so possible and they say the Cortex A9 can handle upwards of 1.6Ghz without any overvolt necessary.
Once I get this rolling I can help a few of you who are truly interested out. Unless you want to continue to think its impossible to do so then I say continue thinking that as it won't get you anywhere in life.
Click to expand...
Click to collapse
hello
it is possible for our canvas 2 to overclock on jellybean all we have to do is port thunderzap kernel for jelly bean.
thats how the HTC explorer got jelly bean
but we dont have much devs
I need to edit the files within /sys/devices/ to increase the max governor clock and max info clock and then look up the cortex a9 power profiles from say a known to be stable device. Like any cortex a9 tablet to know what voltages are ideal.
They say the cortex a9 can handle 1.6ghz with little to no voltage increase.
I'd also like to overclock the gpu PowerVR SGX 531.
If I can I'm going to push for 2.0Ghz if possible.
****Can someone help me adb pull /sys/devices/? Like what command to completely copy all files from /sys/devices from adb and then edit the files and then adb push? Or create a CWM or TWRP .zip with the updated kernel files for overclock?
Thanks
1chris89 said:
I need to edit the files within /sys/devices/ to increase the max governor clock and max info clock and then look up the cortex a9 power profiles from say a known to be stable device. Like any cortex a9 tablet to know what voltages are ideal.
They say the cortex a9 can handle 1.6ghz with little to no voltage increase.
I'd also like to overclock the gpu PowerVR SGX 531.
If I can I'm going to push for 2.0Ghz if possible.
****Can someone help me adb pull /sys/devices/? Like what command to completely copy all files from /sys/devices from adb and then edit the files and then adb push? Or create a CWM or TWRP .zip with the updated kernel files for overclock?
Thanks
Click to expand...
Click to collapse
That really sounds very noobish
1. You cannot simply pull the interfaces since they are symlinked infinitely
2. And do you think Mediatek will leave Clocksource interface controllable to do this? You cannot simply do "2Ghz" in the pulled interface and boom push it back to make your phone fly? eh? The new values will get RESET to original values since they are blocked/limited to the specific values. And thats why we have a thing called "Kernel Sources"
I found the mtk6577 source data... which shows the 1.2Ghz frequency available but it's not in the right table.
https://github.com/wiko-sources/cin.../platform/mt6577/kernel/core/cpufreq-mt6577.c
Maybe I could write a script like
#change cpu to 1.2Ghz by zhuzhuojie 2011-07-23 *EXAMPLE*
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor hybrid
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed 1209000
**If I can get the Motorola Xoom ElementalX kernel source data and compare and copy I think I can attempt to achieve 1.7Ghz**
#define DVFS_F1 (1001000) // KHz, 1/1 <---------- I say change this value to 1209000 or test beyond 1.2ghz until instability occurs.
#define DVFS_F2 ( 834166) // KHz, 5/6
#define DVFS_F3 ( 750750) // KHz, 3/4
#define DVFS_F4 ( 667333) // KHz, 2/3
#define DVFS_F5 ( 500500) // KHz, 1/2
#define DVFS_F6 ( 250250) // KHz, 1/4
#define DVFS_F7 ( 166833) // KHz, 1/6
#define DVFS_F1_TM (1209000) // KHz, 1/1
#define DVFS_F2_TM (1007500) // KHz, 5/6
#define DVFS_F3_TM ( 906750) // KHz, 3/4
#define DVFS_F4_TM ( 806000) // KHz, 2/3
#define DVFS_F5_TM ( 604500) // KHz, 1/2
#define DVFS_F6_TM ( 302250) // KHz, 1/4
#define DVFS_F7_TM ( 201500) // KHz, 1/6
--------------------------------------------------------------------------
* Operate Point Definition
****************************/
#define OP(cpufreq) \
{ \
.cpufreq_mhz = cpufreq, \
}
/***************************
* MT6575 E1 DVFS Table
****************************/
static struct mtk_cpu_freq_info mt6575_freqs_e1[] = {
OP(DVFS_F2_MT6575_E1),
OP(DVFS_F1_MT6575_E1),
};
/***************************
* MT6575 E2 DVFS Table
****************************/
static struct mtk_cpu_freq_info mt6575_freqs_e2[] = {
OP(DVFS_F4_MT6575_E2),
OP(DVFS_F3_MT6575_E2),
OP(DVFS_F2_MT6575_E2),
OP(DVFS_F1_MT6575_E2),
};
/***************************
* MT6577 E1 DVFS Table
****************************/
static struct mtk_cpu_freq_info mt6577_freqs_e1[] = {
OP(DVFS_F6_MT6577_E1),
OP(DVFS_F5_MT6577_E1),
OP(DVFS_F4_MT6577_E1),
OP(DVFS_F3_MT6577_E1),
OP(DVFS_F2_MT6577_E1),
OP(DVFS_F1_MT6577_E1),
};
/***************************
* MT6577 E1 TM DVFS Table
****************************/
static struct mtk_cpu_freq_info mt6577_freqs_e1_tm[] = {
OP(DVFS_F6_MT6577_E1_TM),
OP(DVFS_F5_MT6577_E1_TM),
OP(DVFS_F4_MT6577_E1_TM),
OP(DVFS_F3_MT6577_E1_TM),
OP(DVFS_F2_MT6577_E1_TM),
OP(DVFS_F1_MT6577_E1_TM),
};
static unsigned int mtk_cpu_freqs_num;
static struct mtk_cpu_freq_info *mtk_cpu_freqs;
static struct cpufreq_frequency_table *mtk_cpu_freqs_table;
extern struct kobject *power_kobj;
extern bool clkmgr_high_speed_check(void);
extern int cpufreq_state_set(int enable);
extern CHIP_VER get_chip_ver(void);
So have you tried? I'm really interested in getting this thing overclocked
Sent from my ASUS Transformer Pad TF700T using Tapatalk HD
@FooFighter312
What Device are you wanting to overclock specifically? Because your ASUS Transformer Pad TF700T uses a Nvidia Tegra 3 Quad Core with 5 cores in total all 4 running at 1.6Ghz by stock and the 5th being a power savings core. I've seen 2Ghz out of those but what I have seen is the Tegra 3 benefits primarily by a GPU core Clock increase to I believe 550Mhz was ideal for stability and at least a 20fps increase in game from my testing. Use TrixsterMod from Play Store with a modded kernel and root to push to 550Mhz.
***** IN REGARDS TO THE MTK6577 (ARM Cortex A9) *****
I used OPENSSH via the Play Store to use my PC to remote into the /sys/devices/ etc and change the parameters which doesn't sound hard. However when I changed parameters in files and tried saving it would either give me a permission error, or it would change the value back after I saved it.
Which makes me believe all the files/ parameters within /sys/devices/ etc are "Shadowed" by an unknown source of the system.
If I could determine where it's being shadowed from, I could then change it from the source. From there the "Shadowed" "Source" data would then automatically manipulate the files within /sys/devices/ and achieve the overclocked speeds. According to my research the MTK6577 and the ARM Cortex A9 in particular are using a voltage well beyond it's theoretical optimum. Meaning it's using more voltage than required for firstly stability, but also the ease of overclocking to huge speeds without ever needing to touch the voltage! According to several sources and ARM directly, they put enough volts into the 1Ghz stock speed to usually be able to achieve up to 1.6Ghz without a volt increase. However anything beyond 1.6Ghz requires a heavy volt increase which would ultimately result in epic amounts of heat.
If anyone can give more info on this that would be excellent!
Thanks
I was referring to the MTK6577 for my UMI X1. As far as I've seen there are no custom kernels for my device and the stock one just isn't enough for me. I'd like to push it a little further if possible, and I also would like more governors and io schedulers available. Another problem is that when I change any of the settings, they automatically revert to stock after a reboot.
I'm quite a noob when it comes to programming, especially on android, but I'm learning slowly. Right now I'm just an advanced user, nothing more.
Sent from my ASUS Transformer Pad TF700T using Tapatalk HD
no update tutorial?
costum kernel for axioo picopad 5Gew
please custom kernel for axioo Picopad 5 GEW. mtk6577 dual-core 1GHz 512mb ram so that support for overclocking. 1.4 Ghz and swaap

[KERNEL] 4.2.2 SaveEnergy K2_U/K2_UL

Code:
#include
/*
* I am not responsible for bricked devices, dead SD cards, thermonuclear
* war, or the current economic crisis caused by you following these
* directions. YOU are choosing to make these modificiations, and
* if you point your finger at me for messing up your device, I will
* laugh at you.
*/
FEATURES:
Based on 3.11.401.x stock kernel sources
New governors (Ondemand + MULTIPHASE, Smartmax, Intellidemand)
New I/O Sheduller (Deadline, ROW, FIOPS, SIO)
Fsync and cache optimizations
new CPU frequency table
AVS
cortex-a15 optimizations
1.674GHz CPU Overclocking and 487.5MHz GPU Overclocking (optional, separate kernel)
USB force fast charging
S2W/DT2W support
and more...
SaveEnergy K2_U/K2_UL 4.2.2 kernel ver. 1
Project stopped. GitHub
SaveEnergy K2_UL 4.2.2 kernel ver. 2
Project stopped. Link to download in the second message.
SaveEnergy K2_U 4.2.2 kernel ver. 3
Based on 3.11.401.106 stock kernel sources.
Project stopped. Link to download in the second message.
Credits:
@faux123, @flar2, @rmbq, @show-p1984, @Zarboz, @jrior001, @thicklizard - For his various kernel patches and features.
Special thanks to @rmbq, without whose invaluable assistance the process of appearance S2W we would not come to pass for a long time.
And all others mentioned on my github in contributors tab.
ver. 2
Download:
Kernel v.30 (CPU - 1.188 GHz, GPU - 450 MHz)
Kernel v.30 (CPU - 1.458 GHz, GPU - 450 MHz)
Kernel v.30 (CPU - 1.674 GHz, GPU - 487.5 MHz)
Full changelog
GitHub
ver. 3
Download:
Kernel v.20 (CPU - 1.188 GHz, GPU - 450 MHz)
Kernel v.20 (CPU - 1.458 GHz, GPU - 450 MHz)
Kernel v.20 (CPU - 1.674 GHz, GPU - 487.5 MHz)
Full changelog
GitHub
From which kernel sources is compiled?
xpirt
BrateloSlava said:
[*]...
[*]and more...
Click to expand...
Click to collapse
Does it include duoble tap to wake and sweep to wake?
Sent from my C5303 using Tapatalk
xpirt said:
From which kernel sources is compiled?
Click to expand...
Click to collapse
I'm sorry, but I'm just do not remember which source files from HTCDEV.COM I took as a basis. K2_UL - that's for sure.
J.ali.li said:
Does it include duoble tap to wake and sweep to wake?
Click to expand...
Click to collapse
No.
BrateloSlava said:
I'm sorry, but I'm just do not remember which source files I took as a basis. K2_UL - that's for sure.
Click to expand...
Click to collapse
Ok. That's enough
xpirt
Hi, I have a suggestion. Would be great if you can mod cpu frequency table and add 2xx and/or 3xx speed, there is to big gap between 162 and 432MHz. 162MHz have big Impact on performance.
Hello, I flashed your kernel but if I try to change the frequencies of the CPU as soon as I close the program back to those first, any ideas? Also i have sod
bataya said:
Hi, I have a suggestion. Would be great if you can mod cpu frequency table and add 2xx and/or 3xx speed, there is to big gap between 162 and 432MHz. 162MHz have big Impact on performance.
Click to expand...
Click to collapse
I never aimed to produce highly productive kernel. I have always striven to save energy. I specifically did overclock separate, assembly to save the source code in the github repository. To everyone could take advantage of this. I do not plan to release further overclocked kernel version.
Near710 said:
Hello, I flashed your kernel but if I try to change the frequencies of the CPU as soon as I close the program back to those first, any ideas? Also i have sod
Click to expand...
Click to collapse
I use the program TricksterMOD. It perfectly sets all the necessary parameters when starting the phone.
Link to a new version (v010) - the second message. Github will update tomorrow.
Ok, thanks a lot, any suggestions on which governor to use?
Near710 said:
Ok, thanks a lot, any suggestions on which governor to use?
Click to expand...
Click to collapse
Smartmax - for better energy saving. Ondemand - for better performance.
ADD.
If you view the my file version-2.txt - you can see that I experimented with other governor (badass, intellidemand, interactive, interactivex2, lagfree, lionheart). However, I have not noticed any particular advantages.
I also experimented with replacing mpdecision to auto_hotplug.
BrateloSlava said:
I never aimed to produce highly productive kernel. I have always striven to save energy. I specifically did overclock separate, assembly to save the source code in the github repository. To everyone could take advantage of this. I do not plan to release further overclocked kernel version.
Click to expand...
Click to collapse
You misunderstood me. I want to say that 1xx MHz is very low speed, and it is OK for low cpu task. But if you play music, or running some other task in background cpu will run on next higher speed 4xx MHz, because 1xx MHz is not enough for such task so it will use more power than if it is run on 2xx or 3xx. So if the is some cpu speed between 1xx and 4xx MHz cpu should use less power.
bataya said:
You misunderstood me. I want to say that 1xx MHz is very low speed, and it is OK for low cpu task. But if you play music, or running some other task in background cpu will run on next higher speed 4xx MHz, because 1xx MHz is not enough for such task so it will use more power than if it is run on 2xx or 3xx. So if the is some cpu speed between 1xx and 4xx MHz cpu should use less power.
Click to expand...
Click to collapse
Yeah, maybe you're right. I will try to add "a couple" of frequencies in the coming days. Although I doubt that when playing music, processor speed will be lower than 432.
bataya said:
... But if you play music, or running some other task in background cpu will run on next higher speed 4xx MHz, because 1xx MHz is not enough for such task so it will use more power than if it is run on 2xx or 3xx. So if the is some cpu speed between 1xx and 4xx MHz cpu should use less power.
Click to expand...
Click to collapse
Link to a new version (v011) - the second message.
If you are not hard - please, collect usage statistics processor frequencies when listening to music, etc.
Thanx in advance.
^Is cpu states log from BetterBatteryStates ok, or you want log from some other app?
bataya said:
^Is cpu states log from BetterBatteryStates ok, or you want log from some other app?
Click to expand...
Click to collapse
Charge the phone. Reboot. Use the usual way (listen to music, make calls, etc.). At the end of the day - to see the statistics for frequency processor. Any program, that is able to display. I'm interested to see duration of use of each frequency.
Oki, I will post cpu states at the end of the day.
BrateloSlava said:
Link to a new version (v011) - the second message.
If you are not hard - please, collect usage statistics processor frequencies when listening to music, etc.
Thanx in advance.
Click to expand...
Click to collapse
Listening to music with Spotify over WiFi CPU mostly stay on the 384MHz.
Sent from my HTC One SV using Tapatalk

[Completed] [Q] Set phone cpu maximum frequency according to cpu mabufacturer's specification

Hello. I have a rooted phone. According to the phone's manufacturer spec the maximum cpu clock is 1ghz dual core. I checked it also with kernel tuner and here is the result:
CPU MAX FREQUENCY: 1001mhz
CPU MODEL: mt6572
Now, i googled mt6572 cpu and based from mediatek, the maximum cpu frequency is 1.2ghz dual core. My question is, could i set my cpu max to 1.2ghz using kernel tuner safely, or is there a possibility that i may overclock my cpu and burn it?
Hi there,
If you don't have a custom kernel that allow overclocking you cant do that.
see this guide about overclocking: [INFO][GUIDE] Overclocking information, governors, profiles, problems, solutions, FAQ
For more questions please ask directly here:
> Android Development and Hacking > Android Q&A, Help & Troubleshooting
Good luck

Categories

Resources