Skip to contentSkip to conversation

Frequency (cpu speed) control on AU1100

DISCUSSION Bob Lees 3 participants 7 messages Mar 30, 2004 – Mar 31, 2004 MIPS

lore
Share & tools
lore

Bob Lees

author
#0 lore raw

Hi All

I am working on an AU1100 board (Aurora) from DSP Design and want to control the processor cpu speed, as in CPU_FREQ, type control. I suspect I am missing something somewhere, but I can't find any references to cpu speed control for the MIPS processors, specically the au1x range.

Any clues?

Thanks

Bob

Signature · 6 lines
Bob Lees
Diamond Consulting Services Ltd
Aylesbury, Bucks, HP17 8UG
Phone: +44 (0) 1296 747667
Fax: +44 (0) 1296 747557
email: [email protected]
#1 lore raw
Quoted 7 lines · Bob Lees

Hi All

I am working on an AU1100 board (Aurora) from DSP Design and want to control the processor cpu speed, as in CPU_FREQ, type control. I suspect I am missing something somewhere, but I can't find any references to cpu speed control for the MIPS processors, specically the au1x range.

Any clues?

I assume you mean dynamically? Or at boot time only?

There is an Au1x power management implementation that I haven't tested in a while. It allows you to scale the frequency using sysctl, if I remember correctly.

Pete

#2 lore raw
In reply to Bob Lees
Quoted 2 lines · Bob Lees

....I suspect I am
missing something somewhere, but I can't find any references to cpu speed control for the MIPS processors, specically the au1x range.

The Au1xxx has a PLL that multiplies the incoming 12 MHz clock up to the internal frequency. Just be aware there are lots of peripheral clocks and bus clocks derived from this internal frequency. There is code in the kernel power management to allow changing the frequency during operation of Linux, but I don't know how well it works today as I have not tested that for quite some time.

Thanks.

	-- Dan
author
#3 lore raw
Quoted 13 lines · Dan Malek
Quoted 4 lines · Bob Lees

....I suspect I am

missing something somewhere, but I can't find any references to cpu speed control for the MIPS processors, specically the au1x range.

The Au1xxx has a PLL that multiplies the incoming 12 MHz clock up to the internal frequency. Just be aware there are lots of peripheral clocks and bus clocks derived from this internal frequency. There is code in the kernel power management to allow changing the frequency during operation of Linux, but I don't know how well it works today as I have not tested that for quite some time.

Quoted 2 lines

Thanks.

	-- Dan

Thanks Dan & Pete for the prompt response.

I have tried the /proc/sys/pm/freq interface and by putting a bogomips calc into power.c, it appears to indicate a change in core frequency. I think your caution may be well founded as I got input overruns on the serial console when I took the speed down to 84MHz, good character recognition though, so it was an input buffer speed issue.

Also I can see an approx 40-50mA change in current from 84 to 396MHz which indicates something is changing. Supply is at 5 volts thru a simple switcher down to 3.3 volts on the Aurora board. This is with nothing else running and an nfs filesystem. As part of monitoring current I am seeing an anomoly:
namely after boot is complete and system is quiesent, at apparently 396MHz, the current is 200mA, now after playing with the freq control the current at 396MHz stabalises at around 250mA. Verrry strange - any thoughts??

On another topic, what state is the IRDA driver in? This is building from the patched 2.4.25 kernel on your site Dan. And a big thank you for this source of a patched kernel and build tools.

Bob

#4 lore raw
Quoted 23 lines · Bob Lees
Quoted 15 lines · Dan Malek
Quoted 7 lines · Bob Lees

....I suspect I am

missing something somewhere, but I can't find any references to cpu speed control for the MIPS processors, specically the au1x range.

The Au1xxx has a PLL that multiplies the incoming 12 MHz clock up to the internal frequency. Just be aware there are lots of peripheral clocks and bus clocks derived from this internal frequency. There is code in the kernel power management to allow changing the frequency during operation of Linux, but I don't know how well it works today as I have not tested that for quite some time.

Quoted 4 lines

Thanks.

	-- Dan
Quoted 7 lines

Thanks Dan & Pete for the prompt response.

I have tried the /proc/sys/pm/freq interface and by putting a bogomips calc into power.c, it appears to indicate a change in core frequency. I think your caution may be well founded as I got input overruns on the serial console when I took the speed down to 84MHz, good character recognition though, so it was an input buffer speed issue.

