w83627hf(1)                                           w83627hf(1)



NAME
       w83627hf - initialize Tyan S2462 W83627HF Hardware Monitor

SYNOPSIS
       w83627hf [options]

DESCRIPTION
       The w83627hf program enables the Hardware Monitor  sensors
       of the Winbond W82627HF Super I/O chip on Tyan S2462 moth-
       erboards.  The primary purpose is  to  make  the  Hardware
       Monitor  available for use by software from the lm_sensors
       package to monitor motherboard voltages, temperatures  and
       fans  speeds.   Command  line options also allow selective
       enable/disable of either LPC or I2C bus  access,  initial-
       ization  the  Hardware  Monitor's  registers,  display  of
       address information, and a complete dump of registers.

       The Tyan S2462  motherboard  (and  apparently  other  Tyan
       motherboards,  such  as  the S2460 and possibly the S2466)
       makes use of two hardware sensor chips.  A Winbond W83782D
       chip  is available via the AMD-766/756 SMBus controller at
       I2C port 0x2d.  The W83782D chip  is  initialized  by  the
       BIOS at boot time, and is detected by the lm_sensors soft-
       ware.  The Winbond W83627HF Super I/O chip's Hardware Mon-
       itor  is  initialized  by  the BIOS only if the BIOS setup
       program's Hardware Monitor  menu  item  is  entered  while
       booting.   If  the BIOS setup program is not accessed, the
       W83627HF Hardware Monitor is not available to the  lm_sen-
       sors  software.   This  program accomplishes the same ini-
       tialization effected by the BIOS setup program.

       Note that the BIOS  setup  program  enables  the  W83627HF
       Hardware  Monitor  for access via both the I2C bus through
       the AMD-766/756 controller, or through the Low  Pin  Count
       (LPC)  bus  (which emulates an ISA bus).  This program can
       do either, and defaults  to  both.   If  the  I2C  bus  is
       enabled,  kernel  module  w83781d  is  used  to access the
       W83627HF (and  the  W83782D  too).   If  the  LPC  bus  is
       enabled,  kernel  module  w83627hf  is  used to access the
       W83627HF as if it were on an ISA bus.

       It is possible that this program may work with other moth-
       erboards  that  use  the  W83627HF  Super  I/O  chip.  All
       addresses can be changed  with  command  line  options  to
       facilitate experimentations.  Use at your own risk!

       The  default, with no command line options, is to initial-
       ize the W83627HF's Hardware Monitor to  be  seen  at  port
       0x2C  on the I2C bus and port 0x0C00 on the LPC (ISA) bus.
       Using the "-i" option initializes  all  W83627HF  Hardware
       Monitor registers to a useful set of defaults.

       Typically /fBw83627hf/fP is executed by rc script executed
       during the boot process when going to multiuser level.  It
       should  not  be automatically executed while the system is
       initializing the single user run level because, since this
       program  accesses  hardware directly, it is quite possible
       for it to cause the system to  freeze.   If  that  happens
       during  the  single  user  initialization  stage  the only
       recovery would be a rescue floppy or  CDROM.   Most  Linux
       systems  execute  an rc.local script during multiuser ini-
       tialization.

       An example of the commands used with the 2.6.x Linux  ker-
       nels might be:



       ### i2c bus and sensor devices

       #   Allow script to be executed manually by
       #   deleting any possible i2c modules (the
       #   order is significant)
       #
       /sbin/rmmod w83781d       >& /dev/null
       /sbin/rmmod w83627hf      >& /dev/null
       /sbin/rmmod i2c-isa       >& /dev/null
       /sbin/rmmod i2c-dev       >& /dev/null
       /sbin/rmmod eeprom        >& /dev/null
       /sbin/rmmod i2c-sensor    >& /dev/null
       /sbin/rmmod i2c-amd756    >& /dev/null
       /sbin/rmmod i2c-core      >& /dev/null

       # now install i2c modules
       /sbin/modprobe i2c-core
       /sbin/modprobe i2c-amd756
       /sbin/modprobe i2c-dev
       /sbin/modprobe i2c-isa
       /sbin/modprobe i2c-sensors
       /sbin/modprobe eeprom

       #  The w83781d module can access both the W83782D sensors and
       #  the W83627HF Hardware Monitor sensors via the i2c-adm756.
       #
       #  The W83627HF Hardware Monitor sensors can also be accessed
       #  via i2c-isa module rather than via the i2c-adm756 module.
       #  Hence, two ways to do this, and in either case the w83627hf
       #  chip initialization must be done to enabled access.
       #
       #  Method One (not used here):
       #
       #       Load i2c-isa, w83781d, and w837627hf modules.  The
       #       W83627HF Hardware Monitor sensors will be accessed
       #       via the i2c-isa module and the W83782D sensors will
       #       be accessed via the w83781d module.  No special
       #       arguments are required for the modules, but the
       #       W83762HF chip initialization must necessarily leave
       #       the ISA bus access enabled (which it must enable to
       #       configure the Hardware Monitor for i2c access).
       #
       #  Method Two (used here):
       #
       #       Load only the w83781d module (i2c-isa and w83627hf
       #       modules are unnecessary).  Then both the W83627HF
       #       Hardware Monitor sensors and the W83782D sensors
       #       will be accessed via the w83781d module.  The
       #       W83627HF ISA bus access does not need to be left
       #       enabled, but the w83781d module requires arguments
       #       to find both sets of sensors, and the "init=0"
       #       option is required to prevent the system from
       #       freezing when the module initializes the hardware.
       #

         /sbin/modprobe w83781d force_w83782d=0,0x2d \
                                force_subclients=0,0x2d,0x48,0x49 \
                                init=0

       #  Configuring sensors via the i2c bus:
       #
       #  A misconfigured /etc/sensors.conf file can cause the
       #  system to freeze.  Hence it might lockup during the boot
       #  process if this line is not commented out when testing
       #  new configurations...
       #
       #  The message is to provide a reminder, and an indication
       #  of where the system failed.  Reboot to single user...
       #
       #
       #  Set sensor limits
       #
       echo "Configuring W83782D and W83627HF system monitoring chips..."

       /usr/local/sbin/w83627hf -i
       /usr/local/bin/sensors -s



