yashsingh1/xdaforums huggingface dataset:
[Galaxy Y GT-S5360 Android Development] Miche1asso:
Hi marco, thanks for answering.

Which readme? The one in the Moroc-OS root directory? It says version v2.5. Actually I am a noob with git, I was wondering what's the git command to know which repository we are using.

Anyway, is the version 2 of Merruk kernel stable in the S5360? That's what I wonder.The one I compiled is pretty bad in terms of performances.

1. Ok, I know which file to edit for the sampling rate. I'll check

2. Yeah, I meant that side was working. It does set those frequencies as available

3. Don't get me wrong.. It was lagging like hell indeed!!! The feeling is that the scaling_cur_freq value of 12-56MHz was real.

4. Ok, I'll give to the board-tassve module a look for the overclock, then. You do confirm it works with the Galaxy Y, right?

5. Any tool you can suggest to set/check the voltages then? I used before that the bacem-tweak and i could at least read an write the -xymV value. But this is all new for me.

Oh well, I'll keep using the s5570I stock ones then. That's what I think the Merruk kernel does (for Galaxy Y) anyway. Thanks again.

---------- Post added at 01:48 PM ---------- Previous post was at 01:45 PM ----------

Yes, I've got that one indeed. What about vibetonz? The S5570I source code doesn't use it, I think.

Another question, actually.. I was thinking about replacing the ../modules and the drivers directory with the ones from the last source code from Samsung for the bcm21553 family (actually the self called "ICS" ones for the B5330). Would it be a good idea or I will lose the changes in the Merruk source code?
[Galaxy Y GT-S5360 Android Development] MarcoToo:
Try

cat /sys/class/regulator/regulator.5/microvolts

to check for the voltage. And I usually set them directly in the sources.

The overclock does work as far as I am concerned.

edit I don't know which regulator your device is using, you might have to modify the driver so just applies whatever you tell it instead of checking if it would be nice and lovely.

Great idea! I actually thought about using the S5300 modules tree.
[Galaxy Y GT-S5360 Android Development] Miche1asso:
As I wrote the bacem-tweak was working (more or less). But volting for now i my last priority. I can't find anymore the module that sets the frequency table. I've seen it 2 days ago, now I am lost. Any idea?

Also, where in Earth are the source code for the extra CPU governors? I've got a feeling the git is incomplete. The biggest issue I have compiling Android kernels is finding the pieces! So annoying.

S5300? Which one is it? Actually I asked to Samsung AOSP to add the latest source code for the S5570I (Pop Plus/Next Turbo in Italy, my phone). 3G draining the battery apart they are very stable. They answered, asked for more details then nothing. Hopefully next week, the codes I've got are dated 14 Oct 2011!! The ones for B5330 are dated January 2012. I wonder if this is a joke.

Still, I gave a fast look and I am afraid that replacing the folder we will lose the Merruk's changes. I would be careful with that, first I'll make a clone and then change the folders, maybe one sub folder after another. As I tried to do with the CM7.2 codes (I've got the ones for MSM CPU, Qualcomm), but it is a mess.
[Galaxy Y GT-S5360 Android Development] kurotsugi:
no extra cpu gov until you add it by yourself :P
[Galaxy Y GT-S5360 Android Development] Miche1asso:
So what about Smartassv2? The first page says that it is there. :confused:

"Added CPU Governor Feature. (SmartassV2…"

Not that I need it, I just want to check that the source codes I've got are complete.
[Galaxy Y GT-S5360 Android Development] savie:
Its bugs from samsung source so cant use interactive governor like ondemand, smartass, etc..

Thanks to irfanbagus with small fix but big impact its solve that problem.. :)

U must edit manually to fix that bugs..
[Galaxy Y GT-S5360 Android Development] kurotsugi:
you may check into driver/cpufreq/. the basic gov like ondemand, conservative, powersave and userspace is there but I didn't see any smartass thing inside it.
[Galaxy Y GT-S5360 Android Development] lupin661:
The kernel makers having good conversation, amen to all of u..:beer:beer::beer::beer::beer::thumbup: to each of u

Send by the postman

press thank if u whant priceless
[Galaxy Y GT-S5360 Android Development] Miche1asso:
yeah, I know. I actually made a script that monitors the CPU Governors. This is a partial output:

time_in_state: 156000 4758 208000 6386 288000 4703 312000 100 416000 3809 468000 400 624000 30061 832000 12215 [B]936000 7572 1248000 80355[/B]
total_trans: 740
scaling_available_frequencies: 156000 208000 288000 312000 416000 468000 624000 832000 936000 1248000
scaling_available_governors: conservative ondemand userspace powersave bcm21553 performance
[B]scaling_cur_freq: 832000[/B]
scaling_driver: bcm
scaling_governor: ondemand
scaling_max_freq: 1248000
scaling_min_freq: 1248000

