Posted: Tue May 23, 2017 12:57 Post subject: Downclocking WRT54GS v1.0 to 100Mhz
Hi Guys,
Is it possible to downclock the WRT54GS v1.0 (With BCM4712 rev 1) to 100 Mhz?
I used NVRAM to set it but apparently router ignore my changes.
I used value 100 in nvram like:
nvram set clkfreq=100 (I also do the commit), also tried stuff like clkfreq=166,166,166 to see if at all it works.
When I use numbers like 166 in the web router status interface dd-wrt shows the CPU clock as N/A and when I put it something like 100 or 200 it always shows CPU clock 200 MHz.
Why is that?
What is the minimum clock speed I can have in WRT54GS. I am doing some research experiment and really do not use the router at all. I just want to achieve minimum clock speed.
This page in dd-wrt wiki: https://www.dd-wrt.com/wiki/index.php/Overclocking_BCM_47xx_CPU%27s explain that we must use specific values for nvram command. But I could not find one for BCM4712. From the same page we can see that CPU can go as low as 66 Mhz, but I do not know how to achieve that.
Joined: 10 Jan 2015 Posts: 270 Location: Minnesota
Posted: Tue May 23, 2017 15:15 Post subject:
If you apply the underclock and commit it, it needs to have nvram reboot in the command list as well.
If you telnet into the router, you can use the nvram get clkfreq command to see if it applied the underclock.
Might just be a firmware specific issue where it only reports the stock frequency that is expected (and possibly higher).
But the nvram get clkfreq command would let you know for sure. _________________ LATEST DD-WRT FW IS LOCATED HERE: https://dd-wrt.com/support/other-downloads/?path=betas%2F
Posted: Tue May 23, 2017 16:31 Post subject: Re: Downclocking WRT54GS v1.0 to 100Mhz
s3gm3nt wrote:
Is it possible to downclock the WRT54GS v1.0 (With BCM4712 rev 1) to 100 Mhz?
[...]
When I use numbers like 166 in the web router status interface dd-wrt shows the CPU clock as N/A and when I put it something like 100 or 200 it always shows CPU clock 200 MHz.
TD;DR The minimum speed you can set is clkfreq=120,60
You can't rely on the clkfreq setting (incl after a reboot). It may not recognize certain settings, and some SoC's can even soft brick the router if it doesn't match. The GUI may not work right either if it doesn't recognize the value; and I know it doesn't for the GSv1.x.
This is because it uses a different structure table for the allowed values. See the TomatoUSB forum link in this post to find out. To determine actual speed, run these:
dmesg | grep -ie hz -e cpu -e process -e freq -e mips
cat /proc/cpuinfo
You can reference the BogoMIPS parameter for relative changes; but note the number may not match your exact Hz for MIPS SoC's. For a WRT54* it should be close (as noted in my old TomatoUSB post), but sometimes it reports ~ 1/2 the actual speed. _________________ #NAT/SFE/CTF: limited speed w/ DD#Repeater issues#DD-WRT info: FAQ, Builds, Types, Modes, Changes, Demo#
OPNsense x64 5050e ITX|DD: DIR-810L, 2*EA6900@1GHz, R6300v1, RT-N66U@663, WNDR4000@533, E1500@353,
WRT54G{Lv1.1,Sv6}@250|FreshTomato: F7D8302@532|OpenWRT: F9K1119v1, RT-ACRH13, R6220, WNDR3700v4
nvram set clkfreq=120,60
nvram commit
nvram reboot
reboot
In both of the cases it did not work, the WRT54GS return 200 again for both nvram get clkfreq and dmesg and /proc/cpuinfo (not exactly 200 but 199...)
So it looks like that 120,60 is not also correct value, however, I found that value 192,96 is working and then it changed the clock to 192. also dmesg and cpuinfo showed the change. The question is why I can not go lower e.g. 120?
My WRT54GS serial number is:
CGN10D75xxxxxx
What I am missing here? Why nvram does not accept the 120,60 and maintains the previous speed.
In both of the cases it did not work, the WRT54GS return 200 again for both nvram get clkfreq and dmesg and /proc/cpuinfo (not exactly 200 but 199...)
So it looks like that 120,60 is not also correct value, however, I found that value 192,96 is working and then it changed the clock to 192. also dmesg and cpuinfo showed the change. The question is why I can not go lower e.g. 120?
My WRT54GS serial number is:
CGN10D75xxxxxx
What I am missing here? Why nvram does not accept the 120,60 and maintains the previous speed.
The CFE can disallow certain speeds too, even if the SoC table supports them.
Ah I see, my GSv1 used the type2 n4m table, and I think was a CGN0. However, your CGN1 must use type4, since out of the three type tables, "192,96" is only valid for type4. Apparently the CFE doesn't allow 120,60 though. Only other possibility is "150,75", but it may well be blocked too. Good luck.
seg000:1069 aClkfreq200 db 'clkfreq=200',0
seg000:1075 aSdram_init0x00 db 'sdram_init=0x0008',0
seg000:1087 aSdram_config0x db 'sdram_config=0x0022',0
seg000:109B db 73h ; s
seg000:109C aDram_refresh0x db 'dram_refresh=0x0000',0
seg000:10B0 db 73h ; s
seg000:10B1 aDram_ncdl0x0 db 'dram_ncdl=0x0',0
Thus (clkfreq=200',0), I guess the only thing I must do is to patch the binary with 120,60 and then write it to the device.
Anyone knows how to overwrite the existing CFE? Does it have integrity check for CFE.bin?
Also, Can I also enable DRAM selfrefresh? What are the values?
Thus (clkfreq=200',0), I guess the only thing I must do is to patch the binary with 120,60 and then write it to the device.
That may only be related to the action after a reset...did you try '150,75'? _________________ #NAT/SFE/CTF: limited speed w/ DD#Repeater issues#DD-WRT info: FAQ, Builds, Types, Modes, Changes, Demo#
OPNsense x64 5050e ITX|DD: DIR-810L, 2*EA6900@1GHz, R6300v1, RT-N66U@663, WNDR4000@533, E1500@353,
WRT54G{Lv1.1,Sv6}@250|FreshTomato: F7D8302@532|OpenWRT: F9K1119v1, RT-ACRH13, R6220, WNDR3700v4
Posted: Tue May 30, 2017 13:24 Post subject: Re: Downclocking WRT54GS v1.0 to 100Mhz
s3gm3nt wrote:
Is it possible to downclock the WRT54GS v1.0 (With BCM4712 rev 1) to 100 Mhz?
No, it is not possible.
CPU clk fq is based on tables for the pll oscillator and the lowest table value is 192,96 for 4712. _________________ Kernel panic: Aiee, killing interrupt handler!