OpenWrt Forum Archive

Topic: New information about WRT54G v4 clock frequencies

The content of this topic has been archived on 27 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

After discovering that already published clock frequencies above 240mhz were not being actually applied on my WRT54Gv4 and WRT54Gv5, I did some research to discover why. It turns out that these have r0.8 of the BCM5352/3302 processor instead of r0.7 and end up using a different table in sbmips.c.

This different table means they have a different set of valid clock frequencies. Also, their default CFEs behave differently in that they handle invalid clock frequencies gracefully by finding the next closest valid match. Frequencies above the maximum of 250mhz end up with the processor clock not changed, or set to default, depending if a power cycle was performed (I think).

DD-WRT's web UI reports the clock frequency as that indicated by the nvram variables, meaning all those people who use that firmware and think they've overclocked t 252mhz or above are actually running at the default speed of 200mhz.

Furthermore, since the clock ratio between CPU and SB is fixed on these boxes, the sbclock is ignored if supplied in the clkfreq value (the second part, after the comma).

The highest valid frequency for these boxes is 250/125, CPU and SB clock, respectively.

I've posted this new information and complete valid frequency list in the WRT54G wiki page, though it also may pertain to GS models:

http://wiki.openwrt.org/OpenWrtDocs/Har … 8wrt54g%29

To verify your actual clock frequency, use 'cat /proc/cpuinfo' or 'dmesg'. Do not rely on nvram variables for the above stated reasons.

This is my WRT54GL v1.0:

root@OpenWrt:~# cat /proc/cpuinfo
system type             : Broadcom BCM947XX
processor               : 0
cpu model               : BCM3302 V0.8
BogoMIPS                : 199.47
wait instruction        : no
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : no
hardware watchpoint     : no
VCED exceptions         : not available
VCEI exceptions         : not available

Does your advise apply to my case too?

Sorry for the delay, I didn't notice your post.

I'm sure you already figured it out, but yes it does apply to your board as well.

In addition to the OpenWrt wiki changes, I've documented some things here: http://www.bitsum.com/blog/oc_bcm3302r08.htm

No. I did not dare to test it... Yet.
Now I'll add the fan first and then - try to overclock the box.

I have mine underclocked at 183 MHz. Surely it can go lower?

More information to add..

To reiterate, this information pertains only to the WRT54G v4, WRT54G v5, WRT54GL v1.x, and probably other Linksys models with a BCM5352E/BCM3302 0.8 processor. The CFE of these units is able to gracefully handle bad nvram clkfreq settings, making it safer to toy with than previous versions. Simply put, the CFE on these models will not allow bricking by setting the nvram clkfreq to an unsupported clock frequency. I can't speak for the effects of prolonged overclocking on the hardware though.

As I mentioned, these models are limited to a maximum of 250/125 by the frequency table (PLL_TYPE7) in the CFE.

I wondered if it might be possible to break out of this 'soft' limit by modifying the frequency table in the CFE. In short, I was successful and I've now got a modified CFE that allows CPU clock frequencies of 262.5 and 275 mhz. This CFE works for sure on the WRT54Gv4, but has not been tested on other models. I changed the starting MAC address, so be sure to set it to whatever you desire after installation (or prior to, by modifying the binary).

To download the updated CFE, and for more information, I compiled this page: http://www.bitsum.com/openwiking/owbase/ow.asp?WRT54G

(Last edited by db90h on 15 Jun 2006, 02:42)

How low can the clock frequencies go? I have a WRT54GL 1.0 and would like to underclock it further, but 183 MHz is the lowest allowable thus far.

thank you for info. i incorporated this change into dd-wrt including a better cpu detection to prevent overclocking on not yet supported models

jhu wrote:

How low can the clock frequencies go? I have a WRT54GL 1.0 and would like to underclock it further, but 183 MHz is the lowest allowable thus far.

With the default CFE, 183mhz is as low as it goes. I suppose you could modify the CFE add new lower frequencies, instead of higher frequencies. What the bottom limit is when adding custom frequencies, I have no idea.

I doubt I'll ever get around to creating a CFE that has new lower frequencies, since this isn't my direction of interest.. but it is possible to do.

I have a question for you though.. I'll try this out myself, but you'll save me a reboot if you can just tell me: I feared that I should always round up when defining the CPU frequency table due to the way the code iterates through the table. ... Question: Is your clkfreq variable set to 183 or 182?

Out of curioisity, what are you underclocking for?

(Last edited by db90h on 15 Jun 2006, 23:04)

BrainSlayer wrote:

thank you for info. i incorporated this change into dd-wrt including a better cpu detection to prevent overclocking on not yet supported models

Cool, that's great to hear!

I have really enjoyed DD-WRT, you've done an awesome job with it. There's a reason its the most popular third party firmware wink.

*ahem* this is the OpenWrt forum ...

The discussion might have continued from here.