NHPOW(4) Device Drivers Manual (sandpoint) NHPOW(4)

nhpow
driver for the NH-230/231 board control GPIO pins

nhpow0 at mainbus0
gpio* at nhpow0

This driver initializes the LEDs and the fan speed during boot and establishes a reboot and power-off hook in the kernel.

nhpow 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 powerd(8) to get a finer control over the system shutdown procedure. It is capable of reporting a power-button-pressed event. Refer to the powerd(8) manual section for more details.

The nhpow driver provides access to its 8 bidirectional GPIO pins through the gpio(4) controller interface. The pins have the following meaning when being written:

Pin Active level Function
high System power off
high Assert system reset to all devices
low Status LED
high High speed fan
low Debug LED 1
low Debug LED 2
low USB port 1 LED
low USB port 2 LED

When reading, the pins have the following meaning:

Pin Active level Function
low Power button pressed
low Reset/install button pressed
high H/W version bit 0
high H/W version bit 1
high H/W version bit 2
high H/W version bit 3

nhpow attaches automatically for all NH-230/231 compatible products:

The following sysctl(3) variables are available:
machdep.nhpow.fan
Sets the fan speed to high (1) or low (0).

/dev/power
event notify channel to powerd(8).

gpio(4), gpioctl(8), powerd(8), sysctl(8)

The nhpow driver first appeared in NetBSD 6.0.

The nhpow driver was written by Frank Wille.
January 15, 2012 NetBSD 9.4