Also I can see an approx 40-50mA change in current from 84 to 396MHz which indicates something is changing. Supply is at 5 volts thru a simple switcher down to 3.3 volts on the Aurora board. This is with nothing else running and an nfs filesystem. As part of monitoring current I am seeing an anomoly: namely after boot is complete and system is quiesent, at apparently 396MHz, the current is 200mA, now after playing with the freq control the current at 396MHz stabalises at around 250mA. Verrry strange - any thoughts??

Is the 250mA after you've done a new power cycle, which doesn't make sense, or after you scale down to 84 and back up to 396MHz?

Quoted 2 lines

On another topic, what state is the IRDA driver in?

It works. Check out the IrDA readme on linux-mips.org:/pub/linux/mips/people/ppopov/2.4. I've tested two boards back to back using the network layer at FIR speeds, and a board to palm pilot using SIR. It's all in the readme.

Quoted 3 lines

This is building from the patched 2.4.25 kernel on your site Dan. And a big thank you for this source of a patched kernel and build tools.

Pete

#6 lore raw
In reply to Bob Lees
Quoted 1 line · Bob Lees

Also I can see an approx 40-50mA change in current from 84 to 396MHz which indicates something is changing.

Uh oh.....You are looking for power saving by dynamically slowing the processor? Just enable CONFIG_PM and let it enter its low power wait at idle. Certainly the easiest way to save power. Also, power management is a whole system design consideration. Unless you are using an x86 processor, the peripheral logic in a system is going to be much more of a power mangement problem than the processor. Low voltage power conversion and LCD backlights are the killers, not the processor. If you are using things like Ethernet PHYs in the product, take a close look at how they can be used in power saving modes. The AMD PHYs are particularly good at this, others may be as well, and do the same kind of analysis for all of the parts on the board.

If you are changing the processor speed, you are going to have to look carefully how it affects the system bus and the SDRAM timing. The list goes on.....effective power management is tedious and challenging...been there, done that quite a bit with this particular processor. It's very system dependent. The stuff in the Linux kernel is a good starting point, but everything from the applications to the additions you will have to make in the kernel are going to be required.

Have fun!

	-- Dan
author
#5 lore raw
In reply to Pete Popov
Quoted 35 lines · Pete Popov
Quoted 25 lines · Bob Lees
Quoted 13 lines · Dan Malek
Quoted 4 lines · Bob Lees

....I suspect I am

missing something somewhere, but I can't find any references to cpu speed control for the MIPS processors, specically the au1x range.

The Au1xxx has a PLL that multiplies the incoming 12 MHz clock up to the internal frequency. Just be aware there are lots of peripheral clocks and bus clocks derived from this internal frequency. There is code in the kernel power management to allow changing the frequency during operation of Linux, but I don't know how well it works today as I have not tested that for quite some time.

Quoted 2 lines

Thanks.

	-- Dan

Thanks Dan & Pete for the prompt response.

I have tried the /proc/sys/pm/freq interface and by putting a bogomips calc into power.c, it appears to indicate a change in core frequency. I think your caution may be well founded as I got input overruns on the serial console when I took the speed down to 84MHz, good character recognition though, so it was an input buffer speed issue.

Quoted 8 lines

Also I can see an approx 40-50mA change in current from 84 to 396MHz which indicates something is changing. Supply is at 5 volts thru a simple switcher down to 3.3 volts on the Aurora board. This is with nothing else running and an nfs filesystem. As part of monitoring current I am seeing an anomoly: namely after boot is complete and system is quiesent, at apparently 396MHz, the current is 200mA, now after playing with the freq control the current at 396MHz stabalises at around 250mA. Verrry strange - any thoughts??

Quoted 2 lines

Is the 250mA after you've done a new power cycle, which doesn't make sense, or after you scale down to 84 and back up to 396MHz?

After I scale down to 84 and back up to 396MHz. Having seen Dan's comments which I largely agree with I may not play with the speed after all!! Having said that I would like to find out why we are seeing this behaviour. It could well be that the frequency switching is disrupting one of the clocks and/or the PM which is running on power up.

We already recognise that the peripherals play as much if not a greater part in the overall power consumption.

Quoted 7 lines
Quoted 2 lines

On another topic, what state is the IRDA driver in?

It works. Check out the IrDA readme on linux-mips.org:/pub/linux/mips/people/ppopov/2.4. I've tested two boards back to back using the network layer at FIR speeds, and a board to palm pilot using SIR. It's all in the readme.

OK I have this and will have a play.

Quoted 6 lines
Quoted 4 lines

This is building from the
patched 2.4.25 kernel on your site Dan. And a big thank you for this source of a patched kernel and build tools.

Pete

Bob