/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Bill Squier.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* Winbond registers
*
* Several models exists. The W83781D is mostly compatible with the
* LM78, but has two extra temperatures. Later models add extra
* voltage sensors, fans and bigger fan divisors to accommodate slow
* running fans. To accommodate the extra sensors some models have
* different memory banks.
*/
#define WB_T23ADDR 0x4a /* Temperature 2 and 3 Serial Bus Address */
#define WB_PIN 0x4b /* Pin Control */
#define WB_BANKSEL 0x4e /* Bank Select */
#define WB_VENDID 0x4f /* Vendor ID */
#define WB_NCT6102_VENDID 0xfe /* Vendor ID for NCT610[246] */
/* Bank 0 regs */
#define WB_BANK0_CHIPID 0x58 /* Chip ID */
#define WB_BANK0_RESVD1 0x59 /* Resvd, bits 6-4 select temp sensor mode */
#define WB_BANK0_FAN45 0x5c /* Fan 4/5 Divisor Control (W83791D only) */
#define WB_BANK0_VBAT 0x5d /* VBAT Monitor Control */
#define WB_BANK0_FAN4 0xba /* Fan 4 reading (W83791D only) */
#define WB_BANK0_FAN5 0xbb /* Fan 5 reading (W83791D only) */
#define WB_BANK0_CONFIG 0x18 /* VRM & OVT Config (W83627THF/W83637HF) */
#define WB_BANK0_NCT6102_CHIPID 0xff /* Chip ID for NCT610[246] */
/* Bank 1 registers */
#define WB_BANK1_T2H 0x50 /* Temperature 2 High Byte */
#define WB_BANK1_T2L 0x51 /* Temperature 2 Low Byte */
/* Bank 2 registers */
#define WB_BANK2_T3H 0x50 /* Temperature 3 High Byte */
#define WB_BANK2_T3L 0x51 /* Temperature 3 Low Byte */
/* Bank 4 registers (W83782D/W83627HF and later models only) */
#define WB_BANK4_T1OFF 0x54 /* Temperature 1 Offset */
#define WB_BANK4_T2OFF 0x55 /* Temperature 2 Offset */
#define WB_BANK4_T3OFF 0x56 /* Temperature 3 Offset */
/* Bank 5 registers (W83782D/W83627HF and later models only) */
#define WB_BANK5_5VSB 0x50 /* 5VSB reading */
#define WB_BANK5_VBAT 0x51 /* VBAT reading */
/* Bank selection */
#define WB_BANKSEL_B0 0x00 /* Bank 0 */
#define WB_BANKSEL_B1 0x01 /* Bank 1 */
#define WB_BANKSEL_B2 0x02 /* Bank 2 */
#define WB_BANKSEL_B3 0x03 /* Bank 3 */
#define WB_BANKSEL_B4 0x04 /* Bank 4 */
#define WB_BANKSEL_B5 0x05 /* Bank 5 */
#define WB_BANKSEL_HBAC 0x80 /* Register 0x4f High Byte Access */