OPTIONS
       -a     Dump  all  W83627HF registers after the ini-
              tialization process is complete.


       -b     Dump all W83627HF registers before the  ini-
              tialization process is started.


       -D, --disablei2c
              Disable access to the W83627HF Hardware Mon-
              itor via the I2C bus by setting the  address
              to 0x00.


       -d     After enabling and initializing the W83627HF
              Hardware  Monitor,  disable  access  to  the
              Hardware  Monitor via the LPC bus by setting
              the LPC port address to 0x0000.


       -E addr, --eferaddr=addr
              The  Extended  Functions   Enable   Register
              (EFER)  port  on  the LPC bus for a W83627HF
              Super IO chip is hard wired for either  0x2e
              or  0x4e.   The  Tyan S2462 motherboard uses
              0x2e, which is the default used by this pro-
              gram.


       -I addr, --i2caddr=addr
              The  W83627HF  Hardware  Monitor I2C port is
              initialized to 0x2c when the BIOS setup pro-
              gram  is  used  at  boot  time to access the
              Hardware Monitor display.  (The W83782D sen-
              sor  chip is initialized to port 0x2d.)  The
              default for this program is  0x2c.   Regard-
              less  of which port is used, when the kernel
              module w83781d is loaded  it  requires  that
              the address be supplied.  See the discussion
              in the DISCRIPTION section.


       -L addr, --lpcaddr=addr
              The W83627HF Hardware Monitor  LPC  port  is
              initialized  to  0x0c00  when the BIOS setup
              program is used at boot time to  access  the
              Hardware  Monitor  display.  The default for
              this  program   is   also   0x0c00.    Other
              addresses  will work as far as allowing this
              program to initialize the W83627HF  Hardware
              Monitor,  which  is  done  via the LPC port;
              however, it is  unknown  if  other  programs
              will find the W83627HF at other addresses.


       -i     Initialize  the W83627HF Hardware Monitor to
              a set of relatively sane values for use with
              the Tyan S2462 motherboard.


       -v [n] Increase  verbosity.   Values for "n" can be
              from 1 to 9.



REFERENCES
       sensors(1), sensors.conf(5)

BUGS
AUTHOR
       Floyd L. Davidson
       floyd@barrow.com



                                                      w83627hf(1)