Page MenuHomeFreeBSD

i2c/sensors: Add driver for W83793 hardware monitor
ClosedPublic

Authored by jhibbits on Sun, May 3, 6:55 PM.
Tags
None
Referenced Files
F157212975: D56776.id.diff
Tue, May 19, 9:33 AM
Unknown Object (File)
Sun, May 17, 10:09 AM
Unknown Object (File)
Wed, May 13, 5:26 PM
Unknown Object (File)
Tue, May 12, 2:50 PM
Unknown Object (File)
Tue, May 12, 5:49 AM
Unknown Object (File)
Tue, May 12, 5:49 AM
Unknown Object (File)
Mon, May 11, 12:53 PM
Unknown Object (File)
Mon, May 11, 12:52 PM
Subscribers

Details

Summary

The Winbond/Nuvoton W83793G system monitor chip includes many features
not currently supported by this driver. The following are currently
supported:

  • Up to 6 temperature sensors, 4 of which have 10-bit resolution (8.2),two with 8-bit resolution (no decimal component)
  • Up to 12 fans
    • Fans 0-4 (1-5 on the datasheet) are always enabled. The remaining 7 fans are individually enabled.
  • Multiple voltage sensors, reading up to 10 voltage sources. Sysctls are labeled to match the datasheet.
  • Chassis open detection.

The W83793AG is a feature-reduced version, which lacks 3 thermal diodes
and 2 voltage monitors. Since there is no way to tell the difference
between the W83793AG and W83793G programmatically, sensors reported on
the W83793AG will report strange values.

Temperature sensors and 7 of the fans can be individually enabled on the
chip, but currently not configured by this driver. The driver only
reports what was configured by the firmware. Additionally, this driver
numbers the sensors and fans according to the datasheet, so even if, for
instance, fan 8 is disabled, it would skip from fan 7 to fan 9, it does
not renumber. This makes it easier to follow for hardware debugging
purposes.

Missing features:

  • Smart Fan support
  • Fan PWM control
  • ASF (Alert Standard Format)

Only Bank 0 registers are used at this time.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

adrian added inline comments.
sys/dev/iicbus/sensor/w83793g.c
107

are they /always/ going to be these voltages? or is this specific to your board?

sys/dev/iicbus/sensor/w83793g.c
107

These names are taken from the datasheet.

My goal with this driver was to match the datasheet as closely as possible, even going so far as to permit broken numbering in the sysctls so you could have, say, fan 0-7, no 8, and 9-11.

sys/dev/iicbus/sensor/w83793g.c
107

The scale and add factors are taken from the datasheet as well, adjusted to be in millivolts instead of volts.

sys/dev/iicbus/sensor/w83793g.c
107

i found a datasheet online, yup it looks like it.

This revision is now accepted and ready to land.Sun, May 3, 10:33 PM