[lm-sensors] New Abit uGuru driver + libsensors patch, review please [2/2], libsensors patch
Hans de Goede
j.w.r.degoede at hhs.nl
Sat Oct 29 12:09:36 CEST 2005
Rudolf Marek wrote:
> Hello Hans,
>>>But certainly, having a kernel driver output 0-255 for a voltage input is
>>>a huge and unacceptable step backwards. Please fix that first and then
>>>we can talk about the rest.
> I agree completely.
> But I have a proposal to solution.
> All we just need to know is the how many volts are used for one bit.
> Some suggestions are here around page 64.
> And some information are here:
> + label in0 "CPUcore"
> + compute in0 @*0.0137 , @/0.0137
> + label in1 "DDRVdd"
> + compute in1 @*0.0137 , @/0.0137
> + label in7 "Vdd5V"
> + compute in7 @*0.0245 , @/0.0245
> VCore is often unscaled so this *0.0137 gives for 8bit => 3.4935Vref so 3.5V
> Rest is simple: just compute the correct divisors for each in0
> 0.0245/0.0137 is round 2 so 5V might be scaled by 2. I dont know how those values were obtained so I cant do more speculations.
> Best would be if could measure actual voltage on pin P3REF so pin50 of the chip. Also there is another Vref at pin 72 the datasheet
> is unclear what pin is used when. If you are measuring please measure actual chip VCC too. (This should be 5V)
> How to measure:
> Multimeter 0-5V DC
> one wire to selected pin, second wire try the black wire of 4 hole power connector. Try not to shortcut the pins around.
> You can take a needle and glue it with the tape to multimeter probe.
For the record, I'm a teacher in electrical engineering and computer
science at a Dutch university.
At first I had the same tought process as you and I too thought that the
uGuru is most likely hooked up to a 3.5v voltage reference. But there
are a number of reasons why I'm not so sure:
The W83L950D has only 8 analog inputs, but the uGuru has 16. So somehow
Abit is doing some trickery to get more analog inputs, they could be
using the 8 comparator inputs, with one of the DA outputs hooked up to
the comparator reference pin, and using SAR to build another 8 AD inputs
out of this.
BTW pin P3REF is the comparator reference not the AD/DA reference. the
VREF pin (72) is the AD/DA reference. Also P3REF is pin 58, not 50.
They could however also be using one or more external sensor IC's hooked
up to one of the 2 i2c/smbus controllers which are onboard the W83L950D.
In this case the reference voltage hooked up to the W83L950D is
irrelevant (or atleast irrelevant for some of the inputs).
Also if I we're to design the sensor part of a mainboard I would want to
have a cheap reference voltage with a low temperature drift, thus I
would use an of the shelf component. These however do not come in a 3.5
volt variant, atleast not from the worldst 2 biggest reference voltage
IC suppliers, see:
So a reference voltage of 3.5 volt is not likely, assuming that Abit
doesn't want to build a descrete reference voltage source themselves, or
use an expensive programmable one. Also note that a simple zenerdiode
setup will not suffice since its temperature drift is to high, (at least
higher then what I've seen with my mb sofar).
Also you assume that the other mutipliers used are based on round
dividers of the input voltage, but if that where the case then the
0-6.25 volt would be 0-7 volt which is a rather big error.
Last, the uGuru is a microcontroller and could do some scaling itself. I
know this is the case for temperature sensors, since the register value
equals the temperature in degrees celcius here, so most likely the uGuru
has already done conversion here.
So in short, we don't even now which inputs if any are used, and we
don't know what kindoff conversions if any are already done by the
uGuru. And since I'm not planning on reverse engineering the layout of a
6 layer print we will probably never know.
The current uGuru driver is based on software reverse-engineering, not
hardware reverse-engineering. One of the reasons for this is that the
hardware used is programmable, so we will probably never know what is
going on inside. Another reason is that its a lot easier and safer.
I can however modify the driver to always scale all analog inputs to
0-3.5 volts and modify sensors.conf accordingly if that makes you happier.
More information about the lm-sensors