VID specifications
Thanks for the great research and suggestions. We'll have to think of the best way to incorporate them.
If we brought vrm out to /proc we could have a simple program that does the following:
# fixvrm Which VID is correct: 1) 3.2V (VRM 8.2) (default) 2) 2.55V (VRM 8.5) 3) 1.675V (VRM 9.0) Enter number 1-3: 1 Your VID calculation has been changed to 1.675 V (VRM 9.0)
Quoted 41 lines · Trent Piepho
I've been getting
lm_sensorsworking with my tyan tiger mp (more on that later) and I noticed that the VID was reporting the wrong core voltage. I tracked down the problem and figured out what was going on.The w83781d driver, and lots of others (lm87 I know too, because I fixed a vid problem with that driver) use a single macro
VID_FROM_REGto convert the 4 or 5 vid lines into a core voltage, with 10 mV units. The macro follows a spec called the VRM 8.2 DC-DC Converter Specification, you can get a pdf at intel's site. The AthlonXP processor, and I assume all socket A chips, uses a newer specification called VRM 9.0. There is also a VRM 8.1, 8.3, and 8.4, but they are all mostly compatible with 8.2. VRM 9.0 is *not* backward compatible with VRM 8.2. There is also a VRM 8.5, which is used with Pentium III Tualatin processors, that isn't compatible with VRM 8.2.In order to get proper VID support, the user needs to be able to specify the processor's VRM version. Since the code to do this conversion is the same for any sensor chip, it makes sense not to put a separate copy in each driver. It would be nice if it could be specified in the sensors.conf file, e.g. "set vrm 9.0". Most drivers look at the vid setting to set the initial voltage limits for the cpu voltage line. In order to do this correctly, the driver would need to know the setting when it initializes the chip.
There is also a problem with the units. The newer VRM specifications use increments of 25 mV instead of 50 or 100 mV, so the 10mV resolution used in the driver isn't enough. ie. magnitude for vid needs to be 3 instead of 2.
Here is code to handle the different VRM versions. I'm not sure if the VRM 8.5 code will work, as it's not totally clear how the VID lines will be hooked up.
/* VRM 8.2 - 8.4: Used for Pentium II-III chips */
#define VID_FROM_REG(val) ((val)=0x1f?0:(val)>=0x10?510-(val)*10:\ 205-(val)*5)/* VRM 8.5: Used for Pentium III-S Tualatin chips */
#define VID_FROM_REG(val) ((val)=0x1f?0: ((((val)&16)?2.5:0) + \ ((val)>4?205:125) - ((val)&15)*5))/* VRM 9.0: Used for Pentium IV and AMD Socket A */ #define
VID_FROM_REG(val)((val)=0x1f?0:(185-(val)*2.5))
Trent,
I put programmable VRM support in w83781d in CVS. I changed VID from 2 decimal points to 3. Please look in doc/vid and kernel/include/sensors_vid.h and give it a try.
'set vrm 9.0' should work too.
mds
Quoted 7 lines · Mark D. Studebaker
Thanks for the great research and suggestions. We'll have to think of the best way to incorporate them.
Quoted 2 lines · Trent Piepho
I've been getting
lm_sensors
Quoted 7 lines · Mark D. Studebaker
Trent,
I put programmable VRM support in w83781d in CVS. I changed VID from 2 decimal points to 3. Please look in doc/vid andkernel/include/sensors_vid.hand give it a try.
'set vrm 9.0' should work too.
mds
It looks like everything didn't get commited. The sensors_vid.h file is there, but the w83781d.c file is still at rev 1.90 and doesn't use the new function.
I have a patch for w83781d that will allow for proper initialization and detection on the tyan dual athlon motherboards without entering the BIOS first.
It still requires init=0 to be specified, or the machine locks when the driver is loaded. I looked at every reference to "init" in the w83781d.c and the code it triggers, and I can't see any reason for the lockup. Do you know if there is any code init triggers that I wouldn't find this way? There shouldn't be any reason the temperature/voltage limits can't be initialized with this board.