yashsingh1/xdaforums huggingface dataset:
[Galaxy S Advance I9070 Original Android Developmen] cocafe:
Hello mate

Yes, like ACE II, which doesn't have MaxOPP(1000Mhz). The config is in the PRCMU FW. Samsung made it.

Although MSM7227 is an old SoC, it do inspire me ;)

STE explains how the clock generator works, but no explanation about clocking registers of PRCMU and ABB regulator.

What I can do is to grep the code.

I got some information about ABB regulator in the code.

That 0x3f is already the maximum Varm voltage which supplies to DBB ARM part.

What's more, in the code, I even can find the file name of the document which their engineers owned.

No research, no right to speak.

We still need more research.

Also, ArmFix Clock MGT and PLL ARM make the DBB frequence.

I cannot understand the register of ArmFix MGT now.

But we can tweak ARMPLL.

Ofcuz, I will comment it in github when finish the code, we are Opensource team.

Meanwhile, UV is possible.

With 800Mhz, I tried to reduce the Varm from 1150000uV to 1050000uV.

But it cannot be reduced more, phone will crash and reboot.

As I said, everything must be done without cpufreq scaling, or our voltage and freq will be override by PRCMU. That's what OPP does.

We cannot find info about freq and volt in the code, because they are in the OPPs.

I am in school now. I can not go home until Saturday.

Most of the big events of development happened in my classroom...

BLX is ready in the kernel I am testing. I will fix other stuff before making oc in kernel.

Umm, I think I won't ask for donation.

I am not working for money now.

Android is Just a habit.

Those people who ask others for donation impolitely look like robbers. Um, Im just kidding.
[Galaxy S Advance I9070 Original Android Developmen] Paul L.:
I think you should look for the patches on Linux kernel for ST-Ericsson (you will have to look on the kernel.org git), most of the stuff is documented there.

(I hate acronyms lol), so, it's limited on the PRCMU firmware. Maybe it's not purely Samsung, because ST-Ericsson should have implemented it on every Novathor, it would become costly to manufacture different features for a single chipset.

So, without ARMPLL register, and without knowing how it works, we are limited only to certain voltage levels that are "automatically" tweaked by both PLL ARM and the ArmFix MGMT? So, if understand (I am trying to catch myself), we could set custom voltages "on the fly" and undervolt or overclock dynamically (I would create safe limits for this). So, it's seems that efectively there are limits great enough for the undervolt, it can't be undervolted for hardware limitations, more than that?

(I am trying to explain whoever comes here and myself)
[Galaxy S Advance I9070 Original Android Developmen] cocafe:
Thanks for advice, If i got it right, linaro engineers are still working for snowball. I saw they commited a lot.

But I do checked igloo kernel commits history. Like PRCMU drivers, they pushed it directly Namely the PRCMU commits start with a completed driver.

Maybe you're right, Hiding MaxOPP and various PRCMU Firmware are made by STE.

Because they needed various prices.

Yep, everything is dynamic.

OPP contains ArmFixMGT, ARMPLL, Varm, Vbbp, Vbbn and a property called bias.

I found these in dbx540-prcmu.c, the OPP structure.

I am not sure this is right to the hardware, but an OPP should have these properties.

When set OPPs, its properties will override everything.

We can not break the hardware limits, just like 1228Mhz cannot work for secs.

I think if we can increase a bit more Varm, it can be stable.

But we can't, maximum Varm has been limited at 1362.5mV by hardware.

This is also hardware limits.

But I haven't tried to increases Vbbp/Vbbn, maybe this can help.

I read that maximum freq of U8540 is 1500Mhz. Thats 1536Mhz in raw I think.
[Galaxy S Advance I9070 Original Android Developmen] Paul L.:
So, then the driver is a binary, then it "could" be edited by hex-editing, and probably the kernel will complain a lot because of that.

Hm, maybe then you could look the diferences from the stock driver from Samsung and (if you find it) the one for Snowball; or maybe from U8540, in that case should be easier to "spot" the differences that actually matters, I hope you don't need to disable (or enabling? I am old for those stuff) the vermagic for those firmwares/drivers; as I am sure that it will complain because it's magic number and maybe signature.

I was thinking that the 1228MHz is not hardware limited, but actually a safety measure when the mV comes to the driver limit, but not the hardware limit. I mean, it's like it's not reaching enough mV to keep itself stable. More like the driver does not correctly measure the correct voltage for higher CPU frecuencies that, for example, the U8500 wasn't designed to work (or when they were limited by Samsung on request because thermal design limits)
[Galaxy S Advance I9070 Original Android Developmen] cocafe:
The driver? The Firmware?