As you may see according to the stats "time in state" the kernel is actually overclocking. But the value "scaling_cur_freq", which I suppose is the same read by SetCPU is totally messed up. Look what happens when I change with SetCPU the frequency to casual values:

scaling_cur_freq 624000
scaling_cur_freq 624000
scaling_cur_freq [B]19809[/B]
scaling_cur_freq [B]19809[/B]
scaling_cur_freq [B]104000[/B]
[..]
scaling_cur_freq [B]104000[/B]
scaling_cur_freq [B]19809[/B]
scaling_cur_freq 288000

Numbers in bold are obviously wrong. A similar thing happens with the PX kernel for S5570I. 156MHz often shows as 104Mhz. But here is a rule, it is never right. I wonder how it can work in the Galaxy Y, the code is board independent (I've found the .c modules now).
[Galaxy Y GT-S5360 Android Development] kurotsugi:
in my latest test, the fully working freq are 156 at 0x0A, 312 0x0B/0x0C, 624 0x0D/0x0E, and 832 0x0F. the other freq doesn't seems fully working. when we use another freq like 468 at 0x0C or 780 at 0x0E app like cpu spy shows that the cpu work at that freq but in reality it doesn't. the 104 mhz is a kind of reserved freq when cpu failed to reach certain freq.

anyway, thats the result while I was working with sgy's stock kernel source. I've told maroc about these stuff and he said he already fix them in his kernel source. let's wait for him. maroc's source is interesting to learn but I still prefer to use my old stock source code when I build my kernel ^,^v
[Galaxy Y GT-S5360 Android Development] Maroc-OS:
That's Really Good i was planing for that :) but your the first good luck :)

for the rest MarcooToo has ben replied :)

for readme it's README.md but keep version and rights :) i can help in the board overclock cause i made only the totoroboard file :)

thank you brother :)

that's what am talking about :)

yes i have ported them from other devices :) but the j4fs driver need some adjustments :)

great job and you are right for the team name :)

ok here i repeat ov/oc & uv/uc will not work cause you need to modify the borad file :)

for frequencies you can check the galaxy y all works but we don't have the full performance for the 1Gb (not all the wiched performance, am not talking about speed)

and sorry guy's for the kernel :) not today :( family time first :)

That's all for now if you need something please feel free to ask here or in PM's
[Galaxy Y GT-S5360 Android Development] Maroc-OS:
it's fixed in merruks kernels without changing the cpu latency ;)

really that's what we need :) good conversations like this :) you feel a live with that :)

yep good but for frequencies it will not work until you change the borad files like the way that i did :)
[Galaxy Y GT-S5360 Android Development] Maroc-OS:
sorry for this one :)

wich drivers you need and what's the rest of the problems that you got?

i can help. and feel free to contribute to merruk repo :)

i have already done with galaxy pop :)

so i'm plaining to make it universal :)
[Galaxy Y GT-S5360 Android Development] Miche1asso:
"the fully working freq are 156 at 0x0A, 312 0x0B/0x0C, 624 0x0D/0x0E, and 832 0x0F"? You mean there are 15 slot 0x00-0x0F where to store the frequencies? I have to check.

Anyway, yeah, I agree. I am indeed waiting for some recent source codes, though. I checked the Merruk kernel because it is the only one I've found that theoretically should do the overclocking. Not sure if it does at this point.

Indeed I partially fixed the module arch/arm/plat-bcmap/bcm_cpufreq.c (there wasn't much to change from the original source code. The only thing is to choose the frequency when to set the PPL on with a "if freq <= pplfreq". The logic instead was totally changed). Now at least the scaling_cur_freq value reported is correct. When I set the min and max frequencies to the same value it reports that value. I don't know what's wrong with SetCPU, it still gives out funny values.

I attach copy of the file in case anyone is interested. Just search for "Michelasso" in the code and you'll see the changes. Otherwise make a "diff" with the Merruk or stock code.
[Galaxy Y GT-S5360 Android Development] Maroc-OS:
yes give it a look a gain,

for the oc things look at my file bcm_cpufreq.c

there is a new freqs/voltags handling fucntion there, completelly new/changed and i added there only the freqs that we need :) no more auto scaling to an unknown freq/volte :)

also we enable "b->appspll_en_clk" when we have a heigher frequencies :) and shut it down when switching to lower's

