Net5501 JP5 GPIO Mappings
From Soekris Info Wiki
The Net4801 and come with user-programmable general purpose input/output pins. There are 12 on JP5 and two more on JP10. They're all 3.3V out and 5V input tolerant and connect directly to the PC87366 Multi-IO chip. See the hardware manual and datasheet for details.
Contents |
JP5 Pinouts for OpenBSD GPIO
Pins are mapped to /dev/gpio1 and must be defined BEFORE the system goes into secure mode. That is done in /etc/rc.securelevel See the manual page for gpioctl(8) for details.
| JP5 Pin | GPIO Pin | GPIO Pin | JP5 Pin |
|---|---|---|---|
| 1 (+3.3V) | - | - | 2 (+5V) |
| 3 | GPIO 16 | GPIO 17 | 4 |
| 5 | GPIO 18 | GPIO 19 | 6 |
| 7 | GPIO 20 | GPIO 21 | 8 |
| 9 | GPIO 22 | GPIO 23 | 10 |
| 11 (GND) | - | GPIO 04 | 12 |
| 13 | GPIO 05 | - | 14 (GND) |
| 15 | GPIO 11 | GPIO 16 | 16 |
| 17 (GND) | - | - | 18 (RXD) |
| 19 (TXD) | - | - | 20 (GND) |
Sample /etc/rc.secure
Below, the pins are set push-pull and given names based on their position in JP5:
/usr/sbin/gpioctl -q gpio1 16 set out pp jp5pin03; /usr/sbin/gpioctl -q gpio1 17 set out pp jp5pin04; /usr/sbin/gpioctl -q gpio1 18 set out pp jp5pin05; /usr/sbin/gpioctl -q gpio1 19 set out pp jp5pin06; /usr/sbin/gpioctl -q gpio1 20 set out pp jp5pin07; /usr/sbin/gpioctl -q gpio1 21 set out pp jp5pin08; /usr/sbin/gpioctl -q gpio1 22 set out pp jp5pin09; /usr/sbin/gpioctl -q gpio1 23 set out pp jp5pin10; /usr/sbin/gpioctl -q gpio1 24 set out pp jp5pin12; /usr/sbin/gpioctl -q gpio1 05 set out pp jp5pin13; /usr/sbin/gpioctl -q gpio1 11 set out pp jp5pin15; /usr/sbin/gpioctl -q gpio1 10 set out pp jp5pin16;
The pins can be accessed by either their number or name.
/usr/sbin/gpioctl -q gpio1 jp5pin03 on;
is the same as
/usr/sbin/gpioctl -q gpio1 16 on;