I am totally messy.

You mean the PRCMU Firmware?

That could be edited i think, that is in the hardware.

When it produced, it cannot be changed.

Surely, Samsung has the full document.

They know what and how to modify.

We are not insmoding anything, why modifying vermagic?!

Please clear me

EDIT: Maybe it's 1490.6Mhz, not 1536Mhz.

1228Mhz is not stable because of low voltage
[Galaxy S Advance I9070 Original Android Developmen] Paul L.:
See, that is why I hate acronyms, what I did not understood is that the firmware is on device (there are "firmwares" for some drivers to load when the propietary driver is used, like our Broadcom stuff for wireless), what I meant (if the firmware was on kernel, not on hardware), is that if it was a binary blob it "could" be hex edited to push the limits a little further. It's a standard kernel interface, is used to "update the microcode" (on x86 for example) when some values on assembly are wrong and the microcode is to update those on the fly (in the RAM).

Don't mind too much, if the driver could be modified for it to accept values on sysfs it could be useful, the problem is that the driver is for sure a binary blob, it doesn't need to be an actual .ko module, the kernel can (and it surely does with a lot of stuff) integrate it to the final zImage, I was talking about the vermagic because is a built inside the kernel zImage. Since the kernel needs to initialize itself (sysfs, RAM, other subsystems), the zImage is the embeeded kernel on a ramdisk (like it is the vmlinuz on x86), one of the things it will check is the signature of those integrated modules (I don't know exactly how this is done, it's part of the low level checks of the kernel integrity). Is what I got more or less (in my understanding) while reading the kernel documentation.

Don't take the above serious, I am talking about what can be done on x86, I don't expect for ARM to be the same, but some of these could have a similar interface/implementation; that could be really hard to make use of.
[Galaxy S Advance I9070 Original Android Developmen] cocafe:
Oops, I am sorry, I made a Typo.

*PRCMU firmware is in the hardware, It cannot be modified.

Unless we pull it out the board and use some chip programmer to write it.

But only STE engineers have that kind of stuff/method.

I know you are talking about some firmwares like bcmdhd's which can be loaded and modified.

I am sure that the PRCMU driver reads the PRCMU Project ID from the hardware registers, That's it.

It is in hardware.

I will find a way to modify the cpufreq API in kernel.

Why talk about the zImage stuff?

I absolutely know that

Ugh, Let's stop this discussion it has been off topic a lot.

With Vbbp/Vbbn increased 100mV(it's [MENTION=1989751]400[/MENTION]mV, maximum), 1228Mhz is stable now. The maximum frequency this crappy platform can have. Higher freq will make app FC and phone will reboot.

My mobile data plan has run out.

Come and Chat on Hangouts on Saturday ;)
[Galaxy S Advance I9070 Original Android Developmen] Paul L.:
Don't worry about the zImage, I mean that zImage has it's own modules (you can make menuconfig on the mainstream kernel to set some modules as integrated), then the bootloader decompress the kernel on every boot, but it has nothing to do since we can't modify the firmware.

Talking about the kernel, I would recomend this instead of the linaro (documentation and some sources) https://git.kernel.org/cgit/linux/kernel/git/linusw/linux-stericsson.git/

The Linaro one has all the u-boot stuff that doesn't matter too much. There is another one on kernel google source, that it's actually mirrored from the one from kernel.org. And the kernel.org one is keeping in par with the mainline Linux kernel, I expect that this is mostly because the dev (Linus W.) expect to merge it with the mainline kernel sometime soon.

And it's not offtopic mate, we are discussing (more or less) about tecnical stuff on the kernel. I can't (I couldn't before) reach you on Hangouts since you came and then dissapeared like a ninja lol.
[Galaxy S Advance I9070 Original Android Developmen] akkufix:
Just flew in this thread and -sorry- not read all about your discussion, but will take time to do this soon... ;)

You mean, that u8500 is mask-programmed for internal power values? Can't believe it, because factory processes are very difficult to change by that way and slow down production cycles and produces higher costs.

We have lot of registers in "prcmu-debug.c", which we could reach for changing the values in them. Not all of them appears anywhere in sourcecode. Maybe there is a possibility to access from coding registers to get some higher voltage, i.e. changing a divider or some what?

