Sync usage with man page.
[netbsd-mini2440.git] / sys / arch / sparc64 / dev / envctrlreg.h
blob866a39bf4f2a55498e42913f04dc031157ef192d
1 /* $NetBSD: envctrlreg.h,v 1.4 2007/10/17 19:57:28 garbled Exp $ */
3 /*-
4 * Copyright (c) 2007 The NetBSD Foundation, Inc.
5 * All rights reserved.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Tobias Nygren.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
32 #define ENVCTRL_SHELF0_ADDR 0x20 /* PCF8574, LEDs at disk shelves */
33 #define ENVCTRL_SHELF1_ADDR 0x21
34 #define ENVCTRL_SHELF2_ADDR 0x22
36 #define ENVCTRL_FANVOLTAGE_ADDR 0x27 /* TDA8444 */
37 #define ENVCTRL_FANVOLTAGE_MAX 0x3F
38 #define ENVCTRL_FANVOLTAGE_MIN 0x1F
39 #define ENVCTRL_FANPORT_CPU 0
40 #define ENVCTRL_FANPORT_PS 1
41 #define ENVCTRL_FANPORT_AFB 2
43 #define ENVCTRL_INTR_ADDR 0x38 /* PCF8574 */
44 #define ENVCTRL_INTR_PS0 (1<<0)
45 #define ENVCTRL_INTR_PS1 (1<<1)
46 #define ENVCTRL_INTR_PS2 (1<<2)
47 #define ENVCTRL_INTR_WDT_RST (1<<3) /* 0 = reset wdt after it has tripped */
48 #define ENVCTRL_INTR_FANFAIL (1<<4)
49 #define ENVCTRL_INTR_UNKNOWN1 (1<<5) /* front panel? */
50 #define ENVCTRL_INTR_UNKNOWN2 (1<<6) /* pwr fail or keyswitch intr? */
51 #define ENVCTRL_INTR_ENABLE (1<<7) /* 0 = enable interrupts to system */
53 #define ENVCTRL_PS2_ADDR 0x39 /* PCF8574, power supply 2 status */
54 #define ENVCTRL_PS1_ADDR 0x3A /* PCF8574, power supply 1 status */
55 #define ENVCTRL_PS0_ADDR 0x3B /* PCF8574, power supply 0 status */
56 #define ENVCTRL_PS_PRESENT (1<<0) /* 0 = present */
57 #define ENVCTRL_PS_550W (1<<1) /* 0 = 550W class PS */
58 #define ENVCTRL_PS_650W (1<<2) /* 0 = 650W class PS */
59 #define ENVCTRL_PS_OK (1<<3) /* 1 = DC levels okay */
60 #define ENVCTRL_PS_OVERLOAD (1<<4) /* 0 = overloaded */
61 #define ENVCTRL_PS_LOADSHARE_ERROR (1<<5) /* 0 = load sharing error */
63 #define ENVCTRL_FANFAIL_ADDR 0x3C /* PCF8574 */
64 #define ENVCTRL_FANFAIL_PS2 (1<<0)
65 #define ENVCTRL_FANFAIL_PS1 (1<<1)
66 #define ENVCTRL_FANFAIL_PS0 (1<<2)
67 #define ENVCTRL_FANFAIL_CPU0 (1<<3)
68 #define ENVCTRL_FANFAIL_CPU1 (1<<4)
69 #define ENVCTRL_FANFAIL_CPU2 (1<<5)
70 #define ENVCTRL_FANFAIL_AFB (1<<6)
72 #define ENVCTRL_LED_ADDR 0x3E /* PCF8574, LEDs and keyswitch */
73 #define ENVCTRL_LED_DISKERR (1<<0)
74 #define ENVCTRL_LED_PSERR (1<<1)
75 #define ENVCTRL_LED_OVERTEMP (1<<2)
76 #define ENVCTRL_LED_ERR (1<<3)
77 #define ENVCTRL_LED_ACT (1<<4)
78 #define ENVCTRL_LED_PWR (1<<5)
79 #define ENVCTRL_KEY_LOCK (1<<6)
80 #define ENVCTRL_KEY_DIAG (1<<7)
82 #define ENVCTRL_PS0TEMP_ADDR 0x48 /* PCF8591, power supply 0 temp */
83 #define ENVCTRL_PS1TEMP_ADDR 0x49 /* PCF8591, power supply 1 temp */
84 #define ENVCTRL_PS2TEMP_ADDR 0x4A /* PCF8591, power supply 2 temp */
85 #define ENVCTRL_AMB_ADDR 0x4D /* LM75, ambient temperature */
86 #define ENVCTRL_SOMETHING_ADDR 0x4E /* PCF8591, not sure what it does */
87 #define ENVCTRL_CPUTEMP_ADDR 0x4F /* PCF8591, cpu temperatures */
88 #define ENVCTRL_WATCHDOG_ADDR 0x50 /* PCF8583, fan regulator watchdog */
90 #define ENVCTRL_UVFACT 190476 /* 10^6 * 12 / 63 */