when cheking the file now i can see one mistake :) this is it and fixed at github

if (freqs.new > max)
freqs.new = max;
if (freqs.new < min)
freqs.new = min;

freqs.old = bcm_cpufreq_get_speed(0);
freqs.new = b->bcm_freqs_table[index].frequency;

shauld be reverted :) cause there we check befor declaration :) so!!!

freqs.old = bcm_cpufreq_get_speed(0);
freqs.new = b->bcm_freqs_table[index].frequency;

if (freqs.new > max)
freqs.new = max;
if (freqs.new < min)
freqs.new = min;

hope that can help

EDIT :

Sorry i forgot :)

one more thing :) for the version of the kernel i think you are asked about this one not for the version in github readme file :)

for this one check scripts mkcompile_h file :)
[Galaxy Y GT-S5360 Android Development] Miche1asso:
Sorry Merruk, but that is the last of the problems. The stock source code doesn't even check if the frequency is inside the boundaries, because it shouldn't need to (unless of a bug obviously). The freqs.new value comes from the table, which I suppose is selected by the governor. So putting the check first you just keep following the logic of the source code. Which is fine.

Where the module has got many issues is the part where you set the PPL ON/OFF and the voltages. First of all it is unnecessary to check all the single values, one just needs to check it the frequency is above a bias after that the PPL must be set ON, OFF if it is below. And we don't know what the bias is. In my patch I assumed 312Mhz. What is really broken is how you set the voltages. The voltage must raise first if the new frequency is higher, and decrease later if the new frequency is lower. If you don't do it there will be pieces of code that will be executed at the highest frequency with the lowest voltage, and that isn't safe.

else if ((!ret && (freqs.new == freq_omedium))	||
(!ret && (freqs.new == freq_umedium))	||
(!ret && (freqs.new == freq_starter))	||
(!ret && (freqs.new == freq_normal))	||
(!ret && (freqs.new == freq_lower))	||
(!ret && (freqs.new == freq_ulower)))
{
clk_disable(b->appspll_en_clk);
ret = [B]clk_set_rate(b->cpu_clk, freqs.new * 1000);[/B]
}
[…]
else if (volt_new != volt_old) {
#ifdef CONFIG_CPU_FREQ_DEBUG
printk(KERN_DEBUG "cpu_volt change: %d --> %d\n",
volt_old, volt_new);
#endif
[B]regulator_set_voltage(b->cpu_regulator, volt_new,
volt_new);[/B]
}

You see that you always change the voltage AFTER setting the clock. Anyway, the biggest issue here is to decide for which frequency to switch the PPL on. I made a mistake in my patch putting the PPL always OFF and the clock was stuck at 56MHz (again, a value that isn't defined in the table. I wonder from where it comes out)

Also I compared the arch/arm/mach-bcm215xx/board-totoro.c module with the stock one, there are no differences in terms of clocking. Actually no differences at all apart from some spacing. I am quite positive OC/UV is board independent, it should depend on the bcm21553 CPU only. But I may be wrong, sure. Do the frequencies show fine in SetCPU (last release)?

PS: I checked the mkconfig.h file I've got. It seems to be the same. Is it version 2.5?? I thought it was 2.0

echo \#define LINUX_COMPILE_BY \"`echo "MerrukTechnology-2.5"`\"
[Galaxy Y GT-S5360 Android Development] godofping1111:
Sir Maroc are there any coming stable kernel with 1.2ghz overclock?
[Galaxy Y GT-S5360 Android Development] kurotsugi:
not all the slot can be used. the stock script is a lil bit messy. some of the slot like 0x10 and 0x0B have been used for something else. personally I don't want to add freq slot more than 6 since the cpu will need more time to reach max freq. our cpu isn't a goo one so that if we work with a gov like conservative or ondemand, our device will feels very slow.
[Galaxy Y GT-S5360 Android Development] Maroc-OS:
no :) look again :)

we cant check before we declare the freqs.new/freqs.old :) cause the variables are NULL or Zero, we can say :) it doesn"t contein any values so what we compare here??

if freqs.new > max ??????

for this one :) nope my brother :)

you know what?

before i need to explain one thing, it's not nessesary to check all the single values, you are right but ! we got a problem here :) so ! what is it???

we can got some undefined freqs set's (bypassing the check step) :) for ex:

if we had a X value and it's not defined in our frequencies, and we take this one like an example X = 52000Mhz

and if we only do this step like you said this value can be set :) and we got a very slow phone and it comes (applyed) in boot time :) so the phone boot's slowly & we can't do anything about that, we need to wait for the phone to be powered on and then we can change the freq :)