Sure, it would be better to have a datasheet.
[Galaxy S Advance I9070 Original Android Developmen] cocafe:
No datasheet.

Ab8500 Voltages doesn't have dividers. It's the maximum already.

Ab8505(S3 mini has) has about 1400 maximum.

That's it.
[Galaxy S Advance I9070 Original Android Developmen] Y94:
May i know when are you going to release a new build with overclocking support?

Inviato dal mio GT-I9070 utilizzando Tapatalk
[Galaxy S Advance I9070 Original Android Developmen] #Henkate:
When peoples dont ask for ETA.
[Galaxy S Advance I9070 Original Android Developmen] cocafe:
It will take me at least a week to write and test a kernel driver (I decide to call it LiveOPP) which can change freq and voltages in userspace.

Be patient please
[Galaxy S Advance I9070 Original Android Developmen] akkufix:
Mmh, what about this?

/* supply for v-intcore12, VINTCORE12 LDO */
[AB8500_LDO_INTCORE] = {
.constraints = {
.name = "V-INTCORE",
.min_uV = 1250000,
.max_uV = 1350000,
.input_uV = 1800000,
[...]

Its in "board-mop500-regulators.c".
[Galaxy S Advance I9070 Original Android Developmen] Paul L.:
No, it means that the kernel doesn't have predefined values for frecuency steeping. When you put more voltage on the CPU and do the tricky commands cocafe posted, the drivers auto-clocks the CPU (dynamic overclocking we were talking about).

Cocafe found no limit for this, in the files what you are looking, these are the "safe limits" for operation, more voltage than that means that the CPU will not be stable and it will shutdown itself. Those limits are put there (they don't meant anything) for reference of the limits of the CPU and they are the normal values that the CPU will run on normal operation.
[Galaxy S Advance I9070 Original Android Developmen] krazzykid:
Tested over-clocking as directed by Cocafe, here's the result

Score higher than a stock S2 :D

Is it absoluty necessary to use PERFORMANCE governor?

Can we make a init.d script of the code and use it to over-clock? Will it cause any problem?
[Galaxy S Advance I9070 Original Android Developmen] akkufix:
All things we can choose with Performance Control or another app, we can also do by writing it directely in them configuration-files by hand or using a script for it.

Its same like in Linux. GUI or programms are only for making things more handy.
[Galaxy S Advance I9070 Original Android Developmen] krazzykid:
I think I couldn't convey my query properly.

1. I want to know if this over-clocking can be used regularly (like write a init.d script and use the device normally)?

2. This OC, is it within the safe limits for our SOC (I know OCing too much can be harmful)?

3. Can't we use something like ONDEMAND instead of PERFORMANCE while OCing?
[Galaxy S Advance I9070 Original Android Developmen] akkufix:
1. As i said. Every value can be written in corresponding configuration files when permissions are givven. Same thing like an app is doing it.

So, a script is possible.

2. Well, i think it is the Linaro board which runs on 1.2GHz as default. Ok, there is another revision of the chip, but same soc.

Maybe some older u8500 aren't stable for using this.

Should be save as long as you can hold your phone in your hands, due of a bit more heat... ;)

3. Also governors should be able to handle clock out of the box.

Another thing - if you use a "high-speed" device (like me having a HTC one), you can see that cpu power is not all to let android running faster.

So, if i use my Sola and compare it with M7, there is nearly no difference while normal use, because it nearly never uses the full speed of the cpu. Only in some games or another "big apps" you can see a difference.

Thats why android also could run on a 800MHz single-core device.
[Galaxy S Advance I9070 Original Android Developmen] Paul L.:
Governours read the default values provided by the kernel. Since our driver clocks cpu "automatically", for compatibility it sends stocks values to the governours.

So, PERFORMANCE governour sets the clock always to the maximum value, ignoring power saving. Every other governour takes in mind the power saving, so, when they clock down, one step, they read again the default values from the kernel and it resets to the max 1.0 GHz.

(This also works when we overclock, the governour reads the maximum value that is active, so, performance "thinks" that the overclocked value it's normal and it keeps it because there is no need to step down the clocks for power saving)
[Galaxy S Advance I9070 Original Android Developmen] krazzykid:
I knew all that :D

So if I make the init.d script and then use my phone with any governor then I'm using OC values... i.e. depending on load the CPU freq will ramp up to the new max. OC value instead of 1 GHz stock?
[Galaxy S Advance I9070 Original Android Developmen] DaRkRhiNe:
TILL WHAT HAD IT BEEN OVERCLOCKED?? :fingers-crossed:
[Galaxy S Advance I9070 Original Android Developmen] geopapa:
does the latest "miracle" make it possible to have a bln compatible kernel at last? it would be great for the functionality of our phone :cool:
[Galaxy S Advance I9070 Original Android Developmen] shut_down:
No, this is only related to overclock. But I am sure that our Cocofe will make that work too (if possible) when he get more time. ;)
[Galaxy S Advance I9070 Original Android Developmen] krazzykid:
1190 Mhz

Here's another run

Governor: PERFORMANCE

Scheduler: VR
[Galaxy S Advance I9070 Original Android Developmen] tgabor7:
Does it stock firmware?
[Galaxy S Advance I9070 Original Android Developmen] krazzykid:
Base: DDULP8

ROM: Pure Vanilla v5

Kernel: CoCore 8.6.4

Yes, CoCore works fine on stock JB firmware. You only need to be rooted.
[Galaxy S Advance I9070 Original Android Developmen] Y94:
Is it possible to overclock by using apps like no frills cpu?

Inviato dal mio GT-I9070 utilizzando Tapatalk
[Galaxy S Advance I9070 Original Android Developmen] shut_down:
No, because it does not hit what is needed.

Послато са GT-I9070 уз помоћ Тапатока
[Galaxy S Advance I9070 Original Android Developmen] #Henkate:
How much can be overclocked?
[Galaxy S Advance I9070 Original Android Developmen] droidinsane:
i was hoping for getting otg function ality for a long time, checked out how far this kernel has reached great work by cocafe,

are you still working to bring otg functionality?
[Galaxy S Advance I9070 Original Android Developmen] shut_down:
Seems that we can't get it. Cocofe manage to get output power, but couldn't get otg.

Послато са GT-I9070 уз помоћ Тапатока
[Galaxy S Advance I9070 Original Android Developmen] cocafe:
After few days trying, it's stable now.

I'm dealing with Samsung DVFS stuff. It is Samsung DVFS which always scales up CPU frequency to make us feel smooth.

It conflicts with custom cpufreq table, with DVFS, CPU always sticks at maximum frequency.

We take back the control of cpufreq now, but without SecDVFS it doesn't feel smooth with low frequency but battery saving

It all depends the governor we use, I will consider adding back touch booster.

UV userspace hasnt coded.

I am thinking how to code it better.

Be patient please...

Next will be BLN etc etc

EDIT:

Will consider modifying cpufreq governors
[Galaxy S Advance I9070 Original Android Developmen] rodaven:
I never understand what's [MENTION=4832589]cocafe[/MENTION] saying, all I know is this guy is a genius. Thanks for your awesome work dude. :good:
[Galaxy S Advance I9070 Original Android Developmen] #Henkate:
So,i will be back to 4.1.2 soon :D Good luck dude! :)
[Galaxy S Advance I9070 Original Android Developmen] Vayper_fr:
Thanks a lot :)

