EMCFAN(4) | Device Drivers Manual | EMCFAN(4) |
emcfan
— Driver
for the Microchip Technology EMC210x and EMC230x fan controllers via I2C
bus
emcfan* at iic? addr 0x2c
emcfan* at iic? addr 0x2d
emcfan* at iic? addr 0x2e
emcfan* at iic? addr 0x2f
emcfan* at iic? addr 0x4c
emcfan* at iic? addr 0x4d
The emcfan
driver supports the EMC210x
family with the following models: EMC2101, EMC2101-R, EMC2103-1, EMC2103-2,
EMC2103-4, EMC2104, and EMC2106 and for the EMC230x family with the
following models: EMC2301, EMC2302, EMC2303, and EMC2305. All chips have one
or more tachometers, and some of the chips have a number of temperature
sensors and GPIO. The emcfan
driver provides
envsys(4) framework
measurements for the RPM as determined by the tachometers. If the chip has
temperature sensors, the
envsys(4) framework will
provide an entry for every possible temperature sensor that a particular
chip can support. GPIO support is provided by
gpio(4) framework and the pins
can be accessed with the
gpioctl(8) command.
The EMC fan controllers are arranged as a set of registers. These registers are accessed by a /dev device per attached chip. The program emcfanctl(8) makes use of this device and allows all valid registers for particular chip to be read or written and provides some higher level commands that allow the drive level and frequency divider for a particular fan to be adjusted.
The EMC2103-2, EMC2103-4, EMC2104 and EMC2106 chips have gpio
pins. For the EMC2103-2 and EMC2103-4, these pins are only gpio and are not
shared with any other function. For the EMC2104 and EMC2106, the following
is how the pins maps to the
alt
N flags in the
gpio(4) framework.
Pin | ALT0 | ALT1 |
GPIO1 | CLK_IN | - |
GPIO2 | TACH2 | - |
GPIO3 | PWM2 | - |
GPIO4 | OVERT2# | PWM3 |
GPIO5 | OVERT3# | PWM4 |
GPIO6 | - | - |
The following sysctl(8) variables are provided:
hw.emcfan0.debug
EMCFAN_DEBUG
, this
node will appear and can be used to set the debugging level.hw.emcfan0.poles<n>
hw.emcfan0.ftach
hw.emcfan0.vin4_temp_zone
The emcfan
driver first appeared in
NetBSD 11.0.
The emcfan
driver was written by
Brad Spencer
<brad@anduin.eldar.org>.
The driver does not support the EMC2105 chip.
While not exactly a bug, the driver does nothing with the alert interrupts that can be generated from many of the chips. It would be more typical for this to be tied to a GPIO pin which can interrupt using CPU interrupts.
Feburary 19, 2025 | NetBSD 10.99 |