part number Two :

for the PLL part we had a problem here :)

the pll needs to be set ON for every heigher frequency :) so !!!! not only the heigher one :) in our case 1.25Ghz :) to enable the energy (cpu performance) for this freqs.

part number Three :

No brother :) you'r wrong :) you can see again :)

i set the voltage first :) not second :)

don't look into his place in the code but look at the return values :)

i apply the ret at the end of this function :) so ??, :) maybe there is some small bugs that we not seen but this time am not working on the code "2 days ago" cause i can't verify am not in my machine :) and i can check it when i comes back home.

no brother it's defined :) but not in the same place is for that i taked a lot of time to did it :) (make the ov/oc & uv/uc works)

look into this file to see it :) it's really complicated :) clock-21553.c

there is a lot of functions :)

clk_armahb_reg_to_arm11_freq_mapping

clk_armahb_reg_to_cp_freq_mapping

clk_armahb_reg_to_ahb_fast_freq_mapping

clk_armahb_reg_to_ahb_freq_mapping

clk_armahb_reg_to_v3d_clk_mapping

and more :)

here if you can see, samsung has used a template from other device but she used also a lot of personal dev in a horrible way :) the code like what i said is really complicated and it shauldn't be.

in a n other word :) Samsung has ben f*u*c*k*e*d the sources :)

yes but this one has got the 2.5 version cause we added a lot of things :)

exactlly kurotsugi not all :) but we can store the heigher freq in 0x0F :) just like what i did :) to got it work

i hope my post was informative :)

and really sorry for my bad english
[Galaxy Y GT-S5360 Android Development] kurotsugi:
well...personally I don't really care the differences between us when applying a new freq or new voltage. it's a lil bit too technical and I feels that it's a matter of personal choice. we have more serious problem about the freq stuff. I'm still wondering why did a freq like 416 and 468 didn't fully working in stock source. I have builded a kernel from maroc's source and I found that not all the freq are showed correctly in setcpu. i also got weird freq like 56 as reported by Miche1asso. now I'm reverting back to my stock source with irfan's patch and a lil modification to add several freq. irfan's patch already working with similar method as Miche1asso's proposed method but not all the freq is working. with PLL stuff enabled we only got 156, 312, 624, and 832 in stock source.

we need to figure out how to make alternative freq like 468 work.
[Galaxy Y GT-S5360 Android Development] Miche1asso:
I am afraid there is a communication problem here. Anyway don't worry, I'm not arguing, just trying to find out what's wrong.

No, the point was that there really isn't the need to do that check at all. The stock source code doesn't do it

there

because the frequencies are already kept inside the boundaries when it sets the new frequencies. But ok, it isn't a big deal to do it twice, that is not an issue, it is actually safer.

Higher (as above) than the bias, not the highest (as the top). That is where the English misunderstanding is. I set a bias, I called it freq_ppl. Then I do a simple if-then-else like this (it is generic, not pure code):

if freq.new >= freq_ppl
then set_ppl_on
else set_ppl_off

That is the logic, if freq_ppl is the turbo frequency it behaves like the stock source code. Your code doesn't exactly do it. Also freq_ppl doesn't need to be a valid frequency in the table either. Just something in the middle lower or equal the turbo frequency. Which must be tuned, I don't have the value. To be safe I set it to 312MHz (the PPL must be ON at the higher frequencies).

Anyway, after changing it the

/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

values now is correct. I don't know what's the reason, thought.

No, sorry but here I

must

insist.

You must set the voltage first or second depending on the situation. Because if you set it first when the frequency decrease, you decrease the voltage while you still are at the higher frequency. Which is obviously wrong. The logic is the following:

if freq new > freq.old
then
set_new_voltage(); // Voltage FIRST. Frequency will be higher, it needs more Volt now
set_new_freq();
else
set_new_freq(); // Frequency FIRST. Voltage will be lower, we can't decrease it in advance
set_new_voltage();
fi

You need to switch the order depending if the new frequency is higher or lower than the previous one. If you check the stock source code again you'll see that it does as I said.

All right, thanks. I will check that one. I felt like those frequencies were coming out from nowhere.

Yes, I totally agree. I couldn't even compile the stock source code for the B5330 just straight out of the "make defconfig". Errors everywhere, the text files of the .c and .h modules are in MS-DOS format (\n\r at the end instead of just \n).

I call this less than serious from the first seller of mobile phones. Well, not that Broadcomm helps at all.