When you will have finish, can you update CM kernel with OC integration ?
[Galaxy S Advance I9070 Original Android Developmen] akkufix:
Novathor has somes automatics in hardware for scaling and power. Also mali can regulate itself.

This chip isn't as bad as we ever thought. ;) Only thing - we had nearly no infos about it.

Another thing for battery savings - have you tried "write /sys/devices/system/cpu/sched_mc_power_savings 1"?

This let cpu regulate each core seperate in speed and power off.

Only works if "CONFIG_SCHED_MC=y" is set in kernel.

Asking, because i saw lot of kernels which doesn't use it or only put config_sched in kernel, but didn't configured it in ramdisk or init.d.
[Galaxy S Advance I9070 Original Android Developmen] :
I think he's talking about the 1.0 GHz bug.In JB, it is showing locked in 1000 MHz, for people who wants little info;

DVFS: Dynamic Voltage and Frequency Scaling

CPUfreq: DVFS for CPU Core

Devfreq: DVFS for other devices

He said Samsung DVFS feels smooth (because it love scales up frequency) it's conflicting with CPUfreq, now he can control CPUfreq but he lose DVFS stuff and the frequency working with lower values this feels slower.At this point he is thinking for modifying CPUfreq governors.There are lot of Linux document in the internet feel free to investigate them because you can know what you're using.That was Samsung's Linux 3.4 so I might be wrong :)

