1/****************************************************************************** 2 * 3 * Name: lm80.h 4 * Project: GEnesis, PCI Gigabit Ethernet Adapter 5 * Version: $Revision: 1.1.1.1 $ 6 * Date: $Date: 2008/10/15 03:26:44 $ 7 * Purpose: Contains all defines for the LM80 Chip 8 * (National Semiconductor). 9 * 10 ******************************************************************************/ 11 12/****************************************************************************** 13 * 14 * (C)Copyright 1998,1999 SysKonnect, 15 * a business unit of Schneider & Koch & Co. Datensysteme GmbH. 16 * 17 * This program is free software; you can redistribute it and/or modify 18 * it under the terms of the GNU General Public License as published by 19 * the Free Software Foundation; either version 2 of the License, or 20 * (at your option) any later version. 21 * 22 * The information in this file is provided "AS IS" without warranty. 23 * 24 ******************************************************************************/ 25 26/****************************************************************************** 27 * 28 * History: 29 * $Log: lm80.h,v $ 30 * Revision 1.1.1.1 2008/10/15 03:26:44 james26_jang 31 * Initial. 32 * 33 * Revision 1.1.1.1 2008/07/21 09:15:07 james26_jang 34 * New UI, New QoS, New wireless driver(4.151.10.29), ipmonitor. 35 * 36 * Revision 1.1 2008/07/17 12:43:35 james26_jang 37 * *** empty log message *** 38 * 39 * Revision 1.1.1.1 2007/02/15 12:11:35 jiahao 40 * initial update 41 * 42 * Revision 1.1.1.1 2007/01/25 12:51:56 jiahao_jhou 43 * 44 * 45 * Revision 1.1.1.1 2003/02/03 22:37:48 mhuang 46 * LINUX_2_4 branch snapshot from linux-mips.org CVS 47 * 48 * Revision 1.3 1999/11/22 13:41:19 cgoos 49 * Changed license header to GPL. 50 * 51 * Revision 1.2 1999/03/12 13:26:51 malthoff 52 * remove __STDC__. 53 * 54 * Revision 1.1 1998/06/19 09:28:31 malthoff 55 * created. 56 * 57 * 58 ******************************************************************************/ 59 60#ifndef __INC_LM80_H 61#define __INC_LM80_H 62 63#ifdef __cplusplus 64extern "C" { 65#endif /* __cplusplus */ 66 67/* defines ********************************************************************/ 68 69/* 70 * LM80 register definition 71 * 72 * All registers are 8 bit wide 73 */ 74#define LM80_CFG 0x00 /* Configuration Register */ 75#define LM80_ISRC_1 0x01 /* Interrupt Status Register 1 */ 76#define LM80_ISRC_2 0x02 /* Interrupt Status Register 2 */ 77#define LM80_IMSK_1 0x03 /* Interrupt Mask Register 1 */ 78#define LM80_IMSK_2 0x04 /* Interrupt Mask Register 2 */ 79#define LM80_FAN_CTRL 0x05 /* Fan Devisor/RST#/OS# Register */ 80#define LM80_TEMP_CTRL 0x06 /* OS# Config, Temp Res. Reg */ 81 /* 0x07 - 0x1f reserved */ 82 /* current values */ 83#define LM80_VT0_IN 0x20 /* current Voltage 0 value */ 84#define LM80_VT1_IN 0x21 /* current Voltage 1 value */ 85#define LM80_VT2_IN 0x22 /* current Voltage 2 value */ 86#define LM80_VT3_IN 0x23 /* current Voltage 3 value */ 87#define LM80_VT4_IN 0x24 /* current Voltage 4 value */ 88#define LM80_VT5_IN 0x25 /* current Voltage 5 value */ 89#define LM80_VT6_IN 0x26 /* current Voltage 6 value */ 90#define LM80_TEMP_IN 0x27 /* current temperature value */ 91#define LM80_FAN1_IN 0x28 /* current Fan 1 count */ 92#define LM80_FAN2_IN 0x29 /* current Fan 2 count */ 93 /* limit values */ 94#define LM80_VT0_HIGH_LIM 0x2a /* high limit val for Voltage 0 */ 95#define LM80_VT0_LOW_LIM 0x2b /* low limit val for Voltage 0 */ 96#define LM80_VT1_HIGH_LIM 0x2c /* high limit val for Voltage 1 */ 97#define LM80_VT1_LOW_LIM 0x2d /* low limit val for Voltage 1 */ 98#define LM80_VT2_HIGH_LIM 0x2e /* high limit val for Voltage 2 */ 99#define LM80_VT2_LOW_LIM 0x2f /* low limit val for Voltage 2 */ 100#define LM80_VT3_HIGH_LIM 0x30 /* high limit val for Voltage 3 */ 101#define LM80_VT3_LOW_LIM 0x31 /* low limit val for Voltage 3 */ 102#define LM80_VT4_HIGH_LIM 0x32 /* high limit val for Voltage 4 */ 103#define LM80_VT4_LOW_LIM 0x33 /* low limit val for Voltage 4 */ 104#define LM80_VT5_HIGH_LIM 0x34 /* high limit val for Voltage 5 */ 105#define LM80_VT5_LOW_LIM 0x35 /* low limit val for Voltage 5 */ 106#define LM80_VT6_HIGH_LIM 0x36 /* high limit val for Voltage 6 */ 107#define LM80_VT6_LOW_LIM 0x37 /* low limit val for Voltage 6 */ 108#define LM80_THOT_LIM_UP 0x38 /* hot temperature limit (high) */ 109#define LM80_THOT_LIM_LO 0x39 /* hot temperature limit (low) */ 110#define LM80_TOS_LIM_UP 0x3a /* OS temperature limit (high) */ 111#define LM80_TOS_LIM_LO 0x3b /* OS temperature limit (low) */ 112#define LM80_FAN1_COUNT_LIM 0x3c /* Fan 1 count limit (high) */ 113#define LM80_FAN2_COUNT_LIM 0x3d /* Fan 2 count limit (low) */ 114 /* 0x3e - 0x3f reserved */ 115 116/* 117 * LM80 bit definitions 118 */ 119 120/* LM80_CFG Configuration Register */ 121#define LM80_CFG_START (1<<0) /* start monitoring operation */ 122#define LM80_CFG_INT_ENA (1<<1) /* enables the INT# Interrupt output */ 123#define LM80_CFG_INT_POL (1<<2) /* INT# pol: 0 act low, 1 act high */ 124#define LM80_CFG_INT_CLR (1<<3) /* disables INT#/RST_OUT#/OS# outputs */ 125#define LM80_CFG_RESET (1<<4) /* signals a reset */ 126#define LM80_CFG_CHASS_CLR (1<<5) /* clears Chassis Intrusion (CI) pin */ 127#define LM80_CFG_GPO (1<<6) /* drives the GPO# pin */ 128#define LM80_CFG_INIT (1<<7) /* restore power on defaults */ 129 130/* LM80_ISRC_1 Interrupt Status Register 1 */ 131/* LM80_IMSK_1 Interrupt Mask Register 1 */ 132#define LM80_IS_VT0 (1<<0) /* limit exceeded for Voltage 0 */ 133#define LM80_IS_VT1 (1<<1) /* limit exceeded for Voltage 1 */ 134#define LM80_IS_VT2 (1<<2) /* limit exceeded for Voltage 2 */ 135#define LM80_IS_VT3 (1<<3) /* limit exceeded for Voltage 3 */ 136#define LM80_IS_VT4 (1<<4) /* limit exceeded for Voltage 4 */ 137#define LM80_IS_VT5 (1<<5) /* limit exceeded for Voltage 5 */ 138#define LM80_IS_VT6 (1<<6) /* limit exceeded for Voltage 6 */ 139#define LM80_IS_INT_IN (1<<7) /* state of INT_IN# */ 140 141/* LM80_ISRC_2 Interrupt Status Register 2 */ 142/* LM80_IMSK_2 Interrupt Mask Register 2 */ 143#define LM80_IS_TEMP (1<<0) /* HOT temperature limit exceeded */ 144#define LM80_IS_BTI (1<<1) /* state of BTI# pin */ 145#define LM80_IS_FAN1 (1<<2) /* count limit exceeded for Fan 1 */ 146#define LM80_IS_FAN2 (1<<3) /* count limit exceeded for Fan 2 */ 147#define LM80_IS_CI (1<<4) /* Chassis Intrusion occured */ 148#define LM80_IS_OS (1<<5) /* OS temperature limit exceeded */ 149 /* bit 6 and 7 are reserved in LM80_ISRC_2 */ 150#define LM80_IS_HT_IRQ_MD (1<<6) /* Hot temperature interrupt mode */ 151#define LM80_IS_OT_IRQ_MD (1<<7) /* OS temperature interrupt mode */ 152 153/* LM80_FAN_CTRL Fan Devisor/RST#/OS# Register */ 154#define LM80_FAN1_MD_SEL (1<<0) /* Fan 1 mode select */ 155#define LM80_FAN2_MD_SEL (1<<1) /* Fan 2 mode select */ 156#define LM80_FAN1_PRM_CTL (3<<2) /* Fan 1 speed control */ 157#define LM80_FAN2_PRM_CTL (3<<4) /* Fan 2 speed control */ 158#define LM80_FAN_OS_ENA (1<<6) /* enable OS mode on RST_OUT#/OS# pins*/ 159#define LM80_FAN_RST_ENA (1<<7) /* sets RST_OUT#/OS# pins in RST mode */ 160 161/* LM80_TEMP_CTRL OS# Config, Temp Res. Reg */ 162#define LM80_TEMP_OS_STAT (1<<0) /* mirrors the state of RST_OUT#/OS# */ 163#define LM80_TEMP_OS_POL (1<<1) /* select OS# polarity */ 164#define LM80_TEMP_OS_MODE (1<<2) /* selects Interrupt mode */ 165#define LM80_TEMP_RES (1<<3) /* selects 9 or 11 bit temp resulution*/ 166#define LM80_TEMP_LSB (0xf<<4)/* 4 LSBs of 11 bit temp data */ 167#define LM80_TEMP_LSB_9 (1<<7) /* LSB of 9 bit temperature data */ 168 169 /* 0x07 - 0x1f reserved */ 170/* LM80_VT0_IN current Voltage 0 value */ 171/* LM80_VT1_IN current Voltage 1 value */ 172/* LM80_VT2_IN current Voltage 2 value */ 173/* LM80_VT3_IN current Voltage 3 value */ 174/* LM80_VT4_IN current Voltage 4 value */ 175/* LM80_VT5_IN current Voltage 5 value */ 176/* LM80_VT6_IN current Voltage 6 value */ 177/* LM80_TEMP_IN current temperature value */ 178/* LM80_FAN1_IN current Fan 1 count */ 179/* LM80_FAN2_IN current Fan 2 count */ 180/* LM80_VT0_HIGH_LIM high limit val for Voltage 0 */ 181/* LM80_VT0_LOW_LIM low limit val for Voltage 0 */ 182/* LM80_VT1_HIGH_LIM high limit val for Voltage 1 */ 183/* LM80_VT1_LOW_LIM low limit val for Voltage 1 */ 184/* LM80_VT2_HIGH_LIM high limit val for Voltage 2 */ 185/* LM80_VT2_LOW_LIM low limit val for Voltage 2 */ 186/* LM80_VT3_HIGH_LIM high limit val for Voltage 3 */ 187/* LM80_VT3_LOW_LIM low limit val for Voltage 3 */ 188/* LM80_VT4_HIGH_LIM high limit val for Voltage 4 */ 189/* LM80_VT4_LOW_LIM low limit val for Voltage 4 */ 190/* LM80_VT5_HIGH_LIM high limit val for Voltage 5 */ 191/* LM80_VT5_LOW_LIM low limit val for Voltage 5 */ 192/* LM80_VT6_HIGH_LIM high limit val for Voltage 6 */ 193/* LM80_VT6_LOW_LIM low limit val for Voltage 6 */ 194/* LM80_THOT_LIM_UP hot temperature limit (high) */ 195/* LM80_THOT_LIM_LO hot temperature limit (low) */ 196/* LM80_TOS_LIM_UP OS temperature limit (high) */ 197/* LM80_TOS_LIM_LO OS temperature limit (low) */ 198/* LM80_FAN1_COUNT_LIM Fan 1 count limit (high) */ 199/* LM80_FAN2_COUNT_LIM Fan 2 count limit (low) */ 200 /* 0x3e - 0x3f reserved */ 201 202#define LM80_ADDR 0x28 /* LM80 default addr */ 203 204/* typedefs *******************************************************************/ 205 206 207/* function prototypes ********************************************************/ 208 209#ifdef __cplusplus 210} 211#endif /* __cplusplus */ 212 213#endif /* __INC_LM80_H */ 214