Nah, don't worry. It tool me years to learn this language. I know the feeling.. :)
[Galaxy Y GT-S5360 Android Development] sireangelus:
I don't want to sound ungrateful, but could you stop for a little bit to do the 3.X.X work and finish and release the 2.5 for now?
[Galaxy Y GT-S5360 Android Development] Miche1asso:
I see now where physically the clocking is done. In the clock-21553.c module indeed as Merruk showed me. I also understand what you meant with those 0x0.. values. I have seen there is a call to the HW to get the Apps PLL value, the one that should define the "turbo mode". Any idea which one is the exact value?

Still I am afraid that SetCPU is reading the correct clock value straight from the HW, while the values we get from the OS (/sys/device/…) are just logical, at an higher level, what the OS

thinks

it is using. That would explain why setting the clock to 1.25GHz Antutu benchmark gave me even worse results than the stock kernel. Maybe in the Galaxy Y is different (I remind I have a S5570I) but that would surprise me.

The problem is that such stuff is very HW specific. Who has the knowledge to modify it? As far as I've seen it's more like a guess. Anyway kurotsugi, where could I find the irfan's patch? Just to take a look at it.
[Galaxy Y GT-S5360 Android Development] Maroc-OS:
no :) here we need to do it for the heighest freqs yep we need to do it first :) and i liked this one from Miche1asso :) i missed this even if i know it i was focusing to make it work :) look at it :

if freq new > freq.old
then
set_new_voltage(); // Voltage FIRST. Frequency will be higher, it needs more Volt now
set_new_freq();
else
set_new_freq(); // Frequency FIRST. Voltage will be lower, we can't decrease it in advance
set_new_voltage();
fi

but give me one sec and you'll found the new function in github :) i need to add more stuffs :) that's whar said in preveiws poste :) maybe there is some bugs :)

in stock source samsung has only two freqs :) no more the other freqs are used for apps and v3d and other related stuffs :)

No No :) maybe it's my way to talk in english LOL. & if you know i feel like if am really at XDA now cause this is the first time that i found a serius and constitutive conversation here :)

stock sources doesn't do it because there is no freqs only enable pll and disable pll :) two freqs are really easy to hundle.

and for this i did it :)

for the first part here :) i think my eglish again :)

but for the ON/OFF PLL i think i did it :) but with an other way :) like what i said i give permission only to the declared freqs :) and all softwares works great with it :) and values works great,

but i will take a look again :)

here yes :) you are right :) i missed that :) for lowest freqs we need to do it like that :) i said that at top

oh! yes, thanks for you :) cause i really loved the conversation :)

and yes that's the reality :( the first seller has used omap templates and there own templates and mixed all in one of the most bad way's.

that's what i did :)
[Galaxy Y GT-S5360 Android Development] Maroc-OS:
yes exactlly :) and the heighest value is 0x0F and to encrease this we need a good one in assembly hardware development :)

you can see conversation about this in my github repo or prevews postes.

here i don't know :) really here i have all right :) i need to see the board file first then i can respond.

like what i said :) see github this is a link : https://github.com/Maroc-OS/Merruk-Technology/issues/4

see the link below in the conversation at github
[Galaxy Y GT-S5360 Android Development] Maroc-OS:
hello guys please can you tell me what is the default results for graphics 2D/3D in some apps?

please i need to compare them if you can :)
[Galaxy Y GT-S5360 Android Development] "theviper":
May be this can help

http://xdaforums.com/showthread.php?t=1649449
[Galaxy Y GT-S5360 Android Development] Maroc-OS:
Thank You :) it was helpfull :)
[Galaxy Y GT-S5360 Android Development] Maroc-OS:
Developer Edition :)

Hello Guys :) This is The Developer Edition :)

this version use stock ramfs and only changed modules :)

modules from the ramfs has ben changed by merruk's modules and this version has really good results only the IO has someproblems i need to figurout what's going on there :)

Please test and report :)

EDIT:

all freqs works :) and also cur freqs works :)

EDIT:

for the rest go to here :

http://xdaforums.com/showpost.php?p=31436465&postcount=3726
[Galaxy Y GT-S5360 Android Development] Fallen_Knight:
testing...report later..

do i need system 1.0.8??
[Galaxy Y GT-S5360 Android Development] savie:
Stock rom with init.d support

1st try:

Not luck..

2nd try:

Delete file on init.d booting but hang when open app and connect usb..
[Galaxy Y GT-S5360 Android Development] Fallen_Knight:
1st try it booted

antutu benchmark hang on io

twlauncher fc at boot up

no data connection

i can feel the overclock man..its great...

im on stock rom

init d scripts from tweakz6
[Galaxy Y GT-S5360 Android Development] PREMOLIKES:
fc and reboots.Anyway thanks