[MENTION=5073621]rodaven[/MENTION]
[Galaxy S Advance I9070 Original Android Developmen] cocafe:
Yes and No.

Mali cannot regulated itself, it's controlled by APE OPP. (I knew this long long ago)

Many people know that some devices like S2 S3 which mali can be OC by changing some numbers.

That's because their mali has PMU(Power Management Unit) while we don't have.

Our Power Management Unit is PRCMU.

We have a document about Novathor, but not the internal datasheet.

They hid some important info about clock, otg, charger and regulator etc etc.

As I said, no research, no right to speak.

Check out this

That sched you said has been removed by Linus Torvalds, and you cannot find it in modern kernel now.

I tried that power saving sched, the fact is that it does not save power and slows down system.

Why kernel people like adding such stuff, most of them don't test fully then release, or they even haven't checked, they just added it.

See, their internal document filename:

/* Hardware revision u8500 v1: GX570-BU-00000-r0p1

* Hardware revision u8500 v2: GX570-BU-00000-r1p0

* Hardware revision u5500: GX570-BU-00000-r1p0

* configuration registers: 0xA0300000-0xA031FFFFF (stw8500v1_usermanual p269)

*

* Shared Peripheral Interrupt assignments: (stw8500v1_usermanual p265-266)

* Nb | Interrupt Source

In mali folder

I will

Yes, that's what I am talking about.

For Samsung official ROMS:

I strongly recommend disabling com.sec.android.providers.downloads and com.android.providers.downloads(Name: My downloads) in System Settings

They always run at the background to scan media files, make system laggy!

Disabling them won't affect downloading, I still can download something in Chrome Beta

EDIT:

I am tweaking governors now, becus I don't want to enable touch booster...
[Galaxy S Advance I9070 Original Android Developmen] akkufix:
Uploaded somewhere? ;)

Tell my about registers and addresses. I'm doing assembler in my job.

Most things, which slow down our devices is putting lots of modds, tweaks, scripts... on it, which confuses the kernel itself for proper function. So, it gets "overloaded" with configuration-"trash" and dubious programmings. ;) So, stuff is working against each other, instead together.

Keep code as pure as possible, then it works best.

We have also this sched_mc in our HTC one latest origin kernel 3.6.10 sources (see ElementalX-kernel) and i also use it for my actual Linux builds 3.13.1 to run on Note-/Netbooks. Seems to be that Linus only announced, but forgot to delete? ;)

Also, there is no need to invent mc_sched as new. Only say yes and put a 1 in file.

For reference --> http://lxr.free-electrons.com/source/arch/arm/Kconfig?a=arm

As you said - no research, no right to speak. :good: you can't read and know anything... ;)

For speed...well, in mode 1 you don't feel any difference, but we could save battery and reduce cpu load. Don't watch about benchmarks.

Btw. I always tested my kernels on my X-Sola and was able to improved my battery from 1d 9-13h up to nearly 3d (same use) without loosing speed, only by using integrated kernel stuff. Also there is a full compatibility.
[Galaxy S Advance I9070 Original Android Developmen] cocafe:
Well, can you find "sched_mc" in sched.h in LK 3.13?

It only presents below LK 3.1
[Galaxy S Advance I9070 Original Android Developmen] akkufix:
It was only moved in core.c
[Galaxy S Advance I9070 Original Android Developmen] shut_down:
What?
[Galaxy S Advance I9070 Original Android Developmen] Sh0m1:
What?
[Galaxy S Advance I9070 Original Android Developmen] #Henkate:
I think he wanted to say something like this: "Make final update and then stop building,to make all peoples update their rom or phone".This i understood.He better shut up until learn some english :D
[Galaxy S Advance I9070 Original Android Developmen] shut_down:
Anyway every veraion of kernel is daily usable. Cocofe is making it better and better. No need for stoping and telling this is a final release.

Послато са GT-I9070 уз помоћ Тапатока
[Galaxy S Advance I9070 Original Android Developmen] akkufix:
You can be glad to have a guy like him. :good:
[Galaxy S Advance I9070 Original Android Developmen] arffrhn:
Nightly is a build where developers make some changes daily to fix something or making it better and better. These changes will be compiled daily. However, as our developer also have his life outside XDA, so updates will not come everyday. He make changes, test them, test again, give to trusted people to test for him and then he'll publish it here. So, be patient.

One last thing, for kernels, I don't think there will ever be a 'final' build because changes are made to get it work better, to keep the kernel up to date.

Sent from a battery powered device