[Soekris] OpenBSD hw.sensors sysctl

Mitja Muženič mitja at muzenic.net
Sun Nov 14 08:40:16 UTC 2004


 

> -----Original Message-----
> From: 
> soekris-tech-bounces+mitja=muzenic.net at lists.soekris.com 
> [mailto:soekris-tech-bounces+mitja=muzenic.net at lists.soekris.c
> om] On Behalf Of Christopher Snell
> Sent: Sunday, November 14, 2004 12:17 AM
> To: soekris-tech at lists.soekris.com
> Subject: [Soekris] OpenBSD hw.sensors sysctl
> 
> It's neat to be able to get at the environmental monitors via
> OpenBSD's sysctl but hw.sensors appears to be unable to read the
> voltage being delivered to the machine from an external power source. 
> Has anyone managed to get this working?

The monitoring chip on soekris gets the voltages which are externally
divided by a pair of resistors. In order to get the real values, apply this
patch (3.6, for previous releases slightly modify the line numbers or change
the driver by hand):

--- sys/dev/isa/nsclpcsio_isa.c.orig    Thu Jun 10 16:05:41 2004
+++ sys/dev/isa/nsclpcsio_isa.c Thu Jun 10 16:07:16 2004
@@ -442,6 +442,14 @@
                desc = NULL;
                scale = 1;
                switch (i) {
+               case 2:
+               desc = "VCC";
+               scale = 2;
+               break;
+               case 3:
+               desc = "VPWR";
+               scale = 20;
+               break;
                case 7:
                        desc = "VSB";
                        scale = 2;


As this is soekris specific, it cannot be imported into main obsd tree. The
real solution would be to modify sysctl and the nsclpcsio driver so you
could set scale and desc by a sysctl call.

Result (a 7V power supply attached to a 4801):
# sysctl hw.sensors.5
hw.sensors.5=nsclpcsio0, VCC, volts_dc, 5.13 V
# sysctl hw.sensors.6
hw.sensors.6=nsclpcsio0, VPWR, volts_dc, 7.09 V


> Also, I'm a little confused about the temperature readings.   My box
> is sitting in my (very cold!) apartment, with the case lid taken off
> and it's registering 43 deg C for TNSC.  Where is the TNSC probe?  And

My understanding is that TNSC probe is inside the CPU.

> what's up with the TSENS1 and TSENS2 probes?  They always seem to be
> at 127 deg C.  Where are these probes located and are they even
> functional?

127 deg C is the upper maximum of temperature measurement and those values
show that the actual probes for those two sensors are missing - there is
nothing attached to those two inputs. In theory you could add the NTP
resistor and solder it to the right input of the PC87366 chip (see National
S documentation). But I haven't checked the actual layout of the board, if
those pins are physicaly available/reachable or if there is a predefined
soldering pad on the pcb that leads to those inputs. 

Soeren, if you are reading, can you comment?

> 
> Thanks,
> 
> Chris

Regards, Mitja




More information about the Soekris-tech mailing list