[Nexus One Android Development] coolbho3000:
As some of you may know, the 45nm QSD8650A due out later this year can run at an incredible 1.3Ghz, 30% faster than the current Scorpion core used in the Nexus One. I was, of course, getting kind of jealous of this speed, and wanted to see if it was possible on the Nexus One. Since the model number hasn't changed much (from QSD8x50 to QSD8x50A), I thought that the "A" might only indicate a die shrink and not any significant hardware changes.

Warning: the following information is for kernel developers!

It appears to be a possibility. I dug through the kernel source of the Nexus One and I've discovered that the QSD8250 in the Nexus One might be able to reach ~1.267GHz. I point you to the following file in the kernel source:

http://android.git.kernel.org/?p=ke...f5dab31e6ffece;hb=android-msm-2.6.29-nexusone

Near the beginning of the file, a list of frequencies is given. Starting from 384MHz, the frequencies start basing off a PLL called SCPLL, and increases in multiples of 38.4MHz. If you look at the table, the frequency defined in each row that uses SRC_SCPLL is 38400*sc_l_value (sc_l_value is also defined in the table, in hex).

If you look at 998MHz, it's 38400*0x1A = 998000, which is the max clock of the Nexus One. Now take the closest speed to 1.3GHz if you continue the 38400KHz increments. 1.267GHz should be 38400*0x21, or 38400*33. Where else do we see 33 in the code?

The function if scpll_set_freq() contains the following simple code for bounding sc_l_value. Note that the maximum value is exactly 33, and not 26 (0x1A)! Also, the minimum value is 10, which matches the lowest SCPLL speed, 384000.

if (lval > [b]33[/b])

lval = [b]33[/b];

if (lval < 10)

lval = 10;

33*38400 (1.267GHz) nicely corresponds with the maximum 1.3GHz of the 45nm Scorpion. Qualcomm rounded 998MHz to 1GHz so there's no reason why they wouldn't round 1.267GHz to 1.3GHz.

CPU voltages are also defined in the table. Some previous versions of acpuclock-scorpion.c had the CPU running at 1.3 volts at 998MHz, but now it's running at 1.275 volts at 998MHz. What we know from that is that the processor can handle up to 1.3 volts (or possibly more). If the processor can't go above 998MHz at 1.275 volts, we know we can (somewhat) safely increase the voltage to 1.3, and unsafely increase it above that.

There is, of course, a comment saying: "output of scpll 128-998 MHZ," which is contrary to the bounds defined in scpll_set_freq(). If this really is the case, overclocking might still be possible, but it would be harder.

What would really help is if someone sent us detailed Qualcomm documentation for the QSD8250/Scorpion core. Don't post it publicly, as Qualcomm is Cease and Desist happy about such things.

My Nexus One is currently not unlocked, as it's waiting for an RMA, so there's no way for me to develop/test any of this. Swetland would also know a lot about this, but who knows what kind of NDA he is under from Qualcomm :P

It might be as simple as appending a few lines to the table. Keep in mind that the last value (vdd/voltage) might need to be adjusted:

{ 1036800, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1B, 0, 1300 },
{ 1075200, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1C, 0, 1300 },
{ 1113600, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1D, 0, 1300 },
{ 1152000, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1E, 0, 1300 },
{ 1190400, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x1F, 0, 1300 },
{ 1228800, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x20, 0, 1300 },
{ 1267200, CCTL(CLK_TCXO, 1), SRC_SCPLL, 0x21, 0, 1300 },
{ 0 },

I also found the exact commit where the Scorpion was changed back to 1.275v from 1.3v:

http://android.git.kernel.org/?p=ke...ff;h=7fcffb1e4554e1e364e994e5ce1ef7e471422ebf

The commit was made after the holiday N1s were passed out so we can probably conclude that it's reasonably safe.

Edit:

Just an update: Qualcomm's code in Codeaurora reveals that there is an eFUSE defining the max clock of the processor, read from a certain address, and as predicted, 1267200 is indeed a valid maximum speed for some versions of the Scorpion (this is, more likely than not, the "1.3GHz" quoted by Qualcomm). It also explains the Liquid's situation. The Scorpion core in the Liquid is probably not underclocked (at least not any more than the Neuxs One is underclocked in relation to the 8x50a), but intended to run at 768MHz max.

https://www.codeaurora.org/gitweb/q...c;hb=7d031492392a410d4814b6e104f53d55b0ae499b

switch (tcsr_spare2 & 0xF0) {
case 0x30:
max_acpu_khz = 768000;
break;
case 0x20:
case 0x00:
max_acpu_khz = 998400;
break;
case 0x10:
max_acpu_khz = 1267200;
break;
default:
pr_warning("Invalid efuse data (%x) on Max ACPU freq!\n",
tcsr_spare2);
goto skip_efuse_fixup;
}

I feel that the people who have the knowledge required to make these tweaks can experiment with them responsibly. I do not encourage releasing a kernel publicly capable of reaching higher speeds or voltages.