blob: 8acdbf9f3196a4fedcb2f8ea71dd872183c7587c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
<table class="head">
<tr>
<td class="head-ltitle">NHPOW(4)</td>
<td class="head-vol">Device Drivers Manual (sandpoint)</td>
<td class="head-rtitle">NHPOW(4)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">nhpow</code> — <span class="Nd">driver for
the NH-230/231 board control GPIO pins</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="Cd">nhpow0 at mainbus0</code>
<br/>
<code class="Cd">gpio* at nhpow0</code></p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">This driver initializes the LEDs and the fan speed during boot and
establishes a reboot and power-off hook in the kernel.</p>
<p class="Pp"><code class="Nm">nhpow</code> also detects a soft power-off
condition, which is triggered by holding the front panel power button
pressed for several seconds. This driver can optionally invoke
<a class="Xr">powerd(8)</a> to get a finer control over the system shutdown
procedure. It is capable of reporting a power-button-pressed event. Refer to
the <a class="Xr">powerd(8)</a> manual section for more details.</p>
<p class="Pp">The <code class="Nm">nhpow</code> driver provides access to its 8
bidirectional GPIO pins through the <a class="Xr">gpio(4)</a> controller
interface. The pins have the following meaning when being written:</p>
<table class="Bl-column Bd-indent">
<tr id="Pin">
<td><a class="permalink" href="#Pin"><b class="Sy">Pin</b></a></td>
<td><a class="permalink" href="#Active"><b class="Sy" id="Active">Active
level</b></a></td>
<td><a class="permalink" href="#Function"><b class="Sy" id="Function">Function</b></a></td>
</tr>
<tr id="0">
<td><a class="permalink" href="#0"><code class="Li">0</code></a></td>
<td>high</td>
<td>System power off</td>
</tr>
<tr id="1">
<td><a class="permalink" href="#1"><code class="Li">1</code></a></td>
<td>high</td>
<td>Assert system reset to all devices</td>
</tr>
<tr id="2">
<td><a class="permalink" href="#2"><code class="Li">2</code></a></td>
<td>low</td>
<td>Status LED</td>
</tr>
<tr id="3">
<td><a class="permalink" href="#3"><code class="Li">3</code></a></td>
<td>high</td>
<td>High speed fan</td>
</tr>
<tr id="4">
<td><a class="permalink" href="#4"><code class="Li">4</code></a></td>
<td>low</td>
<td>Debug LED 1</td>
</tr>
<tr id="5">
<td><a class="permalink" href="#5"><code class="Li">5</code></a></td>
<td>low</td>
<td>Debug LED 2</td>
</tr>
<tr id="6">
<td><a class="permalink" href="#6"><code class="Li">6</code></a></td>
<td>low</td>
<td>USB port 1 LED</td>
</tr>
<tr id="7">
<td><a class="permalink" href="#7"><code class="Li">7</code></a></td>
<td>low</td>
<td>USB port 2 LED</td>
</tr>
</table>
<p class="Pp">When reading, the pins have the following meaning:</p>
<table class="Bl-column Bd-indent">
<tr id="Pin~2">
<td><a class="permalink" href="#Pin~2"><b class="Sy">Pin</b></a></td>
<td><a class="permalink" href="#Active~2"><b class="Sy" id="Active~2">Active
level</b></a></td>
<td><a class="permalink" href="#Function~2"><b class="Sy" id="Function~2">Function</b></a></td>
</tr>
<tr id="0~2">
<td><a class="permalink" href="#0~2"><code class="Li">0</code></a></td>
<td>low</td>
<td>Power button pressed</td>
</tr>
<tr id="1~2">
<td><a class="permalink" href="#1~2"><code class="Li">1</code></a></td>
<td>low</td>
<td>Reset/install button pressed</td>
</tr>
<tr id="4~2">
<td><a class="permalink" href="#4~2"><code class="Li">4</code></a></td>
<td>high</td>
<td>H/W version bit 0</td>
</tr>
<tr id="5~2">
<td><a class="permalink" href="#5~2"><code class="Li">5</code></a></td>
<td>high</td>
<td>H/W version bit 1</td>
</tr>
<tr id="6~2">
<td><a class="permalink" href="#6~2"><code class="Li">6</code></a></td>
<td>high</td>
<td>H/W version bit 2</td>
</tr>
<tr id="7~2">
<td><a class="permalink" href="#7~2"><code class="Li">7</code></a></td>
<td>high</td>
<td>H/W version bit 3</td>
</tr>
</table>
<p class="Pp"><code class="Nm">nhpow</code> attaches automatically for all
NH-230/231 compatible products:</p>
<ul class="Bl-bullet Bl-compact">
<li>Allnet 6250</li>
<li>Allnet 6260</li>
<li>Encore ENNHD-1000</li>
<li>Fujitsu-Siemens AMS150</li>
<li>Fujitsu-Siemens SBLAN2</li>
<li>Longshine LCS-8311</li>
<li>Netronix NH-230</li>
<li>Netronix NH-231</li>
<li>Planex NAS-01G</li>
</ul>
</section>
<section class="Sh">
<h1 class="Sh" id="SYSCTL_VARIABLES"><a class="permalink" href="#SYSCTL_VARIABLES">SYSCTL
VARIABLES</a></h1>
<p class="Pp">The following <a class="Xr">sysctl(3)</a> variables are
available:</p>
<dl class="Bl-tag">
<dt>machdep.nhpow.fan</dt>
<dd>Sets the fan speed to high (1) or low (0).</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h1>
<dl class="Bl-tag Bl-compact">
<dt><span class="Pa">/dev/power</span></dt>
<dd>event notify channel to <a class="Xr">powerd(8)</a>.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<p class="Pp"><a class="Xr">gpio(4)</a>, <a class="Xr">gpioctl(8)</a>,
<a class="Xr">powerd(8)</a>, <a class="Xr">sysctl(8)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<p class="Pp">The <code class="Nm">nhpow</code> driver first appeared in
<span class="Ux">NetBSD 6.0</span>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<p class="Pp">The <code class="Nm">nhpow</code> driver was written by
<span class="An">Frank Wille</span>.</p>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">January 15, 2012</td>
<td class="foot-os">NetBSD 10.1</td>
</tr>
</table>
|