# Temperature sensor on ALIX.3D3

LM86 on ALIX.3D3

The schematics of the ALIX.3D3 mention a temperature sensors LM86 on page 2 which external sensors pins are connected to the TDP/TDN pins of the Geode LX800 CPU. So this sensor should be able to measure CPU and mainboard temperature.

The LM86 ist connected by the SMBus (which is compatible to I²C if bus speed is below 100kHz, see Maxim's Appnote for detailed comparison) via the AMD CS5536 Geode companion.

To support the temperature sensor by the linux kernel, several options must be set:

Device Drivers  --->
<*> I2C support  --->
<*>   I2C device interface
I2C Hardware Bus support  --->
<*> Geode ACCESS.bus support
<*> Hardware Monitoring support  --->
<*>   National Semiconductor LM90 and compatibles

After compiling and booting the kernel, we need some userspace tools to read information by the temperatur sensor. Usually this is done by Lm_sensors. Gentoo provides ebuilds so you should be fine with

emerge -va lm_sensors

After emerging, you should run

sensors-detect

to search for sensors. The program will ask you some question on which devices it should scan for sensors and which modules should be loaded. If you compiled everything into kernel (not into modules) you should be fine with

We can start with probing for (PCI) I2C or SMBus adapters.
Do you want to probe now? (YES/no): YES
Use driver scx200_acb' for device 0000:00:0f.0: CS5536 [Geode companion] ISA

Load scx200_acb' (say NO if built into your kernel)? (YES/no): no
If you have undetectable or unsupported I2C/SMBus adapters, you can have

We are now going to do the I2C/SMBus adapter probings. Some chips may
be double detected; we choose the one with the highest confidence
value in that case.
If you found that the adapter hung after probing a certain address,
you can specify that address to remain unprobed.

Do you want to scan it? (YES/no/selectively): YES
Handled by driver lm90' (already loaded), chip type lm86'

Some chips are also accessible through the ISA I/O ports. We have to
write to arbitrary I/O ports to probe them. This is usually safe though.
Yes, you do have ISA I/O ports even if you do not have any ISA slots!
Do you want to scan the ISA I/O ports? (YES/no): no

Some Super I/O chips may also contain sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no): no

Some south bridges, CPUs or memory controllers may also contain
embedded sensors. Do you want to scan for them? (YES/no): no

After answering all questions, sensor-detect should be able to find your sensor

Driver lm90' (should be inserted):
Detects correctly:
* Bus CS5536 ACB0'
Chip lm86' (confidence: 6)

sensors-detect will ask to save config (say YES) and propose some to commands to be executed, but we don't care, because we compiled everything direct into kernel.

Now sould be able to run sensors and get temperatures:

lm86-i2c-0-4c
M/B Temp:    +47 C  (low  =    +0 C, high =   +70 C)
CPU Temp:  +56.8 C  (low  =  +0.0 C, high = +70.0 C)
M/B Crit:    +85 C  (hyst =   +75 C)
CPU Crit:    +85 C  (hyst =   +75 C)

If everthing's fine, you can add lm_sensors to default runlevel with

rc-update add lm_sensors default
This entry was posted in Alix and tagged , , , , by twam. Bookmark the permalink.

My name is Tobias Müller. I'm interested in com­puters, physics, elec­tronics and photo­graphy. more …

## 6 thoughts on “Temperature sensor on ALIX.3D3”

1. Are the sensors on 3d3 calibrated? I've got a 3c3, and when I contacted Pascal Dornier (pcEngines owner) about the sensors on it, he told me that they aren't calibrated, and shouldn't be relied upon (I still put some self-adhesive RAM heatsinks on the CPU, but only because I happened to have them around).

2. As far as I understdood the datasheet of the sensors it's precalibrated, but the external diode is configured for a Pentium III diode by default.

So I think the external (mainboard) temperature is calibrated by default and the internal temperature sensor not, but this can be done by setting a register in the LM86.

3. Hi I'm using an IMG kamikaze for my ALIX 3d3 board, easy for router/WiFi applications but now I want to read the temperature. If I don't built this kernel options, How can I install the I2C support for the Geode processor?.
Best regards
Arturo

• If you want to use I²C with the built-in tools you have to have kernel support. There's no way around it.

• Is the only way? create a kernel? can't do something like this
opkg update
opkg install kmod-i2c-gpio-custom kmod-i2c-core
insmod i2c-dev
insmod i2c-gpio-custom bus0=0,7,29
dmesg | grep gpio
regards and thanks for your response

• If your Linux distribution has kernel modules for it, you don't have to compile them on your on. But if they're not installed by default I doubt that there will be any.